views:

115

answers:

4

I am currently working on a PXE bootable environment that I would like to put into revision control.

The filesystem and server will both be Linux (SLES if you must know).

I've considered using some kind of hack that stores file ownership/permissions via getfacl -R -P, but this doesn't cover symlinks or devices. And it's kind of ugly.

Tricky things that I need to be covered:

  • file ownership
  • file permissions (ACLs are not necessary)
  • devices
  • symlinks

Are there any revision control systems that will cover my needs for this?

Note: Rather than a "block volume", I need to put a "set of files" into revision control and keep individual changes.

+1  A: 

You can use versioning filesystems, that is, filesystems with version control built into the filesystem code itself.

Some examples:

In principle, any filesystem that supports snapshots could be used.

More information: Versioning file system on Wikipedia.

Juliano
ZFS also support similar capabilities.
Paul McMillan
To my knowledge, Sun's ZFS isn't available under GNU/Linux (not mentioning ZFS on FUSE).
Pascal Thivent
I very much need proper revision control rather than strict time-based control for this.
MikeyB
Well, I'm not sure how "ZFS on FUSE" doesn't count as "ZFS on Linux", but it's certainly not something I'd personally run.
Paul McMillan
+1  A: 

If your file system will not be extremely huge, you might just store it all in a single file, version control that binary file, and then mount that to work with it. It won't give you pretty file-level control, but it might work acceptably for some tasks.

Paul McMillan
I'm interested in keeping it as a "set of files" rather than a blob. Otherwise I would just version control a tarball. Would you check in and pass around a tarball of your complete application source for every change? I bet you wouldn't. :)
MikeyB
Of course not... I'll be interested in the solution to this question, it's an interesting one.
Paul McMillan
+1  A: 

I'm pretty sure that Perforce will handle all of those things. I believe another group at work uses it for nearly the exact same purpose that you list (storing a variant of linux for an embedded device).

Caleb Huitt - cjhuitt
If so, that may work. It violates an unwritten constraint of mine (free/Open) but I may just take a look anyways.
MikeyB
@MikeyB: I wondered if you were desiring a free/open solution, but since the question didn't specify, I thought I'd offer up the option. I would think that some other systems (such as bazaar, with its support for moving files) might also support your requirements, but I'm not familiar enough with them to do more than speculate.
Caleb Huitt - cjhuitt
+1  A: 

etckeeper is a tool that puts the contents of /etc under revision control (with a choice of revision control systems). It has a layer on top that takes care of permissions, symlinks, etc. I'm not sure it if handles device nodes - probably not - but it could probably easily be extended to do so.

You may find that this tool can be adapted to handle an entire filesystem.

camh
Good plan - this may be worth adapting to support a filesystem.
MikeyB