login
Header Space

 
 

Re: /etc in git?

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Adam Hunt <kinema@...>
Cc: <git@...>
Date: Thursday, January 19, 2006 - 1:05 am

Adam Hunt <kinema@gmail.com> writes:


I personally feel it is a horrible and stupid thing to do, if by
"version control /etc" you mean to have /.git which controls
/etc/hosts and stuff in place.  It would work (git does not
refuse to run as root).  But being a *source* control system, we
deliberately refuse to store the full permission bits, so if
your /etc/shadow is mode 0600 while /etc/hosts is mode 0644, you
have to make sure they stay that way after checking things out.

You are much better off to keep /usr/src/rootstuff/.git (and
working tree files are /usr/src/rootstuff/etc/hosts and
friends), have a build procedure (read: Makefile) there, and
version control that source directory.  I usually have 'install'
and 'diff' target in that Makefile, so that I can do this:

	$ cd /usr/src/rootstuff
        $ make diff ;# to see if somebody edited any targets by hand
	$ edit etc/hosts
	$ git diff ;# to see the source change
        $ make diff ;# to see the change I am going to install
        $ su
        # make install; exit
        $ git commit -a -m 'Add a new host.'

Being able to run "diff" before actually doing it is very handy
and useful safety/sanity measure.

Obviously, /usr/src/rootstuff/ should be mode 0770 or stricter,
owned by the operator group; it would contain some sensitive
information.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
/etc in git?, Adam Hunt, (Wed Jan 18, 11:43 pm)
Re: /etc in git?, Junio C Hamano, (Thu Jan 19, 12:35 am)
Re: /etc in git?, Adam Hunt, (Thu Jan 19, 12:40 am)
Re: /etc in git?, Junio C Hamano, (Thu Jan 19, 1:05 am)
Re: /etc in git?, Daniel Barkalow, (Thu Jan 19, 6:22 pm)
Re: /etc in git?, Joel Becker, (Thu Jan 19, 12:54 pm)
Re: /etc in git?, Ryan Anderson, (Thu Jan 19, 2:23 am)
Re: /etc in git?, Junio C Hamano, (Thu Jan 19, 3:50 am)
Re: /etc in git?, Ryan Anderson, (Fri Jan 20, 9:50 am)
Re: /etc in git?, Junio C Hamano, (Fri Jan 20, 1:55 pm)
[PATCH] Support precise tracking of file modes, Petr Baudis, (Thu Jan 19, 5:41 am)
Re: [PATCH] Support precise tracking of file modes, Peter Baumann, (Fri Jan 20, 10:16 am)
Re: /etc in git?, H. Peter Anvin, (Thu Jan 19, 12:59 am)
speck-geostationary