Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add removable-media interface plug declaration to the snap packaging(#1618) #1619

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

brlin-tw
Copy link
Contributor

@brlin-tw brlin-tw commented Mar 27, 2023

Allow snap users to process YAML documents under /media or /mnt paths after connecting to the removable-media snapd slot:

sudo snap connect yq:removable-media

Fixes #1618.

…ikefarah#1618)

Allow snap users to process YAML documents under /media or /mnt paths after connecting to the `removable-media` snapd slot:

```
sudo snap connect yq :removable-media
```

Fixes mikefarah#1618.
@brlin-tw
Copy link
Contributor Author

I am able to build a snap from the branch and verify that the patch resolves the issue:

$ git clone --branch=patch-1 https://github.com/brlin-tw/yq.git 'yq - A portable command-line YAML, JSON, XML, CSV, TOML and properties processor'

$ cd 'yq - A portable command-line YAML, JSON, XML, CSV, TOML and properties processor'

$ snapcraft --use-lxd
...stripped...
Snapping |                                                                                                                                                                                                                           
Snapped yq_v4.33.1_amd64.snap
$ sudo snap install --dangerous yq_v4.33.1_amd64.snap 
yq v4.33.1 已安裝

$ sudo snap connect yq:removable-media 
將 yq:removable-media 連接到 snapd:removable-media

$ yq e '.any' /mnt/data1.yml
yaml file should do

Here's a copy for anyone that may be interested in trying with: yq_v4.33.1_amd64.snap.zip

Note that the snap still has access to your $HOME directory and {/mnt,/media} directories, don't install it in your production system without a security audit.

@mikefarah mikefarah merged commit 311622d into mikefarah:master Mar 28, 2023
@brlin-tw brlin-tw deleted the patch-1 branch March 28, 2023 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yq snap should optionally allow connecting to the removable-media snapd interface slot
2 participants