poldek manual

$Id: manual.xml,v 1.7 2005/06/05 22:32:27 mis Exp $

Abstract

This paper documents poldek meta-package manager 0.19.0.


Table of Contents

1. Overview
2. Quick start
2.1. Step #1 - Configure repositories
2.2. Step #2 - Create repository index
2.3. Step #3 - Use the program
3. Package repositories
3.1. Repositories configuration
3.2. Using repositories
3.3. Creating
3.4. Cache
3.5. Repository related options reference
4. Managing packages
4.1. Specifying packages
4.2. Installing packages
4.3. Installation system from scratch
4.4. Install options reference
4.5. Removing packages
4.6. Package removal option reference
4.7. Obtaining information about packages
5. Security issues
5.1. Using sudo
5.2. Automatic switching to an ordinary user
6. Repository management
6.1. Verification of package set quality
6.2. Preparation of distribution disks
6.3. Managing repository packages
7. Configuration
7.1. File format
7.2. Special directives and macros
7.3. Section descriptions
7.4. Parameters of [global] section
7.5. Parameters of [source] section
7.6. Parameters of [fetcher] section
A. Package priorities configuration sample

1. Overview

poldek is a full-featured frontend for RPM package manager. Its core features are similar to every modern package updater like apt-get. Features include package installation, upgrading and removal with automatic dependency handling, querying and search the package database and more.

Features

Easy to use

Basic command line options and switches are similar in use to rpm so poldek is easy to learn for users familiar with rpm. Apart from rpm-like command line option set poldek provides quite intuitive command set ("install", "upgrade", etc) for those who knows apt-get. Shell-like interface is available with auto-completion and history.

Relatively fast and scalable

poldek has been designed with efficiency and scalability in mind. Native package repository index format is optimized for storage size and loading speed. Package dependencies, conflicts and setting in order are handled without using rpmlib, so the program is significantly faster and needs less memory than rpmlib-based tools. On typical machine poldek can handle 20K packages without noticable speed degradation.

Incremental repository updates

poldek's repositories are updateable by downloading a changes of remote repository only, what drastically reduces amout of data need to be retrieved when remote repository was changed a bit.

Support for multiple repository types

poldek supports various types of package repositories including apt-get and yum ones, see list of supported repository types for details. Support for other types may be easily added.

Flexible installation of a big package sets

Before their installation packages are divided into small groups, usually 2-10 items (depending on their reciprocal dependencies). Each group is installed separately, what ensures that unsucessful installation of one of the groups does not influence other ones. Another benefit of this separate installation is that it requires less memory and disk space than the usual one.

Flexible downloading

Out of the box program supports FTP, HTTP, HTTPS, RSYNC and SMB and may be easily extended to others protocols by external scripts. FTP and HTTP are handled by built-in client designed to retrieve files over slow or unstable network connections -- if a download fails due to a network problem, it will keep trying until the whole file will be downloaded. Download resuming, timestamp checking, proxy support are implemented as well.

Repository management

poldek provides functionality which helps to manage distribution repositories. Features include:

  • Detail reports about dependency loops, unmet dependencies, package conflicts and obsolences and file sharing/conflicts.

  • Division package set to chunks to be placed on removable media with ordering according dependency tree and with priority handling.

  • Moving packages from one repository to another with full dependency checking.

2. Quick start

Suppose you want to: a) use remote apt-get repository of Fedora Core 3, b) prepare your local directory $HOME/rpm/RPMS with packages to be available to poldek.

2.1. Step #1 - Configure repositories

Source configuration may be placed in your local $HOME/.poldekrc or global /etc/poldek/source.conf. Whatever you choose, put there something like:


[source]
_fcurl = http://download.fedora.us/fedora/fedora/3/i386 # macro, just for short

name   = fc3                           # name 
type   = apt                           # use apt repository index
path   = %{_fcurl}/base/pkglist.os.bz2 # location of the index
prefix = %{_fcurl}/RPMS.os             # location of the packages -
                                       #  package index and packages 
                                       #  are placed in separate locations
[source]
name = home
path = $HOME/rpm/RPMS

2.2. Step #2 - Create repository index

Fedora Core 3 apt-get index is ready, we must create one for $HOME/rpm/RPMS:

  $ poldek -n home --makeidx
  

As result several files with package data will be created under $HOME/rpm/RPMS.

    
  $ poldek -n home --makeidx
  Creating pndir index of /home/me/rpm/RPMS (type=dir)...
  Loading [dir]home...
  200..400..600..800..1000..1200..1400..1600..1652
  Writing /home/me/rpm/RPMS/packages.ndir.gz...
  

Remember to call this command after every change of $HOME/rpm/RPMS's content.

2.3. Step #3 - Use the program

poldek brings two commands: poldek with rpm-like command line interface and ipoldek with interactive mode command interface. Invoking syntax is:

$ poldek [OPTION...] [PACKAGE...]
$ ipoldek [OPTION...] [COMMAND] [COMMAND_OPTION...] [PACKAGE...]

For example to install or upgrade apache HTTP server:

$ poldek -uv apache 
$ ipoldek install apache

Selection of particular repositories may be done by -n option:

$ ipoldek -n fc3 ls foo\*
$ poldek -n home -uv foo-3.1-2
$ ipoldek -n home -s http://foo.bar/RPMS/ install foo-3.1\*

Most used poldek command options are compliant with rpm: --install (-i), --upgrade (-u,-U), --erase (-e), etc. Their ipoldek equivalents are: install -IN (--install), install (--upgrade) and uninstall (--erase). Notice that ipoldek install command it more general -- equivalent of --install is install -IN.

Extensive help is available for all commands, for poldek by using the --help switch, for ipoldek by using the help command and --help switch for individual commands:

