/epkg

Here I present a simple bug fix to epkg, the encap-based generic package manager. The problem was that it was setting the umask before creating files and directories.

Primary LanguageCOtherNOASSERTION

epkg - Encap Package Manager
====

epkg (pronounced like the letter 'E' and the word "package") is a fast
and flexible package management tool.  Here are some of its features:

  * Supports Encap package format versions 1.0, 1.1, 2.0, and 2.1.
  * Can manage multiple versions of the same package, so you can upgrade
    without removing files.
  * Provides both batch and single-package modes.
  * Automatically extracts tar archives for easy package installation.
  * Logs package installation and removal.
  * Optional support for retrieving packages via FTP or HTTP for one-step
    package installation.
  * Optional support for package profile format to automate package
    creation.

If you've used previous versions of epkg, see the NEWS file for a list
of new features and changes.


Installation
------------

To build epkg, you should be able to simply run these commands:

   ./configure
   make
   make install

I highly recommend configuring epkg with support for libexpat, libtar,
zlib, curl, and libfget.  See below for more information.


Building with gcc
-----------------

If you build epkg using a compiler from an Encap package (such as gcc),
the configure script may print a warning about necessary changes to the
mkencap_environment file.  This file is read by mkencap to set environment
variables used when processing package profiles, and the configure script
tailors it based on which C compiler you use to build epkg.

I recommend using your vendor compiler instead of gcc (except under
Linux, where gcc *is* the vendor compiler).  This avoids the following
problems:

 * gcc generates its own copies of the system header files, which can
   get out of sync if the header files are patched after gcc is installed.

 * When generating static libraries, gcc often builds code that depends
   on libgcc.a.  This means that any other code that you link against
   that library also needs to be built with gcc.  (Actually, you can
   usually manually add libgcc.a to the link line, but that can be
   fairly tedious.)

 * By default, gcc looks in /usr/local/include for header files.  This
   means that your package profiles will have no control over which
   other packages they use header files from.

 * In order to avoid unwanted dependencies on binaries from other Encap
   packages, it's best to not have ${ENCAP_TARGET}/bin in your PATH when
   invoking a configure script.  However, if you use gcc from an Encap
   package, you need ${ENCAP_TARGET}/bin in your PATH in order to find
   gcc.

If you build epkg with your vendor compiler, you should be able to use
the mkencap_environment file generated by the configure script without
modification.  If you use gcc, you may need to modify it after running
"make install".


Installation Prefix
-------------------

As you'd expect, epkg is normally built as an Encap package.  If for
some reason you'd like to install it in a non-Encap directory, you can
specify the --disable-encap option to configure.

When building an Encap package, the configure script will automatically
adjust the installation prefix to use an appropriate Encap package
directory.  It does this using a heuristic algorithm which examines the
values of the ${ENCAP_SOURCE} and ${ENCAP_TARGET} environment variables
and the argument to configure's --prefix option.

The mkencap program will be automatically run during "make install".
By default, epkg will also be run, but this can be inhibited with the
--disable-epkg-install configure option.


libtar Support
--------------

If you wish to build epkg with native tar support, you will need to
install the libtar library before running configure.  The libtar package
is available from:

   http://www.feep.net/libtar/

You need libtar-1.2 or newer.  Older versions may not work.

The configure script will automatically detect libtar if it is present
on the system.  If you have libtar installed but do not wish to use it
for some reason, specify the --without-libtar option when you invoke
configure.

Note: If you build epkg without libtar support, it will attempt to find
an external tar binary at run-time by looking in the PATH.


zlib Support
------------

If you wish to build epkg with native gzip support, you will need to
install the zlib library before running configure.  The zlib package
is available from:

   http://www.gzip.org/zlib/

The configure script will automatically detect zlib if it is present on
the system.  If you have zlib installed but do not wish to use it for
some reason, specify the --without-zlib option when you invoke configure.

Note: If you build epkg without zlib support, it will attempt to find
an external gzip binary at run-time by looking in the PATH.


libfget Support
---------------

If you wish to build epkg with native FTP support, you will need to
install the libfget library before running configure.  The fget package
is available from:

   http://www.feep.net/fget/

You need fget-1.3.0 or newer.  Older versions will not work.

