Gentoo Archives: gentoo-user

From: Rumen Yotov <rumen@××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Handling of config updates, RFC
Date: Sun, 12 Feb 2006 13:58:04
Message-Id: 1139752368.12514.4.camel@mach.qrypto.org
In Reply to: [gentoo-user] Handling of config updates, RFC by Maarten
1 On Sun, 2006-02-12 at 14:37 +0100, Maarten wrote:
2 > Hi
3 >
4 > I have not been impressed by the handling of configfiles (updating them)
5 > by neither etc-update nor dispatch-conf, so I pondered on an
6 > alternative. Not an alternative to those packages, but some extra help,
7 > possibly integrated into one of those tools. Please bear with me...
8 >
9 > What tickles me the most about the current process is that one sometimes
10 > gets huge lists of updated files by updating a single package. A package
11 > which may have never been used, or at least configured, by the user.
12 > For instance, updating webmin, or snort, yields many many ._cfg files an
13 > average user knows little about, and does not care about since he never
14 > tweaked them. In other words, they are in their distibution-default
15 > state, never edited. It stands to reason everyone would want all those
16 > files overwritten by the new ones, is it not ? Well, neither tool does
17 > that now. The user is left with two options to handle the task:
18 > 1) Pick out all non-trivial files in a massive list of over 150 files,
19 > merge those, and after due consideration have dispatch-conf do all the
20 > remaining files automatically. (I suspect this is what most people do)
21 > 2) Go through all the files step by step and choose either overwrite or
22 > skip as fast as possible, and re-run the tool on the remaining files,
23 > and this time carefully decide what to do with it, overwrite, shred, or
24 > merge.
25 > Well, neither is comfortable. Especially since 'trivial merges' like
26 > CVS- or revision info are advertized as being dealt with, but in reality
27 > are often not. I cannot tell you how many 'changes' I get confronted
28 > with are just trivial changes (like added commentary, and so on)
29 >
30 >
31 > I propose to add an additional mechanism to 'see' whether a file was
32 > actively changed during the lifetime of the machine, by a very simple
33 > and dumb means, but nevertheless a very effective one.
34 > This would work like this: upon extraction of the stage tarball (or at
35 > least very very early in the install process) one should set all the
36 > dates of all the potential configfiles to a set date in the (distant)
37 > past. Let's say, feb 29 1988. Only thereafter, we start configuring the
38 > system, editing fstab, hostname, etc.
39 >
40 > Now when we run dispatch-conf, it will first check the date of the file
41 > that corresponds with a ._cfg file. If that file has that magic date,
42 > overwrite it by the new file, and (this is important) re-set the date of
43 > that new file to that old magic date. The user thus needn't be bothered
44 > by numerous files he didn't touch, and a very significant time-saving is
45 > realized for everyone.
46 >
47 > If I'm not mistaken, other distributions have had solutions like this
48 > for ages. For instance, SuSE's YaST had/has a way to see if a user
49 > touched the configfile, and refuses to touch it if it found out the user
50 > had changed it manually. (Not a very succesful strategy for people who
51 > routinely did edit the files, but considering all that, it was still not
52 > bad.
53 >
54 > ...What do you think ? Has this idea been suggested before ?
55 > Wouldn't this make the updating a much less painful process ?
56 > What, if any, would be possible pitfalls using this approach ?
57 >
58 > Thank you for your time reading this,
59 >
60 > Maarten v d Berg
61 >
62 Hi,
63 Check "cfg-update" it's in portage, and i think it the better.
64 i'm using it together with "dispatch-conf" but think if switching
65 completely to 'cfg-update' (or mostly at least).
66 Check the forums for additional info (features, history etc.)
67 HTH.Rumen

Attachments

File name MIME type
smime.p7s application/x-pkcs7-signature

Replies

Subject Author
Re: [gentoo-user] Handling of config updates, RFC Maarten <gentoo@××××××××.org>