$ poldek --help
$ ipoldek help
$ ipoldek install --help

ipoldek provides comfortable shell-like mode which puts you into a readline interface. To enter it, run the program without any command:

$ ipoldek -n ac
Loading [pdir]ac...
10998 packages read
Loading [rpmdbcache]/var/lib/rpm...
1751 packages loaded

Welcome to the poldek shell mode. Type "help" for help with commands.

poldek:/all-avail>

Once you are on poldek's command line, type 'help' and the rest should be, more or less, self-explanatory.

poldek:/all-avail>help

ls        [OPTION...] [PACKAGE...]             List packages
search    [OPTION...] PATTERN [PACKAGE...]     Search packages
get       [OPTION...] PACKAGE...               Download packages
desc      [OPTION...] PACKAGE...               Display packages info
install   [OPTION...] PACKAGE...               Install packages
uninstall [OPTION...] PACKAGE...               Uninstall packages
cd        [PATH]                               Change current package directory
pwd                                            Print name of current directory
help                                           Display this help
alias                                          Print defined command aliases
reload                                         Reload installed packages
quit                                           Exit poldek

Type COMMAND -? for details.
poldek:/all-avail>

3. Package repositories

Like other packages management tools poldek uses package repositories (sources) to obtain meta-information about available packages. Repository consist of database (package index) of package meta-data (dependencies, files, description, etc) and, of course packages itself. Various types of repositories are supported including apt-get and yum ones.

Supported repositories

pndir (features: read, write, update, incremental update)

Native poldek index format since 0.20 version. Based on tndb (cdb-like) DBM library. Consist of 3 database files: first, packages.ndir with essentiall package meta-data, second packages.ndir.dscr with with common (BuildHost, Distribution, etc) and "C" package descriptions and third, packages.ndir.dscr.i18n with all non-English descriptions (if any)

hdrl (features: read, update)

Native apt-get and other tools (urpmi AFAIK) index format. Consist of one file (pkglist.%{repository}.bz2, hdlist) with raw, often cut down, RPM package headers.

Aliases: apt

yum (features: read, update)

Native yum index format. Consist of one file with list of packages IDs and directory of *.hdr files with raw RPM package headers.

pdir (features: read, write, update, incremental update)

Native poldek index format prior to 0.20 version. Based on custom binary format. Consist of one database file (packages.dir) with all needed package header data.

dir (features: read)

Dynamic index built by scanning with a bunch of packages in it, no indexing required.

Native poldek repositories 'pndir' and 'pdir' have “incremental updates” feature consist in creation of package index delta files with differences between already created and previous package index. Deltas are used later to perform update of local indexes what noticeably reduces amout of data downloaded. In the other words, when repository was changed by adding a few packages, only information about those few packages will be retrieved on update (see Update subsection).

3.1. Repositories configuration

Although repositories can be specified directly at command line, they are usually configured. Every repository has its own configuration section “[source]”, for example:

[source]
type   = pndir                                      # package index type 
name   = distro                                     # name of the source
path   = http://my-favourite-distro.org/1.0/RPMS/   # path 
signed = yes                                        # verify package signatures

[source]
type   = pndir                                 
name   = distro-updates                        
path   = http://my-favourite-distro.org/1.0/updates/
signed = yes                                 

[source]
type = dir
name = home
path = ${HOME}/rpm/RPMS
auto = no                                            # load on demand only

type is not obligatory - if not set, then type is taken from default index type configuration option value. For all possible source configuration and extensible option description see Configuration and and *source.conf files supplied with poldek.

poldek is can read apt-get's /etc/apt/sources.list directly. It is controlled by load apt sources list, to load apt's sources do:

load apt sources list = yes

3.2. Using repositories

3.2.1. Selection

poldek loads all configured repositories at startup Executed without repository selection options poldek loads all configured repositories at startup, except they which have auto turned off. To use particular repositories use --sn (-n) option, for example, to use only home source, do:

$ poldek -n home

Repository name can be also a glob, to use all sources with “distro” prefix, do:

$ poldek -n distro\*

Non configured repositories can be specified directly at command line by --source (-s) option. The syntax is:

$ poldek [--st=TYPE] --source=SOURCEPATH [--prefix=PATH]

where TYPE is one of index supported types, and SOURCEPATH is the path or URL of repository. If package index and packages are located in different paths/URLs then --prefix can be used to point packages location. Examples:

$ poldek -s ~/rpm/RPMS
$ poldek --st pdir -s ftp://foo.bar.org/RPMS/
$ poldek -s ftp://foo.bar.org/RPMS.index/ --prefix ftp://foo.bar.org/RPMS/
$ poldek -s /tmp/packages.ndir.gz --prefix /media/cdrom

3.2.2. Updating

To resynchronize the package index from its repository use --update (--up) or --update-whole (--upa):

$ poldek [-s PATH] [-n NAME] --update
$ poldek [-s PATH] [-n NAME] --update-whole

With --update program looks for delta files for existing local package index. If they are unavailable, then whole index is downloaded. With --update-whole program updates whole package index if it is outdated. It is a good idea to run do updates regularly to keep indexes up to date.

Update requested for local repositories causes verification integrity of indexes.

Examples:

$ poldek --st pdir -s ftp://foo.bar.org/RPMS/ --up 
$ poldek -s ftp://foo.bar.org/RPMS.index/ --prefix ftp://foo.bar.org/RPMS/ --upa
$ poldek -n home --up

3.2.3. Listing available repositories

To list all configured repositories use --sl (-l):

$ poldek -l
distro          http://my-favourite-distro.org/1.0/RPMS/    (sign,type=pndir)
distro-updates  http://my-favourite-distro.org/1.0/updates/ (sign,type=pndir)
home            /home/me/rpm/RPMS/  (noauto,type=dir)

