Request for connection for charmcraft


I’m building charmcraft, a snap that has an app that can, in some situations, try to run git, bzr, hg, and etc. (but focusing on those three for now). I’m trying to keep the snap strictly confined. So, I’d like to let these programs access (i.e. read) their configuration from the usual places. For git it’s fairly straightforward, exactly what I asked for for icdiff,

    interface: personal-files
      - $HOME/.gitconfig         # the old location
      - $HOME/.config/git/config # the new location (could change via XDG_CONFIG_HOME
                                 # and that isn't supported by snapd yet)

so at the very least I’d like to get the above sorted, please.

For hg it looks like I need something very similar (but I haven’t tested this in anger):

    interface: personal-files
      - $HOME/.hgrc

but mercurial also has /etc/mercurial/hgrc so I’d also need

    interface: system-files
    - /etc/mercurial/hgrc


For bzr (actually now brz) things seem to be harder: there’s ~/.bazaar/, and ~/.config/breezy/, and in that directory bazaar.conf/breezy.conf (respectively) is the default config file, but then there’s a bunch of other files that are also part of config, and a lockfile. I don’t know if that can work using this mechanism (if nobody has tried it before, I’ll have to try myself next month). Suggestions welcome.

Thank you :slight_smile:

1 Like