Dispatch-conf is an alternative to etc-update. Gentoo's dispatch-conf can use "RCS" (revision control system).
RCS is cool because it stores all the past versions of your Linux config files (in /etc) when you replace/delete/merge them (using dispatch-conf) with the new, default ones that come when you update a package. With dispatch-conf, you can restore any past version, or merge an old version with the current version. It is what CVS uses underneath and is often used for working on source code. Using dispatch-conf with is outlined here: http://gentoo-wiki.com/TIP_dispatch-conf
RCS info is available in it's man pages (see "man rcs" for the main info plus related programs) and at it's official GNU website...
http://www.gnu.org/software/rcs/
Unfortunately, there is a lack of easy RCS tutorials, except:
http://www.linux-tutorial.info/modules.php?name=Howto&pagename=RCS/RCS.html#toc8
Some guidance is here...
- dispatch-conf stores old versions of your config files in /etc/config-archive, sorted by directory, software category, and application name.
- Each file (ending with ,v) stores all revisions and each are dated.
- The RCS files are text and can be viewed it with less, vi, nano, etc.
- To see a summary of the file revisions including date, use rlog ("-zLT" displays in local time, rather than default of UTC). Like:
-
rlog -zLT /etc/config-archive/etc/java-config-2/virtuals,v
-
- To extract an old version/revision of a file from the RCS file, use the co command:
-
co -p -r[revision #] [rcsfilename] # Print to console
-
co -r[revision #] [rcsfilename] > myversion.conf # Put to file
-
- To insert a file (like your current config file) into the RCS file, use the ci command:
- First unlock the RCS file since dispatch-conf locks it: rcs -U [RCSfilename]
- Next, insert your file into the RCS file: ci [yourConfigFilename] [RCSfilename]
- Last, lock the RCS file again: rcs -L [RCSfilename]
- You can check that it was added: rlog -zLT [RCSfilename]
- To compare any of the past versions with the current version, use rcsdiff:
-
rcsdiff -r[revision #] [rcsfilename] [current config file]
-
rcsdiff -r1.1 /etc/config-archive/etc/java-config-2/virtuals,v /etc/java-config-2/virtuals
-
- To compare any of the past versions with another past version, use rcsdiff:
-
rcsdiff -r[revision #1] -r[revision #2] [rcsfilename]
-
rcsdiff -r1.1 -r1.3 /etc/config-archive/etc/java-config-2/virtuals,v
-