3.2.4. Listing available repository types

To list all available repository types, use --stl:

$ poldek --stl
dir    r--  Dynamic index built by scanning directory for packages
             (aliases: rpmdir)
hdrl   r-u  File with raw RPM package headers; used by apt-rpm
             (aliases: apt)
pdir   rwu  Native poldek's index format prior to 0.20 version
             (aliases: pidx)
pndir  rwu  Native poldek's index format
rpmdb  r--  RPM package database
yum    r-u  Yum index format
Legend: r - readable, w - writeable, u - updateable

3.3. Creating

Creation of poldek's repositories is quite simple, the syntax is:

$ poldek -s PATH --mkidx[=PATH] [--mt=TYPE[,TYPE]...] [--nodesc] [--nocompress] [--nodiff]
$ poldek -n NAME --mkidx[=PATH] [--mt=TYPE[,TYPE]...] [--nodesc] [--nocompress] [--nodiff]

what creates package index of repository specified by -n or -s and saves it under directory specified by --mkidx (a package directory by default). Type of created index is the same as specified by default index type configuration option. To make index of the other type or make many indexes of different types at once, use --mt option.

For 'pndir' and 'pdir' indexes delta files are created if previous repository index is different from currently created one. Outdated deltas are automatically removed. To skip deltas creation use --nodiff option.

Other related options are: --nodesc with that package descriptions are not saved to repository index and --nocompres means that uncompressed index will be created.

Examples:

$ poldek -s ~/rpm/RPMS --mkidx --nodiff
$ poldek -s /cdrom/RPMS --mkidx=/tmp
$ poldek -n home --mkidx 
$ poldek -n pld --mkidx --mt=pdir,pndir

3.4. Cache

Program caches package index files only by default. To cache packages too, i.e. keep them even after successful installation, set keep downloads configuration option. Default cache directory is $HOME/.poldek-cache, it can be set to different location by cachedir configuration option. Cached files can be removed by three options:

  • --clean remove source index files

  • --clean-pkg remove cached packages.

  • --clean-whole remove all files from cache directory

In conjunction with -n or -s cleannig may be limited to files belongs to specified repositories only. Examples:

$ poldek -s http://foo.bar/RPMS --clean
$ poldek -n foo --clean-whole
$ poldek --clean-pkg

3.5. Repository related options reference

Repository index creation

--mkidx[=PATH]

Create package index (under SOURCE-PATH by default)

--mt=TYPE[,TYPE]

Set created index type (use --stl to list available values)

--nodesc

Don't put package user-level information (like Summary or Description) into created index.

--nodiff

Don't create index delta files

--nocompress

Create uncompressed index

Repository selection

-s, --source=PATH

Get packages info from repository under PATH

-n, --sn=SOURCE-NAME

Get packages info from repository named SOURCE-NAME

--dn=SOURCE-NAME

Install to source SOURCE-NAME instead to the system

--st=SOURCE-TYPE

Set the source type (use --stl to list available values)

-P, --prefix=PREFIX

Get packages from PREFIX instead of SOURCE

Repository related actions

--stl

List available source types

-l, --sl

List configured sources

--update

Update the source and verify it

--update-whole

Update whole index of source

--clean

Remove source index files from cache directory

--clean-pkg

Remove cached packages of the source

--clean-whole

Remove all files belongs to source from cache directory

4. Managing packages

poldek operates in two basic modes - the first one is more generic and compliant with rpm (poldek command) and second interactive mode with simplified and more intuitive command set.

Interactive mode is available from both command line (ipoldek command) and shell like interface with auto-completion and history. Program executed without "command" options (install, erase, etc) puts the user in this shell interface (see "screenshot").

4.1. Specifying packages

Packages can be specified in five ways:

  • as package Name[-[Epoch:]Version-Release] mask, e.g.

         $ poldek ... apache
         $ poldek ... apache-1.3.31-2
         $ poldek ... apache-2:1.3.31-2
         $ poldek ... 'apache-1.3*'
         $ poldek ... 'apache-mod_*pam*'
         

  • as packages files, e.g:

         $ poldek ... apache-1.3.31-1.i386.rpm
         

  • as Name#Version[-Release] string, e.g.:

         $ poldek ... apache#1.3.31
         $ poldek ... apache#1.3.31-1
         

  • by package capability (Provides):

         $ poldek ... --caplookup webserver
         $ poldek ... --caplookup smtpdaemon
         

    --caplookup is available in command line mode only.

  • as list read from file, e.g.:

         $ poldek ... --pset ~/.package-sets/tiny-system
         $ poldek ... --pset http://foo.bar.com/package-sets/tiny-system.txt
         

    Syntax of file passed as --pset argument is very simple. Each package is specified in separated line in following syntax:

         NAME [EVR] | @VIRTUAL [DEFAULT_NAME [DEFAULT_EVR]]
         

    '@' specifies virtual package. Hashed lines are treated as comments. Example:

         FHS 2.1 
         basesystem
         pdksh
         @bootloader lilo 2.1
         @smtpdaemon exim
         

    --pset is available in command line mode only.

4.2. Installing packages

To install packages in rpm sense, i.e. do not upgrade even if older version is already installed:

$ poldek  [OPTION..] --install                 (rpm mode)
$ ipoldek [OPTION..] install -IN               (interactive mode)

It is useful when installation of multiple instance of package is needed (kernel for example). Example:

