Subject: Re: An idea: pkg_setup (was Re: [SoC] pkg_install rewrite)
To: Julio M. Merino Vidal <jmmv84@gmail.com>
From: Volker A. Brandt <vab@bb-c.de>
List: tech-pkg
Date: 05/08/2006 20:33:28
Julio M. Merino Vidal writes:
> The idea is to:
> 1) Have a way to avoid most of the install scripts by having a
> declarative configuration file for each package.

Yes!  There should only be one single file to describe the
contents of the package (manifest, b-o-m, pkgmap, whatever).
I think it could be in XML format.

> 2) Be able to easily configure the behavior of these pre/post install
> tasks from an administrator's POV.

There should be site/platform/host/user-specific defaults.

> 3) Allow for -- possible interactive -- package configuration after
> install, similar to debconf.

The config should be scriptable, and possibly configure all components
of a metapackage in one go.

> As a simple example, imagine a utility that knows how to register rc.d
> scripts and how to register system users and groups.
[...]

Your example illustrates your point.  But the devil is in the details.
You would basically assemble a repository of "package-add task modules".
While this is superior to having these tasks as scripts within the
package(s) to be installed, these "modules" will be versioned, some might
be MD or OS-rev dependent, or whatever.  You are moving the maintenance
of these "modules" away from the package maintainer and towards the
package admin tools maintainer.  The maintenance load does not go
away, however.

I am not sure if this is such a good thing.  I guess everything is
easier if install scripts are left in the package where the maintainer
of the actual software to be packaged has everything under control
and can optimize and tune things.

Maybe we need a special "install-only" sh that is really only a subset
of the real sh and grants or denies install script commands as per
a set of rules predefined by the admin, or queries interactively.

Just some food for thought...


Cheers -- Volker
-- 
------------------------------------------------------------------------
Volker A. Brandt                  Consulting and Support for Sun Solaris
Brandt & Brandt Computer GmbH              WWW: http://www.bb-c.de/~vab/
Meckenheim, Germany                                   Email: vab@bb-c.de