epkg

Section: Package Management (1)
Updated: Jun 11 1998
Index
 

NAME

epkg - encap package manager  

SYNOPSIS

epkg [-Vvqfaexl] [-t target_dir] [-s source_dir] -c|-b|-u

epkg [-Vvqfaexl] [-t target_dir] [-s source_dir] -U|-i|-r pkgname ...  

VERSION

This man page documents version 0.4beta of epkg.  

DESCRIPTION

epkg is a package manager which is based upon the encap software management system, but provides many useful extentions. In the encap system, each package is kept in its own package directory (usually /usr/local/encap/pkgname), rooted under the encap source directory (usually /usr/local/encap). Symbolic links to these files are maintained in the encap target directory (usually /usr/local), so that the packaging system is completely transparent to the users.

For example, when installing tcsh, you would install the following files:


  /usr/local/encap/tcsh-6.07.02/bin/tcsh
  /usr/local/encap/tcsh-6.07.02/man/man1/tcsh.1

epkg would create the following symbolic links:


  /usr/local/bin/tcsh -> ../../encap/tcsh-6.07.02/bin/tcsh
  /usr/local/man/man1/tcsh.1 -> ../../encap/tcsh-6.07.02/man/man1/tcsh.1

Thus, the user would be able to run /usr/local/bin/tcsh transparently.  

PACKAGE MODES

epkg has several operating modes, but only one may be used at once. If more than one of these options are passed, epkg will print out its usage and exit.
-c
Clean package mode. This will recursively go through the target encap directory and remove any dangling symbolic links which point under the encap source directory. This is automaticly done in batch package mode (see below), but it can also be done by itself.
-b
Batch package mode. epkg will invoke clean mode on the encap target directory and then install every package in the encap source directory.
-u
Update package mode. epkg will scan all of the packages in the encap source directory to determine the latest version of each package. Then, any old versions of each package will be removed and the latest version will be installed.
-r
Remove package mode. epkg will remove the package(s) listed on the commandline.
-i
Individual package mode. epkg will install the package(s) listed on the commandline.
-U
Update specific package mode. This is a hybrid of individual mode and update mode. It scans for all versions of each package listed on the commandline, and for each package it removes the older versions and installs the latest version. If no package mode is specified when packages are listed on the commandline, specific-update mode is assumed.
 

OPTIONS

-V
Print version information.
-v
Be verbose. This provides slightly more output than the default.
-q
Quiet mode. epkg will not produce any output except for error messages.
-f
Force conflict resolution mode. If a file already exists when epkg attempts to create a link, it will be removed so that the link can be created.
-a
Use absolute symlinks. The default is to use relative links.
-e
Don't execute package scripts. See ENCAP EXTENTIONS below.
-x
Ignore all encap.exclude files.
-l
Disable transaction logging. When this is not specified, epkg will log an entry to the file epkg.log in the encap source directory for each transaction indicating the date, target directory, package, install or remove as appropriate, and the status. The status is success if completely successful, failed if there was a fatal error, forced if invoked in force mode (see above), or partial if the operation was partially successful (for example, most of the links were created, but some could not be created because of a link by the same name into a previously-installed package).
-t target_dir
Tells epkg to use target_dir as the encap target directory. If this is not specified, epkg will check the contents of the ENCAP_TARGET environment variable. If that is not set, it will use the default set at compile-time (usually /usr/local).
-s source_dir
Tells epkg to use source_dir as the encap source directory. If this is not specified, epkg will check the contents of the ENCAP_SOURCE environment variable. If that is not set, it will use the default set at compile-time (usually /usr/local/encap).
 

COMPATIBILITY

epkg does not retain full compatibility with other encap package managers, but it does support a combination of options which perform a very similar function. If invoked as encap, epkg will assume the flags -vbeal. If invoked as encapper, it will assume -qieal.

Like encap, but unlike encapper, epkg will not link in any normal files in the package directory itself. This allows for the placement of READMEs or package documentation which does not need to be linked to the target directory itself.

epkg will, by default, use relative symbolic links instead of absolute links. Thus, if the source and target directories are on the same filesystem, changing the mount point for that filesystem will not invalidate the target links.

In clean mode, epkg will recursively go through every subdirectory of the target directory, not just the ones on a preset list. It does, however, take care not to enter the source directory, which often lies under the target directory.

In terms of output, epkg will by default provide something similar to encapper's verbose mode: it lists package names, actions (creating or removing links or directories), conflict warnings, and error messages. In quiet mode, it will output only error messages. In verbose mode, it will output a larger amount of information, similar to encap.  

ENCAP EXTENTIONS

The most notable extention to the classic encap package format is the addition of four optional package scripts which live in the package directory. The ENCAP_SOURCE and ENCAP_TARGET environment variables are set and inheritted by these scriopts so that they know where the package they are from has been installed.
preinstall
This is executed before the package is linked in (for example, to check for prerequisites).
postinstall
This is executed after the package is linked in (for example, to make the system aware of a newly installed shared library or to create an ssh host key).
preremove
This is executed before the package is removed (for example, to make sure no other packages depend on the package being removed).
postremove
This is executed after the package is removed (for example, to make the system aware that a shared library has been removed).

 

EXAMPLES

To make epkg behave like the perl encap program:

        epkg -vbeal

To make epkg behave like the C encapper program:

        epkg -qieal pkgname ... (to add)

        epkg -qreal pkgname ... (to remove)
 

BUGS

Probably quite a few. Reports are welcome.  

HISTORY

The encap system evolved from a much older variant called the acsl system. The first encap scripts were written in ksh, but these were quickly abandoned when the first perl versions were created.

At the time of this writing, there are two commonly-used encap managers: Jason Wessel's perl version (ftp://uiarchive.uiuc.edu/pub/encap/encap.html) and Brian Swetland's C version (http://www.frotz.net/~swetland/code/encapper.c). The goal of epkg is to create the best of both worlds by taking the useful features from each of these implementations and adding on a number of new extentions.  

ENVIRONMENT VARIABLES

ENCAP_SOURCE

ENCAP_TARGET  

FILES

/usr/local/encap/pkgname/encap.exclude

/usr/local/encap/pkgname/preinstall

/usr/local/encap/pkgname/postinstall

/usr/local/encap/pkgname/preremove

/usr/local/encap/pkgname/postremove

 

AUTHOR

Mark D. Roth (roth@uiuc.edu)
 

Index

NAME
SYNOPSIS
VERSION
DESCRIPTION
PACKAGE MODES
OPTIONS
COMPATIBILITY
ENCAP EXTENTIONS
EXAMPLES
BUGS
HISTORY
ENVIRONMENT VARIABLES
FILES
AUTHOR

This document was created by man2html, using the manual pages.
Time: 02:59:05 GMT, July 22, 1998