Interface autoconnection request for the glances snap


#1

Dear @reviewers, I would like to request the auto-connection of the following interfaces for https://snapcraft.io/glances according to the Process for aliases, auto-connections and tracks.

Interface Name Reasoning
system-files
(for accessing /etc/glances/glances.conf)
This is the system-wide configuration file of the application(source)
personal-files
(for accessing ~/.config/glances/glances.conf and $XDG_CONFIG_HOME/glances/glances.conf)
This is the user-wide configuration file of the application(source)

Here’s the upstream conversation regarding this request:


#2

+1 from me as these files are specifically for glances itself, and not shared.


#3

The files themselves aren’t particularly controversial, but do you need read-only access or read/write? Why isn’t SNAP_USER_DATA/.config/glances good enough? Why do you need access to /etc/glances instead of SNAP_DATA/etc/glances (or similar)?


#4

do you need read-only access or read/write

I’m not exactly sure yet, waiting for the upstream to response.

Why isn’t SNAP_USER_DATA/.config/glances good enough? Why do you need access to /etc/glances instead of SNAP_DATA/etc/glances (or similar)?

Because they’re simply not the paths users expecting it would be.


#5

I don’t have a particular objection to read-only access to these directories, but write access means that your snap can write a non-snap’s files and vice versa. How does glances handle different versions of config files (going forward and backward)?


#6

Ping - this needs to be answered before reviewers can have an informed vote.


#7

How does glances handle different versions of config files (going forward and backward)?

I find no information regarding either the forward or backward-compatibility of the configuration in its docs, I would guess there’s none.

I have forwarded the inquiry to the upstream and is waiting for the respond.


#8

Thanks, please report back when you hear something. Perhaps in the meantime readonly access is enough? You can then have your snap import the content into $SNAP_USER_DATA ($HOME within the context of your snap) and be on your way.


#9

I still got no response from the upstream yet, read-only access is fine for now.


#10

+1 for readonly access.

2 votes for, 0 against. Granting use and autoconnection of the interface. This is now live.


#11

Note that I am implementing a review-tools check that will require that the interface reference be meaningful, but the snap in the store doesn’t yet use personal-files or system-files. I suggest for personal-files, using:

plugs:
  home-glances-config:
    interface: personal-files
    read:
    - $HOME/.config/glances/glances.conf
  etc-glances-config:
    interface: system-files
    read:
    - /etc/glances/glances.conf

#12

I’ve initiated the PR to adds these plugs: snap: Support canonical config paths, fixes #1403 by Lin-Buo-Ren · Pull Request #1464 · nicolargo/glances