Please allow use of personal-files for gitl [Was: Classic confinement for gitl]


#21

Ping - I can’t tally until votes are recast for write access.


#22

Guys why does it take so long? @jdstrand @popey @roadmr


#23

@wieczorek1990 Apologies for the delay.

+1 from me.


#24

2 votes for, 0 against (1 discarded since it wasn’t for write). Granting use of and auto-connection for the personal-files interface.


#25

While I have granted the snap declaration, the review-tools need a corresponding update. I have performed this update, but it is not in production yet. Newly uploaded revisions will require someone to manually approve it until this change is in production.


#26

Apologies for the delay (due to vacation :beach:): post-facto +1 from me with write, my only concern is granting write permissions to .gitconfig to a third-party app but gitl has “git” in its name so users should not be caught unaware.

  • Daniel

#27

@jdstrand
Now I get this error during push:

luke ~/D/gitl $ snapcraft push gitl_2.0.0_amd64.snap
Preparing to push 'gitl_2.0.0_amd64.snap'.
Pushing 'gitl_2.0.0_amd64.snap' [=========================================] 100%
Processing...|
Error while processing...
The store was unable to accept this snap.
  - override not found for 'plugs/gitconfig'. Use of the personal-files interface is reserved for vetted publishers. If your snap legitimately requires this access, please make a request in the forum using the 'store-requests' category (https://forum.snapcraft.io/c/store-requests), or if you would prefer to keep this private, the 'sensitive' category.

EDIT:
Signed up for manual revision.


#28

Yes, that is expected and what I was trying to communicate with “While I have granted the snap declaration, the review-tools need a corresponding update. I have performed this update, but it is not in production yet. Newly uploaded revisions will require someone to manually approve it until this change is in production.” I have approved the revisions you requested. The update should be in prod soon.


#29

Still it reads the .gitconfig from ~/snap/gitl/current/.gitconfig instead of the user home directory.
Or am I not understanding how does it work? What directory does the $HOME variable from snapcraft.yaml refer to?


#30

in runtime, HOME of a snap is set to that diretory, which is not the actual user’s home. This is convenient for a majority of legacy apps trying to make it into snaps, but hinders cases such as these (and I expect we’ll make opting-out of this HOME rewriting a thing at some point as things mature). Meanwhile, in icdiff, I change the first line of git-icdiff script to be

export HOME=$(perl -we "print((getpwuid $>)[7])")

because as I tested things that was the most lightweight way of achieving this. Other snaps that need this do something similar using getpwent etc.


'universal-ctags' requests personal-files interface
SOLVED Help needed using 'personal-files' interface
#31

Thanks very much.
Now I’m only waiting for review.
Finally got everything working. (Hope so)

EDIT:
Any info when the review tools will be updated?


#32

@jdstrand I’m also requesting write for $HOME/.gitl_history as I’m writing history to that file.

EDIT:
I renamed the plug from gitconfig to git, added a gitl plug.


#33

gitconfig was the approved interface reference name and is what was granted in the store. ‘git’ does not convey the same meaning when one does snap [dis]connect gitl:git which is why we require ‘gitconfig’. Please adjust this back to the agreed to name and [this portion of] the snap will pass automated review.

As for ‘gitl’, this is for $HOME/.gitl_history, but there doesn’t seem to be a reason why this file needs to be in this location and not the usual $SNAP_USER_DATA (aka $HOME). History files are typical only read and written to by the tool using them, not the user.


'universal-ctags' requests personal-files interface
#34

Now I get it, thank you.


#35

Nah, I don’t get anything why it still does not work, doing everything as instructed. There’s even a silly env GIT_DISCOVERY_ACROSS_FILESYSTEM that seems to be needed. Aliases don’t want to be read properly. Can anyone help me with debugging this, I want this finally released. Yeah, everybody probably does it with Makefile.
EDIT:
Maybe this line helps: https://github.com/git/git/blob/6a6c0f10a70a6eb101c213b09ae82a9cad252743/setup.c#L961