etckeeper is a collection of tools to let /etc be stored in
a git, mercurial, darcs, or bzr repository. It can hook into portage to
automatically commit changes made to /etc during package upgrades. It tracks
file metadata that revison control systems do not normally support, but that
is important for /etc, such as the permissions of /etc/shadow.
joeyh/etckeeper