Slashdot Mirror


Linux Distros with CVS/RCS for Config Files?

bergeron76 asks: "Does anyone know of a Linux distributions or modifications to a Linux d system that implement a CVS[like] structure for control over system configuration files (/etc, /usr/etc, and so on)? Personally, I'd love to see a distro that featured a native CVS/RCS control mechanism for editing system configuration files. Does anything like this currently exist? If not, is anyone working in this direction?"

13 of 36 comments (clear)

  1. Gentoo does this. by djcapelis · · Score: 3, Informative

    Gentoo offers several choices in managing the configuration files in /etc, one of these options is the dispatch-conf script which keeps all changes in RCS. This is mostly for updating... so it's not everything, but it's definately a strong start and you could likely use the same system to keep track of your own modifications.

    --
    I touch computers in naughty places
    1. Re:Gentoo does this. by jnana · · Score: 2, Informative

      Yes, dispatch-conf in combination with RCS is great. You can use it to manage config updates for whatever config files you want. You just need to put anything other than /etc in the CONFIG_PROTECT variable. Another great thing about dispatch-conf is that it can be easily configured to auto-update the configuration files if only CVS headers are different, or there are no differences but whitespace and comments. Definitely a big quantum leap above etc-update.

  2. Nothing is stopping you from doing this. by Feztaa · · Score: 4, Informative

    Just go into your /etc/, do a 'mkdir RCS', and then start checking your config files in and out of RCS to edit them. There's no code anywhere in linux that says 'if there's a directory I don't recognize, then crash spectacularly', so just adding the RCS directory itself isn't going to adversely affect anything.

    That's actually a really good idea, too, I'm not sure why I never thought of it myself...

    1. Re:Nothing is stopping you from doing this. by Atzanteol · · Score: 4, Informative

      There's no code anywhere in linux that says 'if there's a directory I don't recognize, then crash spectacularly'

      I beg to differ... I had an issue just last week where I tried checking /etc into a CVS repository. It turns out that /etc/devfs.d/ doesn't like *anything* in it that doesn't belong (like a CVS directory). This caused /dev to be very slim upon a reboot, and things like 'hda' et al were missing.

      Now, I'm not sure if this is purely a Gentoo issue or not (I'm not terribly familiar with devfs), but it's something to remember. Back up /etc/ before doing ANYTHING! lesson learned... :-)

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    2. Re:Nothing is stopping you from doing this. by Feztaa · · Score: 2, Interesting

      In that case, devfs is broken. IMHO, programs should just look for the files that they need and ignore anything extra, that's the best way (provides the leanest code and the most flexible software... what's the point of adding code that says 'if (extra files) { die; }'? That doesn't accomplish anything).

    3. Re:Nothing is stopping you from doing this. by Atzanteol · · Score: 2, Informative

      Well, from what I hear devfs is broken, but I think for different reasons. I doubt the kernel dev's put 'if(extra files) { die; }' in their code. It's probably something like 'for each file in dir; do something ; done', where each file is supposed to 'mean something'. Thus if a file (or directory) in the dir is 'configured wrong', bad things happen.

      It really messed me up for a couple days though, I'll tell ya that.

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    4. Re:Nothing is stopping you from doing this. by Ed+Avis · · Score: 2, Insightful

      In general, directories ending in '.d' are magic - a program looks at every file in the directory, rather than expecting a certain fixed set of filenames. For example under init.d for the various runlevels every file is run in sequence.

      The '.d' on the directory name tells you not to put random extra files in there. Apart from those directories, you can follow the rule that extra files won't break anything.

      --
      -- Ed Avis ed@membled.com
  3. works for my user accounts by x00101010x · · Score: 4, Interesting

    I keep my entire home directory in a Subversion repository. Works great for linux and my windows boxes. Firefox and thunderbird user directories are compatible across platforms.
    I just add 'svn up' to my login script and 'svn ci --message "%HOST%@%TIME%%DATE%"' to my logout script.
    No reason it shouldn't work for a whole system with an initial 'svn up' somewhere in rc.local and periodic updates in a chron job. Just do a commit whenever you change things on your template system and 5 minutes later it'll be on all your boxen.

    There was a slashdot article about putting a home directory under version control a few months ago from which I got the idea, too lazy to find the link at the moment though.

    --
    DONT PANIC
  4. Yes, Gentoo... by andrewdk · · Score: 2, Informative

    YEs, Gentoo can do this. Just emerge rcs, make an /etc/config-archive dir, setup /etc/dispatch-conf.conf, and just do dispatch-conf in place of etc-update.

  5. An old idea for modern times... by Deagol · · Score: 2, Insightful
    I think it was OpenVMS (fuzzy memories of a freshman computer class) that had version control built into the filesystem. I'm amazed that this hasn't been introduced into the more popular filesystem(s) yet. I've wished for it on many occasions.

    Or am I just being impatient? Will Reiser4 provide this capability?

    1. Re:An old idea for modern times... by yabHuj · · Score: 2, Interesting

      Yeah, it was with VMS and its smaller brother RSX-11M+ (and probably derivates). Each file got an additional "dot number" appended. A full (!) copy was saved (with raised number) each time the file was written. Accessing the file without version number simply gave you the currentmost one.

      But with running low on disk space all the time (those were the days when a hard disc had 5MB = five MegaBytes total capacity) , frequent use of the PURGE command erased all old copies quite often too early...

  6. FreeBSD by Scythe0r · · Score: 2, Interesting

    You should really check out a utility for FreeBSD called mergemaster. You run it after rebuilding/upgrading your system and it compares the latest "vanilla" system configuration files to what you've got.

    You can choose to overwrite your file, keep your file or merge the two together. I like to think of it as the ultimate choice in system housekeeping.

  7. cfengine by bandix · · Score: 2, Informative

    You'll spend years fooling around with RCS and CVS for configuration versioning before realizing that what you really need is cfengine. CVS or svn for source code, cfengine for configuration. Cut to the chase:

    http://www.cfengine.org/

    --
    Brandon D. Valentine