Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 260623 - [PATCH] git support for dispatch-conf
Summary: [PATCH] git support for dispatch-conf
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement with 11 votes (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2009-02-28 15:00 UTC by Alexander Sulfrian
Modified: 2021-08-22 15:32 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to the portage ebuild to add the git feature to dispatch-conf. (git-portage.patch,8.47 KB, patch)
2009-02-28 15:02 UTC, Alexander Sulfrian
Details | Diff
Patch to the portage ebuild to add the git feature to dispatch-conf. (git-distpatch-conf.patch,6.85 KB, patch)
2018-03-29 22:11 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Sulfrian 2009-02-28 15:00:43 UTC
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
Comment 1 Alexander Sulfrian 2009-02-28 15:02:27 UTC
Created attachment 183480 [details, diff]
Patch to the portage ebuild to add the git feature to dispatch-conf.
Comment 2 Zac Medico gentoo-dev 2018-03-29 22:11:06 UTC
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.
Comment 3 Larry the Git Cow gentoo-dev 2021-08-22 15:32:26 UTC
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(-)