$ poldek -iv kernel-2.6.11 
Processing dependencies...
There are 1 package to install:
I kernel-2.6.11-2
Need to get 13.4MB of archives (13.4MB to download).
After unpacking 15.2MB will be used.
Retrieving ac::kernel-2.6.11-2.i686.rpm...
.............................. 100.0% [13.4MB (2M/s)]
Executing sudo /bin/rpm --install -vh --root / --noorder...
Preparing...                ########################################### [100%]
   1:kernel                 ########################################### [100%]

To install package or upgrade it if older version is already installed:

$ poldek  [OPTION..] --upgrade                 (rpm mode)
$ ipoldek [OPTION..] install                   (interactive mode)

This is most used installation type. Example:

$ ipoldek install vim
Loading [pdir]ac...
10998 packages read
Processing dependencies...
vim-6.2.479-1 obsoleted by vim-6.3.067-1
vim-6.3.067-1 marks vim-rt-6.3.067-1 (cap vim-rt = 4:6.3.067-1)
  vim-rt-6.2.479-1 obsoleted by vim-rt-6.3.067-1
    greedy upgrade gvim-gtk-6.2.479-1 to 6.3.067-1 (unresolved vim-rt = 4:6.2.479-1)
      gvim-gtk-6.2.479-1 obsoleted by gvim-gtk-6.3.067-1
    greedy upgrade vim-ispell-6.2.479-1 to 6.3.067-1 (unresolved vim-rt = 4:6.2.479-1)
      vim-ispell-6.2.479-1 obsoleted by vim-ispell-6.3.067-1
There are 4 packages to install (3 marked by dependencies), 4 to uninstall:
I vim-6.3.067-1
D gvim-gtk-6.3.067-1, vim-ispell-6.3.067-1, vim-rt-6.3.067-1
R gvim-gtk-6.2.479-1, vim-rt-6.2.479-1, vim-6.2.479-1, vim-ispell-6.2.479-1
Need to get 4.5MB of archives (4.5MB to download).
After unpacking 14.0MB will be used.

Retrieving ac::vim-ispell-6.3.067-1.i686.rpm...
.............................. 100.0% [526.3K (56.4K/s)]                      
Retrieving ac::vim-6.3.067-1.i686.rpm...
.............................. 100.0% [518.0K (62.5K/s)]                      
Retrieving ac::gvim-gtk-6.3.067-1.i686.rpm...
.............................. 100.0% [679.2K (69.1K/s)]                      
Retrieving ac::vim-rt-6.3.067-1.i686.rpm...
.............................. 100.0% [2.9M (56.4K/s)]                       

Executing sudo /bin/rpm --upgrade -vh --root / --noorder...
Preparing...                ########################################### [100%]
   1:vim-rt                 ########################################### [ 25%]
   2:gvim-gtk               ########################################### [ 50%]
   3:vim                    ########################################### [ 75%]
   4:vim-ispell             ########################################### [100%]

To upgrade packages, i.e. install only if older version is already installed:

$ poldek  [OPTION..] --upgrade --fresh         (rpm mode)
$ ipoldek [OPTION..] upgrade                   (interactive mode)

Example:

$ poldek -uvF 'apache*'

To upgrade all packages need upgrade --upgrade-dist can be used, or, in interactive mode '*' may be specified as package mask. Examples:

$ poldek -v --upgrade-dist
$ ipoldek -v install -F '*'

4.3. Installation system from scratch

poldek can be used as system installer, to install system from scratch use --install-dist option. The syntax is:

$ poldek --install-dist=DIR [PACKAGE...]

All unmet dependencies will be satisfied by marking additionall packages. In this type of installation packages are installed one by one what, because of reduction of memory consumption and utilization of CPU, permits to install the system on older machines.

As example, command which installs system under /mnt/dest might looks like:

$ poldek -s ftp://foo.bar/RPMS --install-dist=/mnt/dest --pset ftp://foo-bar/package-sets/myset.txt

4.4.  Install options reference

Package installation

-i, --install

Install given packages

--reinstall

Reinstall given packages

--downgrade

Downgrade

-u, --upgrade

Upgrade given packages

Distribution installation/upgrade

--install-dist=DIR

Install package set under DIR as root directory

--upgrade-dist[=DIR]

Upgrade all packages needs upgrade

--reinstall-dist[=DIR]

Reinstall all packages under DIR as root directory

Installation switches

--hold=PACKAGE[,PACKAGE]...

Prevent packages listed from being upgraded if they are already installed. If option is not set then packages to hold are taken from hold configuration option. Held package won't be upgraded with exception if it will be pointed directly by the user.

Example:

   $ poldek --hold=kernel\*,dev ...

Configuration option: hold = PACKAGE[,PACKAGE]...

--nohold

Do not hold any packages. Disables --hold settings.

--ignore=PACKAGE[,PACKAGE]...

Make packages listed invisible to the program. If option is not set then packages to ignore are taken from ignore configuration option.

Example:

  $  poldek --ignore=kernel\*-smp\*,foo

Configuration option: ignore = PACKAGE[,PACKAGE]...

--noignore

Make invisibled packages visible. Disables --ignore settings.

-Q, --uniq

Remove package duplicates from available package list

--parsable-tr-summary

Print installation summary in parseable form

--force

Install packages ignoring broken dependencies, conflicts, etc

-t, --test

Do not install packages, but tell if it would work or not. Given once causes poldek's checks only, to perform full tests using rpm;, option must be given twice.

-F, --fresh

Upgrade packages, but only if an earlier version currently exists

-N, --nofollow

Don't install packages required by selected ones

--follow[=[yes|no]]

Install packages required by selected ones

--greedy[=[yes|no]]

Automatically upgrade packages which dependencies are broken by uninstalled ones, for example if package foo is upgraded from version 1.0 to 1.2 and package foo-devel is already installed with requirement "foo = 1.0" then foo-devel will be upgraded to version 1.2 too.

