To use them
sudo snap install kblocks
To drop the requirement to have to sudo everything you need to login using ubuntu login credentials first.
sudo snap login
After that you should have a ~/.snap/auth.json file and snap should work without sudo.
The snapcraft.yamls we have in our packaging repositories are generally meant to be built via our tooling and the respective Jenkins jobs. Generally they can however also be built manually as the tooling only extends them a bit to build from git and install suitable packages for the current content-snap SDK. By and large this is optional though.
To build run
The environment variable sets a different remote parts URI to load the -dev and -env parts from. Long term these should be added to the upstream default parts.yaml though.
(upstream issues ought to be filed/subscribed to and mentioned here)
Content snap not getting installed if snap depending on it gets installed Installing a content snap into the core ISO requires snapd which requires systemd which cannot (?) run in a docker/lxc/chrootsnap download can be used to "preseed" snaps
- How to get theme settings from the host into the snap?
- QtStyles are binary plugins and so even when we know which style is configured on the host we cannot just load it
- Icon themes in /usr/share and ~/.local cannot be accessed from inside snaps
- Same for mouse cursor themes
- Same for fonts
- upstream is aware and working on it
- Hard to debug applications
- We have huge wrapper scripts that are required for applications to run properly
- It's hard to reach out to debugging tools
- should be easy-ish to use gdb-server
- gdb/valgrind/strace need to be in the snap to be reachable
- Possibly needs a way to catch and send cores and then retrace them server-side with (externally) generated debug symbol dumps?
xdg-desktop-portals (with patches) + snapd (with patches). Needs landing or something
- Printing (cups-control gives printer management access which I think we do not need; it is also not auto-connected which makes it useless from a user pov)
- Discover Software Center integration isn't at the level of PackageKit or Flatpak. Mostly boils down to some appstream support
- we are lacking appstream ids, useful for de-duplication
- cannot use snaps for the featured applications list (apps are listed as appstream ids)
- AppStream ID as id for reviews https://forum.snapcraft.io/t/best-way-to-key-a-snap-for-reviewing/854/2
- No source code storage/retrieval for snaps
Dolphin and kfileopen are cluttered with loopback mounts from snapd https://bugs.launchpad.net/ubuntu/+source/snapcraft/+bug/1714941Kai made a fairly general prupose fix for this in solid, which is technically the wrong level to fix this on but good enough for us Live images should be able to turn off Snap updatesWe've done this by aggressively disabling snapd components. Starting a snap will still cuase the update, but that is nothing we can prevent outside snapd
- No real way to run unit tests through snapcraft
- Talking with snapcraft developers, they suggested using "install: ctest ." much like in here: https://snapcraft.io/docs/build-snaps/node
- Implemented here: https://cgit.kde.org/scratch/apol/kf5-snap-env.git/plain/README.md
- Content snap has "external" dev tarball which we utilize to build snaps off of the content snap, problem is that snapcraft does not like files diverging, so whenever a snap stages-packages something that is in the dev tarball (e.g. as part of a runtime dep) but binary different (e.g. newer build) the snapcraft will fail. On auto generated snaps this was worked around by maintaining an exclusion list of packages to not install, this may be auto-injectable into manual builds BUT won't be doable for non-infrastructure builds (i.e. a dev running snapcraft on their system).
- Content snap has problems
- Lack of Appstream support
- Substantial metadata duplication. snap metadata excessively duplicates appstream metadata such as license, summary, version, icon. Makes it undesirable to maintain the data in snapcraft.yaml so it will simply go out of date at some point.
- Should be extracting the icon and desktop file from the package. Now it's copied in the packaging.
- Icons do not appear to get installed into hicolor nor hardcoded absolute paths in the desktop files, making icon availability entirely theme-dependent.
- GPG verification of incoming content is not supported. This breaks the signing chain from tag -> tarball -> pkg -> user. Only applies to tarballs. [Supposedly the tarball is somewhere in the build tree, so we could build custom rigging to download the gpg after snapcraft ran and verify the tarball snapcraft got is the signed one and abort if not]
- on <2.26.0 We need to umount the snap if it was already installed: sudo umount /run/snapd/ns/dolphin.mnt