3

I want to keep track of the /etc changes with etckeeper

Unfortunately, the commit messages are the same for all commits

saving uncommitted changes in /etc prior to emerge run

I wish there would be something more descriptive like

apt-get install foo

on debian based systems or

emerge foo

on gentoo based systems when reading the logs with git log. Is there a hook script, I can use for this?

  • Notice that with things stored in a git repository, there is nothing that is stopping you from changing the commit message to whatever you want with an interactive rebase (or possibly automate with filter-branch). – hlovdal Sep 25 '18 at 18:31
4

The changelog message comes from one of the hook scripts of etckeeper. For example the “saving uncommitted changes” message is from /etc/etckeeper/pre-install.d/50uncommitted-changes.

But if you want truly meaningful messages for changes that you made, a computer cannot generate them for you. (Changes resulting from apt-get or emerge operation do get a meaningful messages listing the packages that got installed, upgraded or removed.) You need to run etckeeper commit or $vcs commit and enter a meaningful message. To prevent apt-get or emerge from running if there are uncommitted changes, edit /etc/etckeeper/etckeeper.conf and uncomment the line AVOID_COMMIT_BEFORE_INSTALL=1 (and AVOID_DAILY_AUTOCOMMITS=1 if it's commented out).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.