Re:Etckeeper lets you store changes in /etc to git
by zimbatm on Sunday April 28, 2013 @06:19PM
(#5623027)
The cool thing about Etckeeper is that it plugs directly into your package manager. If you're using deb or rpm, a commit is made after each package install if they changed /etc.
[ Parent
| on HN ]
Re:Etckeeper lets you store changes in /etc to git
by GhotiFish on Sunday April 28, 2013 @09:55PM
(#5623683)
Ah! Now there's a reason to look through the source code. I've being wanting to make update scripts for online projects that are not in my distribution's repositories. (I'd love it if GO updated when I told my computer to update).
Re:Etckeeper lets you store changes in /etc to git
by ibotty on Monday April 29, 2013 @03:14AM
(#5624532)
small nitpick, it does not hook into dpkg and rpm but into apt and yum (there are surely hooks for other package managers). so when you install a package without these higher level package managers, it does not get recorded...
Re:Etckeeper lets you store changes in /etc to git
by jared314 on Sunday April 28, 2013 @11:36PM
(#5623937)
Wouldn't a simple inotify[0] watch on /etc handle that scenario? Does it split up the commits by package?
Re:Etckeeper lets you store changes in /etc to git
by ibotty on Monday April 29, 2013 @03:21AM
(#5624550)
inotify consumes resources (ram), which a hook into a package manager does not. you cannot watch all subdirectories within /etc with one handle, so you will have to recursively setup handles for all subdirectories. then, you might run into the max_user_watches limit (see sysctl fs.inotify.max_user_watches).
Re:Etckeeper lets you store changes in /etc to git
by tankenmate on Monday April 29, 2013 @05:28AM
(#5624983)
Acutally, using fanotify() you can watch a whole filesystem with one watcher; use FAN_MARK_MOUNT (inotify and fanotify both use the fsnotify subsystem in the kernel). So then you set a watch on either /etc (if it is separately mounted) or watch / and then ignore any paths that aren't in /etc.
Re:Etckeeper lets you store changes in /etc to git
by NickNameNick on Sunday April 28, 2013 @11:38PM
(#5623945)
Wouldn't that commit as soon as any file was changed, no matter who or what changed it, denying users the ability to supply a meaningful commit message?
Re:Etckeeper lets you store changes in /etc to git
by jared314 on Sunday April 28, 2013 @11:58PM
(#5623990)
That depends on the filesystem events you tie into (Open, Close, Write, Delete, etc) and what your responding script does. But, at the point where you want to put the entire system under some kind of change management, why not use something designed for that, like NixOS[0]?