Re: Using git to store /etc, redux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 19 May 2007, David Härdeman wrote:

I recently had the idea to store and track /etc using git. When googling the topic I came across the "Using git to store /etc" thread from the end of last year which provided some interesting details on what would be necessary.

It seems the file metadata (owner, group, mode, xattrs, etc) was the big stumbling point, so I wrote up a tool over the last few days which allows the metadata to be stored in a separate file which can be stored along with the rest of the data in the repo (or separately).

This is also useful for tripwire type checks and for other types of storage which drops some of the metadata (tar comes to mind)...

The tool (metastore) is available from: git://git.hardeman.nu/metastore.git

Not completely cleaned up yet (it lacks a real README and some Makefile targets) but I hope it might be useful to others (it sure is to me).

Please CC me on any replies.

as I understand the issue, the problem isn't creating a tool to store the metadata, but in integrating things with git.

when checking something in a pre-commit hook needs to run the tool to store the data.

git supports this and it's pretty simple to do this.

however when checking things out there are approaches

1. modify git to have a post-checkout hook to set the metadata to match
   what was stored at checkin and accept the fact that this leaves a
   window where the file has the wrong metadata on it (between when the
   file is written and when the hook runs), or use a staging area to have
   copies of the files during check-in and check-out

2. modify git to know that it needs to check some files out before any
   others and use an expernal program to write the files to disk. Then
   this program can use the data stored at checkin to write the files with
   the appropriate metadata

unforutnantly until one of these is done by someone the utility of programs like your metastore are limited.

David Lang

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux