Gentoo Archives: gentoo-dev

From: Guy Martin <gmsoft@g.o>
To: Joerg Hoh <joerg@××××××.org>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: extension of etc-update
Date: Tue, 10 Aug 2004 10:51:15
Message-Id: 20040810124859.20ffb0ea.gmsoft@gentoo.org
In Reply to: [gentoo-dev] RFC: extension of etc-update by Joerg Hoh
1 Hi,
2
3 I've wrote a similar thing.
4 Btw it's more a quick hack than a complete end-user solution but it
5 works fine.
6
7 http://dev.gentoo.org/~gmsoft/tools/gm-etc-update
8
9 To use it you _MUST_ first have a clean system and run it once.
10 That means no file have to be updated via etc-update when you run it for
11 the first time because it have to build the MD5 database.
12
13 Once this is done, simply run it but beware :
14 -It will update unmodified files without asking
15 -It will update "trivial updates" withour asking
16 -It may not be bugless but I use it on ~10 box here and it always worked
17 as expected
18
19 Enjoy :)
20
21
22 On Tue, 10 Aug 2004 12:43:26 +0200
23 "Joerg Hoh" <joerg@××××××.org> wrote:
24
25 >
26 > Hi
27 >
28 > I'm unhappy with the etc-update script. In my eyes it lacks at least
29 > one necessary feature:
30 >
31 > Detection of unmodified config-files
32 >
33 > When I recently updated my sytem, it gave me more than 200 files to
34 > look at. That is impossible, since in most cases I never heard of such
35 > a file(and therefor I don't undestand what that file means). So I did
36 > a quick look over the list, found nothing relevant to me and and did
37 > "-5". Well, after that I wonderd why my mails were rejected. Oh, I've
38 > overseen/etc/ssmtp.conf! Bad thing, with the default config it doesn't
39 > work.
40 >
41 > My proposal is that we keep a list of configfiles and their md5
42 > hashes. etc-update maintains this list. We now have several cases:
43 >
44 > * etc-update detects that we emerged a package which wasn't present
45 > and we
46 > have new config files. So etc-update does the md5-hashing and puts
47 > the hash into the hash-file.
48 > * etc-update want's to install a new config-file and an
49 > config-file is already present. Then it hashes the present
50 > config-file and compares the hash to the hash already present in the
51 > hash-file.- If the hashes differs, it asks the user what to do (as
52 > it now happens
53 > with every config-file). If the user wants to replace the old,
54 > user-modified config-file with the new one, the hash for the new
55 > config-file is written to the hash-file.
56 > - If the hashes are identical, it replaces the old config-file with
57 > the
58 > new one and updates the hash-file.
59 >
60 > I've looked at the etc-update script, but since I'm not good at
61 > shell-scripting, I decided to rewrite it in python. Not all is done
62 > yet, and I don't wanto to do unneeded work if someone wants to enhance
63 > the shell-script.
64 >
65 > You find my python version at http://www.devone.org/linux/gentoo.html
66 >
67 > Another extension would be versioning of configuration files via
68 > cvs/rcs, subversion or arch. But I had to do some more work on that
69 > ...
70 >
71 > Joerg, mostly happy gentoo user
72 >
73 >
74 > --
75 > Fachbegriffe der Informatik (Nr 152): PORN
76 > - Poster Ohne Richtigen Namen
77 >
78 >
79
80
81 --
82 Guy Martin
83 Gentoo Linux - HPPA port Lead / IPv6 team
84 Lug Charleroi (Belgium)