Currently dispatch-conf does only supports rcs to archive old configs. This patch add the ability to store the configs in a git repository containing the whole /etc/ directory. Patch is mainly based on a old patch of hollow from https://my.newthinking.de/~bbo/portage-2.1.4.4-git-dispatch-conf.patch. I have ported this to the recent portage version and added the patch to the ebuild. Reproducible: Always
Created attachment 183480 [details, diff] Patch to the portage ebuild to add the git feature to dispatch-conf.
Created attachment 526136 [details, diff] Patch to the portage ebuild to add the git feature to dispatch-conf. (In reply to Alexander Sulfrian from comment #1) > Created attachment 183480 [details, diff] [details, diff] > Patch to the portage ebuild to add the git feature to dispatch-conf. I've converted your patch from second-order to first-order.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=6e86186244d048e3edd5c11c18cfb4eee98a0d56 commit 6e86186244d048e3edd5c11c18cfb4eee98a0d56 Author: Florian Schmaus <flo@geekplace.eu> AuthorDate: 2021-03-28 12:55:04 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2021-08-22 15:32:07 +0000 dispatch-conf: Add support for conf-update.d hook directory Those hooks can be used by tools that manage /etc to get notified about updated configuration files. For example, etckeeper could hook this mechanism like the following: /etc/portage/conf-update.d/etckeeper case "${1}" in pre-update) etckeeper pre-install ;; post-update) etckeeper post-install ;; esac Currently conf-update.d hooks are called with 4 different events: - pre-session - post-session - pre-update - post-update The *-session events are emitted prior starting a new configuration update sesssion, and when it is finished. That is, the pre-session event is emitted just before dispatch-conf displays the first configuration file, and right before it exists. The *-update events are emitted before and after a configuration file has been updated. The path of the configuration file is provided as second hook argument. Signed-off-by: Florian Schmaus <flo@geekplace.eu> Closes: https://bugs.gentoo.org/698316 Bug: https://bugs.gentoo.org/260623 Closes: https://github.com/gentoo/portage/pull/689 Signed-off-by: Michał Górny <mgorny@gentoo.org> bin/dispatch-conf | 13 ++++++++++++- lib/portage/dispatch_conf.py | 14 ++++++++++++++ lib/portage/util/hooks.py | 12 ++++++++++++ man/dispatch-conf.1 | 5 +++++ 4 files changed, 43 insertions(+), 1 deletion(-)