Configuration option: greedy = [yes|no]

--fetch[=DIR]

Download packages to DIR (poldek's cache directory by default)instead of install them

-r, --root=DIR

Set top directory to DIR

--nodeps

Install packages with broken dependencies

-m, --mercy

Be tolerant for unmatched versioned dependencies which rpm; tolerates, e.g. package A requires capability foo >= 1.0 while package B provides "foo" without any version. Use with care.

Configuration option: mercy = [yes|no]

--promoteepoch

Promote non-existent requirement's epoch to package's one (rpm; < 4.2.1 behaviour).

Configuration option: promoteepoch = [yes|no]

--dump[=FILE]

Print packages file names to FILE (stdout by default) instead of install them

--dumpn[=FILE]

Print packages names to FILE (stdout by default) instead of install them

--justdb

Modify only the database

--pm-nodeps

Same as --nodeps but applied to PM (rpm) only

--pm-force

Same as --force but applied to PM (rpm) only)

--pmopt=OPTION

Pass option to package manager (rpm) binary. Example:

    $ poldek --pmopt=ignoreos
   

4.5. Removing packages

poldek removes packages with its reverse-dependent ones and in the right order - packages are sorted properly according Requires(un) rpm requirements.

To remove installed packages:

$ poldek  [OPTION..] --erase                     (rpm mode)
$ ipoldek [OPTION..] uninstall                   (interactive mode)

Examples:

$ poldek -e apache 
$ poldek -e kernel-2.6.11.5-3
$ poldek -e kernel-3:2.6.11.5-3
$ ipoldek uninstall kernel-2.6.11.5-3

4.6. Package removal option reference

Package deinstallation

-e, --erase

Uninstall given packages

-t, --test

Do not remove, but tell if it would work or not

-N, --nofollow

Remove only selected packages

--nodeps

Ignore broken dependencies

4.7. Obtaining information about packages

Package details, both about installed and available ones can be easily accessed through interactive mode commands: ls, search and desc.

4.7.1. ls - package listing

ls like system ls list packages in different ways. Type "ls --help" to see all available options. Output example:

 
poldek:/installed> ls -O *gimp*
gimp-2.0.0-1
    The GNU Image Manipulation Program
gimp-print-lib-4.2.6-1
    gimp-print library

4.7.2. search - search packages

Package repositories may be easily searched by many criteria like package description, summary, group, requirements, etc. Type "search --help" to see all available options. Syntax of command is:

search [OPTION...] PATTERN [PACKAGE...]

Where PATTERN is a glob or, with --perlre, Perl regular expression. For instance to find the packages that contains /usr/sbin/ab file:

$ ipoldek search -l /usr/sbin/ab
2 package(s) found:
apache-2.0.53-4
apache1-tools-1.3.33-4

Try to find something for audio files manipulation:

$ ipoldek search --perlre /audio.+editor/
3 package(s) found:
ecawave-0.6.1-3
piave-0.2.4-2
rezound-0.11.1-0.beta.2

4.7.3. desc - show package details

Command gives access to all package information: package description and summary, group, vendor, build time,requirements, capabilities and conflicts, full file list, etc. Type "desc --help" to see all available options. Example:

poldek:/all-avail> desc apache
Package:        apache-2.0.53-4
Summary:        The most widely used Web server on the Internet
Group:          Networking/Daemons
Vendor:         PLD
License:        Apache Group License
Arch/OS:        i686/linux
URL:            http://httpd.apache.org/
Built:          2005/03/14 22:02 at i686.ac.pld-linux.org
Size:           2.4 MB (2516798 B)
Package size:   1.0 MB (1097448 B)
Path:           http://ftp.pld-linux.org/dists/ac/PLD/i686/PLD/RPMS
File:           apache-2.0.53-4.i686.rpm
Description:
Apache is a powerful, full-featured, efficient and freely-available
Web server. Apache is also the most popular Web server on the Internet.

5. Security issues

Agreeing with opinion that risk should be minimized it is strongly recommended using poldek as an ordinary user and use the root privileges for package installation and removal only. It is possible in two ways with help of sudo command.

5.1. Using sudo

Setting on use sudo configuration opinion causes execution of rpm binary through sudo for read-write operations. The rest is of the operations may work without super user privileges.

Of course it is necessary to configure sudo to allow the user to run rpm binary.

5.2. Automatic switching to an ordinary user

More automated using of sudo is also possible. Configured by runas option poldek will automatically switch to an ordinary user if detects beeing executed by root. To setup this scenario, set runas option:

runas = poldek

and configure “poldek” user account. There is poldekuser-setup.sh script which automates user account configuration supplied with poldek.

6. Repository management

Program can be useful for distribution developers and maintainers by make detailed reports about package set consistency, automating move packages from one repository to another and helping with generation of CD/DVD ISO images.

6.1. Verification of package set quality

poldek can make reports about package set consistency: loops, unmet dependencies and conflicts.

Avaialble reports:

Dependency loops and unmet dependencies

This report allows to verify if package set contain any unsatisfied dependencies and requirements (PreReqs) loops (loop makes impossible to install packages in the right order). Report is accessible through --verify(-V). Example:

    $ poldek -n home --verify
    Verifying dependency loops...
    error: PreReq loop: pam <- coreutils <- pam <- SysVinit
    error: PreReq loop: xinitrc <- XFree86 <- xinitrc
    2 prerequirement loops detected 

    Verifying dependencies...
    error: docbook-utils-0.6.13-7: req perl(Getopt::Long) >= 2.01 version mismatch
    eog-2.8.2-1: req libexif.so.10 not found
    error: ruby-gnome2-0.11.0-2: req ruby-rbogl not found
    3 unsatisfied dependencies found
    

