1 |
On Tue, Jun 19, 2018 at 11:15 AM Ian Zimmerman <itz@××××××××××××.org> wrote: |
2 |
> |
3 |
> On 2018-06-18 11:34, Rich Freeman wrote: |
4 |
> |
5 |
> > Oh, the other tool you'll want to use is etckeeper to manage /etc in a |
6 |
> > git repo and auto-commit changes/etc with package manager hooks. That |
7 |
> > is a cross-distro tool, and will save your butt if you mess something |
8 |
> > up. |
9 |
> |
10 |
> I already do this, only without any packaging/wrapping like etckeeper, |
11 |
> just bare git. It's why I want to skip all the the gentoo merge |
12 |
> thingies, get a crack at the updated file shipped with a package, insert |
13 |
> this into git on a parallel branch, then merge in the git way. |
14 |
> |
15 |
|
16 |
Yeah, that certainly works, and if you're disciplined it has the |
17 |
advantage that your git history will always be clean and reliable. |
18 |
|
19 |
The advantage of etckeeper is the PM hooks. If you have uncommitted |
20 |
changes in /etc when you run emerge it will just dump them all into an |
21 |
auto-described commit so that you don't end up with a big pile of |
22 |
modified files with no history. |
23 |
|
24 |
If you always manually review all your changes and commit them |
25 |
dutifully after every update, then I believe etckeeper should behave |
26 |
as one big NOOP. It really only kicks in if you're lazy about |
27 |
committing your changes, to ensure that they don't pile up. Then if |
28 |
you have an issue you can at least look at the changes since the last |
29 |
time you ran emerge, or the time before that, and so on. |
30 |
|
31 |
Personally I use a hybrid approach. When I go deliberately modifying |
32 |
config files I make my own clean commits with the stuff I know is |
33 |
good. Then I let etckeeper just merge in the daily cruft that I'm not |
34 |
really intentionally touching anyway. That means that the commits |
35 |
with real descriptions are known-good, and the rest are |
36 |
potentially-useful snapshots I can make use of if they work. But, |
37 |
this is all at home - I'd be more disciplined on a system I cared |
38 |
about. Well, then again on a system I cared about I'd probably be |
39 |
using ansible or whatever and not upgrading in-place anyway. |
40 |
|
41 |
-- |
42 |
Rich |