Just working through the mumble snap, and from what I can see, the dependencies are pretty much all build related. Was just hoping for a second set of eyes to confirm that none of the packages should be added to stage-packages instead.
Appreciated.
name: mumble # you probably want to 'snapcraft register <name>'
version: '1.2.19-git' # just for humans, typically '1.2+git' or '1.3.2'
summary: Mumble is an open source, low-latency, high quality voice chat software. # 79 char long summary
description: |
Mumble is a voice chat application for groups. While it can be used for any kind of activity, it is primarily intended for gaming. It can be compared to programs like Ventrilo or TeamSpeak. People tend to simplify things, so when they talk about Mumble they either talk about "Mumble" the client application or about "Mumble & Murmur" the whole voice chat application suite.
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots
apps:
mumble:
command: bin/mumble
parts:
mumble:
source: https://github.com/mumble-voip/mumble.git
source-tag: 1.2.19
# See 'snapcraft plugins'
plugin: qmake
qt-version: qt4
options:
- CONFIG+=no-server -recursive
project-files:
- "main.pro"
build-packages:
- build-essential
- pkg-config
- qt4-dev-tools
- libqt4-dev
- libspeex1
- libspeex-dev
- libboost-dev
- libasound2-dev
- libssl-dev
- libspeechd-dev
- libzeroc-ice-dev
- libpulse-dev
- libcap-dev
- libprotobuf-dev
- protobuf-compiler
- libogg-dev
- libavahi-compat-libdnssd-dev
- libsndfile1-dev
- libg15daemon-client-dev
- libxi-dev
It’s difficult to know for sure, but yes, as a general rule having -dev packages in build-packages should work thanks to Snapcraft’s library crawling functionality. However, that won’t work for things loaded at runtime, e.g. plugins. Note also that it’s the current plan for this behavior to be removed in Snapcraft v3 (it’s a bit too magical and unreliable), so you might consider going through the exercise of staging the packages you know you require.
The standard answer is basically ‘build it and see’. Use snapcraft cleanbuild to build in a container, then install that snap and run it - snap run foo and see what works and what doesn’t. In many cases the app will flat out fail to launch if a library is missing. In some other cases it may launch but features don’t work. So test it, and see what does/doesn’t work, and see what errors you get.
Nothing stopped me. So, I guess I was on the right track in terms of blind experimentation.
My confusion lay in the ambiguity of the labels (stage and build). I think I do understand them (build are build deps and stage are runtime deps). But then again, I don’t know as I’ve played around with a number of configurations and the snap will either build and not run or not build at all.
This is of course based on PAST experience as my latest snap (the one I had in mind when posting my response) has successfully built and run.
Just for the sake of others who are looking for the answers to this question, am I right about the labels?