Package conflicts

Report prints all package pairs beeing in conflict or beeing obsoleted one another. It lets to verify if all conflicts are needed, what are redundant, etc. Report is accessible through --verify-conflicts. Example (Obsoletes are printed with asterisk '*'):

    $ poldek -n foo --verify-conflicts
    Verifying conflicts...
    bind-9.2.5-2 -> *maradns-1.1.30-1, *dnsmasq-2.19-1, *pdnsd-1.1.8b1-0.par8.2
    maradns-1.1.30-1 -> *bind-9.2.5-2 
    login-2.12-15 -> *heimdal-login-0.6.3-2
    pdnsd-1.1.8b1-0.par8.2 -> *maradns-1.1.30-1, *maradns-zoneserver-1.1.30-1 
    shadow-4.0.4.1-3 -> pwdutils-2.6.90-3
    

File conflicts

Report prints all package pairs beeing in conflict on file level and that pairs which share the same file. It lets to verify if all conflicts are needed, what are redundant, etc. Report is accessible through --verify-fileconflicts. Example:

    $ poldek -n foo --verify-conflicts
    Path: /usr/lib/perl5/vendor_perl/5.8.0/i686-pld-linux-thread-multi/Image
     shr   perl-base-5.8.6-3(D m40755 s4096)  -  ImageMagick-perl-6.1.8.9-1(D m40755 s4096)

    Path: /var/log/archiv/mail
     cnfl  syslog-ng-1.6.6-2(D m40755 s4096) <-> zmailer-2.99.56-4(D m40750 s48)

    Path: /usr/bin/digest
     cnfl  perl-XML-Filter-Digest-0.06-1(F m100755 s1418) <-> nss-tools-3.9.4-1(F m100755 s32964)
    

'<' and '>' mean missing explicit conflict between packages.

6.1.1. Verification options reference

Verification options/switches

-V, --verify

Verify dependencies

--verify-conflicts

Verify conflicts

--verify-fileconflicts

Verify file conflicts

--verify-all

Verify dependencies, conflicts and file conflicts

6.2. Preparation of distribution disks

poldek can partition package set for the purpose of placing it on removable media like DVD or CD. Program divide packages in the way that minimize needs of disk changes; for example if distribution fits on 3 CDs, then only 2 changes of CD disk are necessary during installation system from scratch. The invoking syntax is:

$ poldek --split=SIZE[:FIRST_FREE_SPACE] [--priconf=FILE] [--split-out=PREFIX]

Where SIZE is size of the chunk in megabytes and the first chunk will be FIRST_FREE_SPACE MB smaller.

Packages are placed in successive chunks in order of their installation. To reorder packages, i.e. move some to higher or lower chunk, especially on first / last one, priorities may be assigned to them. Package priorities are taken from file given by --priconf. Format of this file is quite simple, see sample poldek-pri-sample.conf supplied with poldek.

Each chunk is written as NAME-EVR.ARCH.rpm list to PREFIX.XX file, the default PREFIX is “packages.chunk”.

6.3. Managing repository packages

A typical scenario during distribution development looks like there is repository for untested packages from where they periodically, when found to be tested enough, are moved to the another repository marked as stable branch.

poldek can help with movig packages between repositories through “to repository” installation, i.e. packages are copied from source to destination repository with full dependency checking. Thus this feature allows to move subtree of packages from one repository to another without a risk of break dependencies. The syntax is:

$ poldek ... --dn SOURCE_NAME [--dn SOURCE_NAME] ...

Where SOURCE_NAME is a name of repository we want to move packages to, for example:

$ poldek -n ac-test --dn ac -uv libselinux
Loading [pdir]ac-test...
1161 packages read
Loading [pdir]ac...
Processing dependencies...
libselinux-1.18-1 obsoleted by libselinux-1.22-1
  greedy upgrade libselinux-devel-1.18-1 to 1.22-1 (unresolved libselinux = 1.18-1)
    libselinux-devel-1.18-1 obsoleted by libselinux-devel-1.22-1
      greedy upgrade libselinux-static-1.18-1 to 1.22-1 (unresolved libselinux-devel = 1.18-1)
        libselinux-static-1.18-1 obsoleted by libselinux-static-1.22-1
  greedy upgrade libselinux-utils-1.18-1 to 1.22-1 (unresolved libselinux = 1.18-1)
    libselinux-utils-1.18-1 obsoleted by libselinux-utils-1.22-1
There are 4 packages to install (3 marked by dependencies), 4 to uninstall:
I libselinux-1.22-1
D libselinux-devel-1.22-1, libselinux-static-1.22-1, libselinux-utils-1.22-1
R libselinux-1.18-1, libselinux-devel-1.18-1, libselinux-static-1.18-1, libselinux-utils-1.18-1
Need to get 153.9KB of archives (153.9KB to download).
rm /home/ftp/pub/ac/libselinux-1.18-1.i686.rpm
rm /home/ftp/pub/ac/libselinux-devel-1.18-1.i686.rpm
rm /home/ftp/pub/ac/libselinux-static-1.18-1.i686.rpm
rm /home/ftp/pub/ac/libselinux-utils-1.18-1.i686.rpm
cp libselinux-utils-1.22-1.i686.rpm /tmp/RPMS/libselinux-utils-1.22-1.i686.rpm
cp libselinux-static-1.22-1.i686.rpm /tmp/RPMS/libselinux-static-1.22-1.i686.rpm
cp libselinux-devel-1.22-1.i686.rpm /tmp/RPMS/libselinux-devel-1.22-1.i686.rpm
cp libselinux-1.22-1.i686.rpm /tmp/RPMS/libselinux-1.22-1.i686.rpm

