git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: Re: Using GIT to store /etc (Or: How to make GIT store all file permission bits)
Date: Sun, 10 Dec 2006 16:30:00 +0100	[thread overview]
Message-ID: <elh91b$v6r$1@sea.gmane.org> (raw)
In-Reply-To: 457C1E8E.4080407@garzik.org

Jeff Garzik wrote:

> Kyle Moffett wrote:
>>
>> I've recently become somewhat interested in the idea of using GIT to 
>> store the contents of various folders in /etc.  However after a bit of 
>> playing with this, I discovered that GIT doesn't actually preserve all 
>> permission bits since that would cause problems with the more 
>> traditional software development model.  I'm curious if anyone has done 
>> this before; and if so, how they went about handling the permissions and 
>> ownership issues.
>> 
>> I spent a little time looking over how GIT stores and compares 
>> permission bits; trying to figure out if it's possible to patch in a new 
>> configuration variable or two; say "preserve_all_perms" and 
>> "preserve_owner", or maybe even "save_acls".  It looks like standard 
>> permission preservation is fairly basic; you would just need to patch a 
>> few routines which alter the permissions read in from disk or compare 
>> them with ones from the database.  On the other hand, it would appear 
>> that preserving ownership or full POSIX ACLs might be a bit of a challenge.
> 
> It's a great idea, something I would like to do, and something I've 
> suggested before.  You could dig through the mailing list archives, if 
> you're motivated.
> 
> I actively use git to version, store and distribute an exim mail 
> configuration across six servers.  So far my solution has been a 'fix 
> perms' script, or using the file perm checking capabilities of cfengine.

Fix perms' script used on a checkout hook is a best idea I think.
 
> But it would be a lot better if git natively cared about ownership and 
> permissions (presumably via an option).

There is currently no place for ownership and extended attributes in
the tree object; and even full POSIX permissions might be challenge
because for example currently unused 'is socket' permission bit is
used for experimental commit-in-tree submodule support. And given Linus
stance that git is "content tracker"...

In the loooong thread "VCS comparison table" there was some talk
about using git (or any SCM) to manage /etc. Check out:

 * Message-ID: <Pine.LNX.4.64.0610220926170.3962@g5.osdl.org>
   http://permalink.gmane.org/gmane.comp.version-control.git/29765
 * Message-ID: <20061023051932.GA8625@evofed.localdomain>
   http://marc.theaimsgroup.com/?i=<20061023051932.GA8625@evofed.localdomain>

(and other messages in this subthread).
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git


  reply	other threads:[~2006-12-10 15:28 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-10 13:40 Using GIT to store /etc (Or: How to make GIT store all file permission bits) Kyle Moffett
2006-12-10 14:49 ` Jeff Garzik
2006-12-10 15:30   ` Jakub Narebski [this message]
2006-12-10 18:10     ` Kyle Moffett
2006-12-10 18:18       ` Jakub Narebski
2006-12-10 18:26       ` Jakub Narebski
2006-12-10 18:35         ` Kyle Moffett
2006-12-11 10:39           ` Andreas Ericsson
2006-12-11 10:55             ` Jeff Garzik
2006-12-11 12:13             ` Josef Weidendorfer
2006-12-11 13:33               ` Johannes Schindelin
2006-12-11 15:07                 ` Josef Weidendorfer
2006-12-10 15:06 ` Santi Béjar
2006-12-10 17:46   ` Kyle Moffett
2006-12-10 18:10     ` Jakub Narebski
2007-01-10  1:39   ` David Lang
2007-01-10  2:30     ` Shawn O. Pearce
2007-01-10 18:34       ` David Lang
2007-01-12  0:55         ` Shawn O. Pearce
2006-12-11 10:50 ` Nikolai Weibull
2006-12-12  3:45 ` Daniel Barkalow
2006-12-12 13:49   ` Kyle Moffett
2006-12-12 15:53     ` Andy Parkins
2006-12-12 22:49       ` Using git as a general backup mechanism (was Re: Using GIT to store /etc) Steven Grimm
2006-12-12 22:57         ` Johannes Schindelin
2006-12-12 23:06           ` Steven Grimm
2006-12-13  0:01             ` Johannes Schindelin
2006-12-12 23:15         ` Martin Langhoff
2006-12-12 23:23           ` Martin Langhoff
2006-12-12 23:43         ` Using git as a general backup mechanism Junio C Hamano
2006-12-14 23:33           ` Steven Grimm
2006-12-15  0:33             ` Junio C Hamano
2006-12-13 18:10     ` Using GIT to store /etc (Or: How to make GIT store all file permission bits) Daniel Barkalow
2006-12-14  5:06       ` Chris Riddoch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='elh91b$v6r$1@sea.gmane.org' \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).