I would suggest there is no inherent need for the application to require classic confinement. As an alternative to wget it is a downloader of files from a network source. The destination file is specified by the user and so a more appropriate use in my opinion would be to apply the
home interface and allow the application to download into the user’s home folder through that permission.
I’m a new one to snapcraft. Then the question is how to get the permission to write file to user’s HOME path?
Add a plug of type
home to your snapcraft.yaml
As such I’m -1 for classic confinement
what’s the value after
Nothing, that’s all you need.
Normally you can add attributes, labels or pick the interface type but here everything is inferred.
thx, it’s auto building…
failed building . My config : snapcraft.yaml
Preparing to build mget
go build -o /build/mget/parts/mget/go/bin/mget github.com/weaming/mget
cannot find section
Failed to update '/build/mget/prime/bin/mget'. Retrying after stripping the .note.go.buildid from the elf file.
Snapping 'mget' ...
Revoking proxy token...
RUN: /usr/share/launchpad-buildd/slavebin/in-target scan-for-processes --backend=lxd --series=xenial --arch=i386 SNAPBUILD-201868
Scanning for processes to kill in build SNAPBUILD-201868
RUN: /usr/share/launchpad-buildd/slavebin/in-target umount-chroot --backend=lxd --series=xenial --arch=i386 SNAPBUILD-201868
Stopping target for build SNAPBUILD-201868
/usr/lib/python2.7/dist-packages/pylxd/model.py:116: UserWarning: Attempted to set unknown attribute "description" on instance of "Container"
RUN: /usr/share/launchpad-buildd/slavebin/in-target remove-build --backend=lxd --series=xenial --arch=i386 SNAPBUILD-201868
You’ve included colons indicating that
network are key-value pairs with no values. You need to define them as just a value, i.e. without the
Edit: On looking closer, you’ve also put
plugs at the top-level, not under the
This is correct syntax, are you sure this is an issue?
the colons surely are an issue … toplevel plugs vs app plugs shouldnt … (though the app plugs are surely cleaner and the desired way)
Fixed it and published to stable channel, happy using it!
It’s a taste of snap, I will not change this snapcraft.yaml file any more, and it will auto build when I push to github.
I did not find any pros for using snap, maybe relevant with my work environment without any ubuntu-core system.