{"thread":{"id":"14907","subject":"keeping /etc under git with etckeeper","startedAt":"2008-08-09T18:48:39Z","lastAt":"2008-08-10T03:15:32Z","messageCount":4,"participants":["Pierre-Julien Bringer","martin f krafft","Miklos Vajna","Edward Z. Yang"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"86604","messageId":"14b409fc0808091148k69f4019n6996261a710adfca@mail.gmail.com","threadId":"14907","inReplyTo":null,"subject":"keeping /etc under git with etckeeper","fromName":"Pierre-Julien Bringer","fromEmail":"pj.bringer@gmail.com","sentAt":"2008-08-09T18:48:39Z","receivedAt":"2008-08-09T18:48:39Z","isPatch":false,"sender":{"key":"pj.bringer@gmail.com","avatar":null},"body":"Do you think storing the etc directory in git with etckeeper is a good\nthing? I've heard it was not recommended to do so for the home\ndirectory, but also for /etc:\n1 Git tries to find a link between the changes and there would\nprobably be none for $HOME, according to Randal Schwarz [1].\n2 Git does not store permissions of files [2].\n3 If Git has some sort of merge conflict on important config files\n(passwd, etc...), it would be pretty bad [3].\n\nWhen using etckeeper:\n1 There would be a link between the changes if a commit occurs between tasks.\n2 Permissions are stored thanks to Metastore.\n\nI have only superficial experience in using git, and I don't really\nknow how likely it would be for things to go wrong. Merging seems to\nbe the dangerous operation, but using it to track linear history would\nbe okay. Gentoo users have been able to use RCS for a long time, but\nthat solution is considered to be deprecated, although it does the\njob. Can experienced git users think of any reason not to use a small\nsubset of git for this task?\n\n\nPierre-Julien Bringer\n\n\n[1] Randal Schwarz, \"Git\" at Google, October 12 2007, available at\nhttp://www.youtube.com/watch?v=8dhZ9BXQgc4\n[2] Git project's FAQ available at http://git.or.cz/gitwiki/GitFaq\n[3] Joey Hess, November 26 2007 on vcs-home -- Discussion list for\nstoring ~ under VCS control, available at\nhttp://lists.madduck.net/pipermail/vcs-home/2007-November/000102.html\n"},{"id":"86607","messageId":"20080809191652.GA8220@lapse.rw.madduck.net","threadId":"14907","inReplyTo":"14b409fc0808091148k69f4019n6996261a710adfca@mail.gmail.com","subject":"Re: keeping /etc under git with etckeeper","fromName":"martin f krafft","fromEmail":"madduck@madduck.net","sentAt":"2008-08-09T19:16:52Z","receivedAt":"2008-08-09T19:16:52Z","isPatch":false,"sender":{"key":"madduck@madduck.net","avatar":null},"body":"also sprach Pierre-Julien Bringer <pj.bringer@gmail.com> [2008.08.09.1548 -0300]:\n> Do you think storing the etc directory in git with etckeeper is a good\n> thing? I've heard it was not recommended to do so for the home\n> directory, but also for /etc:\n\nYou might want to discuss this also on vcs-home@lists.madduck.net.\nSee http://vcs-home.madduck.net .\n\n-- \nmartin | http://madduck.net/ | http://two.sentenc.es/\n \n\"no work of art ever puts forward views.\n views belong to people\n who are not artists.\"\n                                                        -- oscar wilde\n \nspamtraps: madduck.bogus@madduck.net\n"},{"id":"86627","messageId":"20080809234232.GB18960@genesis.frugalware.org","threadId":"14907","inReplyTo":"14b409fc0808091148k69f4019n6996261a710adfca@mail.gmail.com","subject":"Re: keeping /etc under git with etckeeper","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-08-09T23:42:32Z","receivedAt":"2008-08-09T23:42:32Z","isPatch":false,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Sat, Aug 09, 2008 at 08:48:39PM +0200, Pierre-Julien Bringer <pj.bringer@gmail.com> wrote:\n> 3 If Git has some sort of merge conflict on important config files\n> (passwd, etc...), it would be pretty bad [3].\n> \n> When using etckeeper:\n> 1 There would be a link between the changes if a commit occurs between tasks.\n\nI don't exactly see what the problem is here.\n\n> 2 Permissions are stored thanks to Metastore.\n\nActually it no longer uses metastore, but yes, etckeeper handles\npermissions properly, so it is not a problem. The second problem is\npoint 3) from your previous list, but that's easy to avoid: never ever\nmerge, rebase (or any other task that can result in a conflict) in your\n/etc.\n\nIn short, if you want to just track your directory, then it's OK, but if\nyou want to use git to handle the config of multiple machines, it'll be\ntoo problematic, I would not suggest doing so.\n"},{"id":"86633","messageId":"489E5D54.7040708@thewritingpot.com","threadId":"14907","inReplyTo":"14b409fc0808091148k69f4019n6996261a710adfca@mail.gmail.com","subject":"Re: keeping /etc under git with etckeeper","fromName":"Edward Z. Yang","fromEmail":"edwardzyang@thewritingpot.com","sentAt":"2008-08-10T03:15:32Z","receivedAt":"2008-08-10T03:15:32Z","isPatch":false,"sender":{"key":"edwardzyang@thewritingpot.com","avatar":"https://gravatar.com/avatar/a805a0a3c1d7d36e7fe22270596e4d812723652933c59cac267e67c79126fdd0?d=mp&s=160"},"body":"Pierre-Julien Bringer wrote:\n> Do you think storing the etc directory in git with etckeeper is a good\n> thing? I've heard it was not recommended to do so for the home\n> directory, but also for /etc:\n\nI've been using etckeeper for a while now, and it's working reasonably\nwell. The one thing I personally don't like, however, is the fact that\netckeeper automatically commits a dirty /etc state before the\nauto-commits for any installed packages. I.e. auto-commit on apt-get\nGOOD, auto-commit on other changes BAD. Fortunately, it's relatively\neasy to change the commit hooks to do your bidding. :-)\n\nWith carefully issued Git commands, you can have Git refuse to touch any\nfiles when there is a merge conflict, so you can resolve it in another\ncheckout. Of course, Git makes it extremely easy to back out a failed\nmerge, so as long as there isn't an essential process polling /etc every\nfew seconds, you should be savvy if you revert before a reboot.\n"}]}