The configure script will automatically detect libfget if it is present
on the system.  If you have libfget installed but do not wish to use it
for some reason, specify the --without-libfget option when you invoke
configure.

Note: If you build epkg without libfget support, it will not have the
ability to install packages directly from a remote FTP server.


libcurl Support
---------------

If you wish to build epkg with native HTTP support, you will need to
install the libcurl library before running configure.  The curl package
is available from:

   http://curl.haxx.se/

You need curl-7.9.8 or newer.  Older versions may not work.

The configure script will automatically detect libcurl if it is present
on the system.  If you have libcurl installed but do not wish to use it
for some reason, specify the --without-libcurl option when you invoke
configure.

Note: If you build epkg without libcurl support, it will not have the
ability to install packages directly from a remote HTTP server.


libexpat Support
----------------

If you wish to build mkencap with support for Encap package profiles,
you will need to install the expat library before running configure.
The expat package is available from:

   http://expat.sourceforge.net/

The configure script will automatically detect libexpat if it is present
on the system.  If you have libexpat installed but do not wish to use it
for some reason, specify the --without-libexpat option when you invoke
configure.

Note: If you build epkg without libexpat support, it will not have the
ability to process Encap package profiles.



GNU m4
------

In order to use package profiles, you must have GNU m4 installed, since
mkencap uses it to preprocess the profile.  The GNU m4 package is
available from:

   ftp://ftp.gnu.org/gnu/m4/

Note that you need GNU m4 at run-time, but it does not need to be
present when epkg is being built.



epkg Defaults
-------------

The configure script supports several options that allow you to change
epkg's builtin defaults:

  --with-encap-source=PATH    Set default Encap source directory
  --with-encap-target=PATH    Set default Encap target directory
  --with-excludes=LIST        Set default exclude directories
  --with-overrides=LIST       Set default override list

There are also several options that allow you to change mkencap's
builtin defaults:

  --with-download-dir=DIR     Set default download directory
  --with-build-tree=DIR       Set default build tree
  --with-common-src-tree=DIR  Set default common source tree

Values specified for LIST should be seperated by ':' characters.


Supported Platforms
-------------------

I develop and test epkg under RedHat Linux 9.  I would like to test it
under other platforms, but I no longer have access to other types of
machines.  If you would like me to test new epkg releases on a different
platform and are able to give me an account on a machine where I can
test it, please send me email (email address below).

The epkg code was reported at one time or another to build properly on
the following platforms, but I can not currently support them:

   AIX 3.2.5, 4.2.1, 4.3.3, and 5.1
   BeOS
   CYGWIN 1.1.2
   FreeBSD
   HP-UX 10.20, 11.00
   IRIX 6.5
   Linux/libc5
   RedHat Linux 6.x, 7.x, 8, 9
   Mac OS X
   OpenBSD
   Solaris 2.5, 2.6, 7, 8, and 9

If you successfully build epkg on another platform, please email me a
patch and/or configuration information.


Compatibility Code
------------------

epkg depends on some library calls which are not available or not
usable on some platforms.  To accomodate these systems, I've included
a version of these calls in the compat subdirectory.

I've slightly modified these functions for integration into this source
tree, but the functionality has not been modified from the original
source.  Please note that while this code should work for you, I didn't
write it, so please don't send me bug reports on it.


More Information
----------------

For details on how to use epkg, see the enclosed manpage.

For more information on the Encap Package Management System in general
or epkg in specific, see the following webpages:

  Encap Archive:		http://www.encap.org/
  epkg Home Site:		http://www.encap.org/epkg/

There are also two mailing lists for Encap:

  Mailing List		Description
  --------------------------------------------------------------
  encap-users		General discussion about Encap
  encap-dev		Discussion about Encap development

For instructions on how to subscribe to these mailing lists, please see
the Encap Archive web site.


Reporting Bugs
--------------

I encourage bug reports from users of epkg, since I can't fix it unless
I know it's broken.  Please include as much of the following information
as possible in your bug reports:

   * the output of "epkg -V"
   * the exact epkg commandline that you executed
   * the complete output from epkg
   * an "ls -laFR" of the relevant package directories
   * the contents of any relevant encapinfo files

It's preferred to send bug reports to the encap-dev mailing list, but
they'll also get to the right place if you send them to me directly.


Author
------

Feedback welcome.

Mark D. Roth <roth@feep.net>