Hey Guys,
Im playing a bit with the content interface to reduce our snap size.
I’m create an provide snap like:
java-c-lib-share
with follow snapcraft.yaml
name: java-c-lib-share # you probably want to 'snapcraft register <name>'
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Share all necessary libs and jre to use and easy upgrade
description: |
Share all necessary libs and c libs to use it in all module projects
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
slots:
java-share:
interface: content
content: java-c-share
read:
- $SNAP/usr
parts:
native:
source: .
plugin: dump
organize:
'*' : usr/
and in my consumer i create an small snapcraft like:
name: my-snap-name # you probably want to 'snapcraft register <name>'
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
This is my-snap's description. You have a paragraph or two to tell the
most important story about your snap. Keep it under 100 words though,
we live in tweetspace and your description wants to look good in the snap
store.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
plugs:
java-share:
interface: content
content: java-c-share
target: $SNAP/usr
default-provider: java-c-lib-share
parts:
my-part:
# See 'snapcraft plugins'
plugin: nil
after then I did
snap connect my-snap-name:java-share java-c-lib-share:java-share
but I didn’t see the mounted interface in /snap/my-snap-name/x1
Did I something wrong?
I also tried with target: $SNAP_DATA/usr or $SNAP/share
any suggestions or hitpoint?
Greets