Removing packages from repositories in that safe manner is also possible:

$ poldek --dn ac -e poldek
mark poldek-0.18.8-3
Processing dependencies...
poldek-0.18.8-3 marks libpi-0.1.1-1 (req poldek)
  libpi-0.1.1-1 marks libpi-devel-0.1.1-1 (req libpi = 0.1.1-1)
  libpi-0.1.1-1 marks pacman-0.1-3 (req libpi)
poldek-0.18.8-3 marks poldex-0.17.4-1 (req poldek)
There are 5 packages to remove (4 marked by dependencies):
R poldek-0.18.8-3
D libpi-0.1.1-1, libpi-devel-0.1.1-1, pacman-0.1-3, poldex-0.17.4-1
Proceed? [y/N]

Sometimes it is not desirable to let poldek to move packages itself, then --test and --parsable-tr-summary switches may be used to produce easy to parse output, what allows to handle move operation by external scripts. Example:

$ poldek --dn ac -et poldek --parsable-tr-summary
[cut]
%R poldek-0.18.8-3
%D libpi-0.1.1-1
%D libpi-devel-0.1.1-1
%D pacman-0.1-3
%D poldex-0.17.4-1

7. Configuration

7.1. File format

The file consists of directives, sections and parameters. A section begins with thename of the section in square brackets and continues until the next section begins ('ini'-like format). Sections contain parameters of the form:

name = value

