Gentoo Archives: gentoo-dev

From: Matt Tucker <tuck@×××××××××××××.net>
To: Joseph Carter <knghtbrd@×××.org>
Cc: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Portage config auto-update
Date: Fri, 07 Feb 2003 17:41:46
Message-Id: 70430000.1044639219@dsl231-045-162.sea1.dsl.speakeasy.net
In Reply to: Re: [gentoo-dev] Portage config auto-update by Joseph Carter
1 -- Joseph Carter <knghtbrd@×××.org> spake thusly:
2
3 > Very cool. This is almost enough to actually use CVS for files in
4 > /etc, or at least RCS.
5 I actually briefly considered using CVS (several other people have
6 mentioned it, and I actually use CVS myself to maintain config files),
7 but discarded the idea because it didn't seem necessary. However, I'd
8 be willing to reconsider it if there's a strong demand for it. In that
9 light, I'll answer a bit of what you had to say.
10
11
12 > The reason why RCS might be needed instead of CVS is illustrated
13 > using file:
14 <snip>
15 > Note that CVS is not fond of symlinks, but tollerates them as long as
16 > they are not in the CVS database. Suggest two trivial functions to
17 > manage this: one which prunes nonexistant files from .cvsignore, and
18 > one which ensures that any symlinks get listed.
19
20 Symlinks could also be handled by doing a little shuffle behind the
21 scenes before bringing CVS into the picture. If a symlink is
22 encountered that needs to be committed, updated, etc, simply move it
23 out of the way temporarily, put the destination in it's place, invoke
24 CVS, then move everything back. This would be a pain for a user to do
25 each time, but it's no problem for a script.
26
27
28 > CVS does not gracefully cope with binary data. Obviously certain
29 > files here are generated automatically and would also get
30 > .cvsignore'd. ELF binaries have absolutely zero place in /etc,
31 > according to the FHS, however.
32
33 Sure they don't belong there, but it happens anyway.
34
35 I think CVS copes with them well enough; it'll store the things, but
36 refuse to merge them. But I don't attempt to merge binaries either
37 (what would be the point)? I think it would still make sense to keep
38 the original around for comparison, just as I'm doing now.
39
40
41 > RCS would allow config file management without dealing with these
42 > issues since you'd only maintain RCS files for those things you
43 > actually care about. I would consider this more a bandaid though, I
44 > would prefer that etc-update have a config option to maintain
45 > .cvsignore files for you so that your CONFIG_PROTECT directories may
46 > trivially be stored in CVS, using a helper tool which a sysadmin can
47 > use themselves if they like. In this way, etc-update would merge
48 > changes into a temp file, let you edit it, and then overwrite your
49 > existing file as an atomic operation. When you're done, check the
50 > results into CVS for safe-keeping.
51 >
52 > CVS vendor tags are also an option, however they are more complex to
53 > work with in my experience and fewer people will be able to do it
54 > well. Doing the merge into the working copy in the CONFIG_PROTECT'd
55 > directory is probably easier for people. If the files are also
56 > checked in with a vendor tag, that'll just make it easier for tools
57 > an sysadmins which grok more advanced CVS usage.
58
59 That makes perfect sense, actually. If the file is modified, bring the
60 new config versions in on a branch with a vendor tag, and then merge
61 back into the trunk.
62
63
64 > I haven't yet looked over your patch extensively (and do not trust
65 > myself to not screw something up at this hour), but I figured I'd
66 > offer my comments anyway. Take them with a Syberian salt mine if
67 > they seem to be missing something obvious. =)
68
69 Thanks for your comments. As I said, I'll definitely look at revisiting
70 the CVS idea if there's demand for it. If we end up doing it, it'll be
71 made easier by having the config_protect handling broken out the way it
72 is now.
73
74
75
76 --
77 gentoo-dev@g.o mailing list