pcp
[Top] [All Lists]

Re: pcp updates - compilation warning and configuration files in packagi

To: "Frank Ch. Eigler" <fche@xxxxxxxxxx>
Subject: Re: pcp updates - compilation warning and configuration files in packaging
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Sun, 16 Dec 2012 06:44:03 +1100
Cc: pcp@xxxxxxxxxxx
In-reply-to: <20121125220602.GE32625@xxxxxxxxxx>
References: <1353702995.2573.10.camel@xxxxxxxxxxxxxxxxxxxxxxx> <y0m38zyvnkp.fsf@xxxxxxxx> <1353787979.2573.43.camel@xxxxxxxxxxxxxxxxxxxxxxx> <20121125020818.GC32625@xxxxxxxxxx> <1353873879.2573.65.camel@xxxxxxxxxxxxxxxxxxxxxxx> <20121125220602.GE32625@xxxxxxxxxx>
I'm back considering this change ...

        OPTION A
        
        Introduce $PCP_SYSCONF_DIR to expose $sysconfdir via pcp.conf
        and then move everything currently below
        $PCP_VAR_DIR/config/<foo> to
        $PCP_SYSCONF_DIR/<foo>.

and ...

On Sun, 2012-11-25 at 17:06 -0500, Frank Ch. Eigler wrote:

> One tricky aspect could require some packaging scripting, that being
> the migration of config files from the old to the new locations.

I have two questions for the gallery ...

1. Should the default setting for $PCP_SYSCONF_DIR be /etc or /etc/pcp.
The former would lead to a bunch of dirs in /etc,
e.g. /etc/pmcd, /etc/pmlogger, /etc/pmie ...  The latter would aggregate
all the PCP config files below /etc/pcp, so we'd have directories
like /etc/pcp/pmcd, /etc/pcp/pmlogger, /etc/pcp/pmie ...

I prefer collecting all these directories below /etc/pcp and minimizing
the name pollution (and possible collisions) in /etc.

2. Just how should the migration work?  My initial thought is that as a
_pre_ install task we ...

        For each config directory in the current package consider the
        list if directories where we've hidden the equivalent config
        files in the past (but not the current config directory) ... so
        if we're setting up /etc/pcp/pmcd we'd
        consider /var/lib/pcp/config/pmcd and /etc/pmcd
        and /etc/sysconfig/pmcd

        For each file in each of these directories do the following:
        - if the file is not in the new directory, copy it into the new
        directory, else if the file is _newer_ (more recently modified)
        than the file in the new directory, copy it to the new directory
        - delete the file from the old directory
        
        Try to delete the old directory.
        
The idea is (a) to get the latest version into the place where the
installation is going to happen so it will be replaced or shuffled
around if modified config files are being saved/kept and (b) clean up
some of the mess we've left behind in the past.

Thoughts?

<Prev in Thread] Current Thread [Next in Thread>