The file is line-based - that is, each newline-terminated line represents either a comment, a section name or a parameter. Any line beginning with a hash (`#') character is ignored, as are lines containing only whitespace.

In most string paramameters values environment variables are expanded:

path = $HOME/foo

7.2. Special directives and macros

File can be combined from multiple configuration files with %include directive. This directive can include either local and remote HTTP/FTP files, examples:

%include /etc/foo.conf            # simply include /etc/foo.conf
%include foo.conf                 # include foo.conf from directory of includer
%include http://bar.org/foo.conf  # include foo.conf from remote location

Any "[global]" sections from included files are simply ignored. Files taken from remote locations can be updated using --upconf switch.

Simple macros are supported. Macros are declared as paramameter with underscore ('_') at beginning:

_foo = /bar 

and can be expanded in any following value in %{NAME} form:

path = %{_foo}/dir    # path will be '/bar/dir'

Macros are local to file beeing declared, they are not visible in included files as are not visible to includer.

7.3. Section descriptions

There are three section types: [global], [source] and [fetcher].

[global]

Section contains global paramameters. May be declared multiple times, in this case content of all global sections are concatenated.

[source]

This section contains poldek's repository configuration. Each section describes one repository.

[fetcher]

Configuration of external file getters. Each section declares one external downloader.

To make things simpler default configuration consists of several files. Repositories are declared in separate source.conf and *-source.conf, file getters are declared in fetch.conf. All of them are included by poldek.conf.

7.4. Parameters of [global] section

default index type

This parameter allows to configure the default repository index type.

Default: default index type = pndir

cachedir

Cache directory for downloaded files. NOTE: that parent directory of cachedir must exists.

Default: cachedir = $HOME/.poldek-cache

runas

Switch to ordinary user at startup when executed by root

Default: runas =

use sudo

Permits using root privileges for installation only. Automatically turned on when poldek executed as ordinary user.

Default: use sudo = no

load apt sources list

Load /etc/apt/sources.list. The default is "yes" if system wide configuration file is used, "no" if user config ($HOME/.poldekrc) is used.

Default: load apt sources list = no

vfile external compress

Handle gzipped indexes externally (needed on RedHat 9 and Fedora Core 1 and 2). This option is a workaround for broken zlib linked into librpm; with enabled 'auto zlib in rpm' poldek tries to detect such case and then enables external *.gz handling automatically.

Default: vfile external compress = no

auto zlib in rpm

Auto detection of zlib linked into librpm. See 'vfile external compress' description.

Default: auto zlib in rpm = yes

autoupa

Automatically download whole index if incremental update fails.

Default: autoupa = yes

exclude path

Do not save given paths into created indexes. This option may significantly reduce index size. Example (notice missing starting '/'):

    exclude path = usr/share/doc:usr/share/man:usr/src
    

Default: exclude path =

File downloaders configuration

vfile ftp sysuser as anon passwd

Send ${USER}@${HOSTNAME} as anonymous FTP password (by default 'poldek@znienacka.net' is sent)

Default: vfile ftp sysuser as anon passwd = no

default fetcher

File getters configuration parameter. By this option URL handlers may be configured. To get file from HTTP and FTP servers poldek uses its internal client (what is recommended), although it can be changedby this option. Others protocols handled by external utilities can be configured also. The syntax is:

     default fetcher = PROTOCOL[,PROTOCOL...]:FETCHER_NAME
     

where FETCHER_NAME is a name of one of the fetcher preconfigured in [fetch] sections (placed in fetch.conf in default configuration). Examples:

     default fetcher = ftp,http:internal
     default fetcher = https:wget
     default fetcher = cdrom:vfjuggle
     

vfjuggle is a cdrom getter supplied with poldek.

Default: default fetcher = http,ftp: internal

proxy

Proxies for internal FTP and HTTP client may be configured in usual way, by environment variables ftp_proxy and http_proxy, or by this option. Its syntax is similar to "default fetcher" one:

    proxy = PROTOCOL[,PROTOCOL...]:PROXY_URL
    

Example:

    proxy = http: http://w3cache.foo.org:8080
    

Default: proxy =

vfile retries

Internal HTTP and FTP client is stubborn, it retries to retrive file if connection breaks. This option tells it how many times it should try.

Default: vfile retries = 128

Installation options

particle install

Install packages in small groups instead of doing all-or-nothing installations.

Default: particle install = yes

keep downloads

Do not remove downloaded packages after its successful installation.

Default: keep downloads = no

unique package names

Controls visibility of multiple package instances with different EVR. If on, only one, highest version will be visible.

Default: unique package names = no

promoteepoch

Epoch autopromotion during dependency comparision. RPM specific. Set it up if you are using system with rpm prior to 4.2.1 version.

Default: promoteepoch = no

confirm installation

Confirm packages installation.

Default: confirm installation = no

confirm removal

Confirm packages removal.

Default: confirm removal = yes

choose equivalents manually

Let the user select package among equivalents.

Default: choose equivalents manually = no

hold

Prevent package listed from being upgraded if they are already installed.

    hold = kernel* dev
    

Default: hold =

ignore

Ignore package list - packages fits given mask will be invisible.

    ignore   = *-smp-* foo*
    

Default: ignore =

allow duplicates

Conflicts with already installed packages are treated as resolved if at least one of multiple-installed package satisfies conflict. rpm doesn't support such cases, so --pm-nodeps is needed (use with care).

Default: allow duplicates = yes

RPM specific options

rpmdef

rpm macros can be set by this option. Examples:

    rpmdef   = _install_langs pl:pl_PL:lt:lt_LT
    

Do not install any documentation:

    rpmdef  = _netsharedpath /usr/share/info:/usr/share/man
    rpmdef  = _excludedocs 1
    

Default: rpmdef =

Dependency processing settings

Subtle dependency processing options, they should not be changed unless you know what you are doing

follow

Automatically install packages required by installed ones.

Default: follow = yes

greedy

Greedy upgrades, i.e. upgrade packages which dependencies are broken by being uninstalled ones.

Default: greedy = yes

aggressive greedy

Be yet more greedy; if successor of orphaned package found, and this successor drags no packages then upgrade the package instead of process its dependencies. Option value is implied by 'greedy' one by defalut.

Default: aggressive greedy = yes

mercy

Be tolerant for unmatched versioned dependencies which rpm tolerates, e.g. package A requires capability foo >= 1.0 while package B provides "foo" without any version. Use with care, it may cause weird dependency errors.

Default: mercy = no

obsoletes

Taking into account package Obsoletes.

Default: obsoletes = yes

conflicts

Taking into account package Conflicts.

Default: conflicts = yes

7.5. Parameters of [source] section

This section contains poldek's repository configuration. Every repository is configured in its own [source] section.

name

Unique name of the repository.

type

Type of repository index. Permitted values are 'pndir', 'pdir', 'apt', 'yum' and 'dir' as listed by --stl switch.

original type

This parameter sets index original type i.e type of repository from what this repository is created. Default is 'dir' - means that directory of packages is scanned.

Default: original type = dir

path

Unique name of the repository. May be either path or URL.

prefix

If package index and packages are stored in different locations then prefix stands for packages path.

douniq

Controls visibility of multiple package instances with different EVR. If on, only one, highest version will be visible.

Default: douniq = no

pri

Repository priority. If the same packages (equal names and EVR) are available in more than one source then package from highest prioritized source are taken. Priority is numeric value. Lower number means higher priority, and negative priorities are allowed. Priority is numeric value.

Default: pri = 0

auto

Controling if repository index will be implicit loaded. Set it off if the index should be loaded on demand only, i.e. if specified directly by --sn option.

Default: auto = yes

autoup

Controls if repository index will be implicit updated. Set it off if the index should be updated on demand only, i.e. if specified directly by --sn option.

Default: autoup = yes

signed

Packages PGP/GPG signatures (if any) will be verified before their installation.

Default: signed = no

hold

Have the same meaning as [global] parameter. Example:

    hold = kernel* dev
    

Default: hold =

ignore

Have the same meaning as [global] parameter. Example:

    ignore = kernel*smp* dev
    

Default: ignore =

exclude path

Parameter have the same meaning as [global] parameter.

    exclude path = usr/share/doc:usr/share/man:usr/src
    

Default: exclude path =

lang

Preferred language of package descriptions. If not set, taken from locale settings. Example:

    lang = pl_PL:lt_LT
    

7.6. Parameters of [fetcher] section

This section contains external downloaders configuration. Each section describes one fetcher.

name

Unique name of the fetcher. This is an optional parameter, if not set then name is taken from the "cmd" parameter value as "$(basename $cmd)".

proto

Protocol or protocols supported by fetcher. Name of the protocol can be completely arbitrary, i.e. if you can handle protocol "foo" by writing a script which takes URLs in form 'foo://'.

cmd

Parameter specifies an external command and its invoking syntax. The syntax of "cmd" is:

    cmd = COMMAND [ OPTION... ] {%d,%D}  {%p,%P}[n]
    

Where COMMAND is the name or full path of command, OPTION is command specific options. Macro '%d' is replaced with cache directory, '%D' is replaced with 'cache directory/file basename', and '%p' with file basename, %P with file full path (URL). Optional suffix 'n' with %p and %P means that command can be invoked with multiple files at once.

A. Package priorities configuration sample

# $Id: poldek-pri-sample.conf,v 1.2 2005/04/21 16:44:49 mis Exp $
# By default all packages have 0 priority value. Packages specified by mask 
# only (e.g. quota below) have -1 priority.
# 
# MASK [PRI]

quota
vim		
postfix
geninitrd
kernel
FHS
gcc 
xemacs*
xmms
rpm
poldek                  -100
vim-static              -10
# low priorities

XFree86*                10
lesstif			10
kde*			100
gnome*			100
Atari800*		200
MHonArc*                100
Glide*			100
*-devel*                2 
*-static* 		100