Hi All,
thanks to some kind help from members of this forum, I managed to get my first Snap published last year, and have done a few re-releases, the last being in December 2020, the snap weighing in at 289MB.
My latest version weighs in at a whopping 394MB!
I had some problems with “content clashes” between two key elements of my snap
Failed to stage: Parts 'desktop-gtk3' and 'photonotebook' have the following files, but with different contents:
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ani.so
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-bmp.so
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gif.so
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-icns.so
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ico.so
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.so
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-pnm.so
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-qtif.so
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-tga.so
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-tiff.so
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xbm.so
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so
usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders
usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.4000.0
usr/lib/x86_64-linux-gnu/libgdk_pixbuf_xlib-2.0.so.0.4000.0
usr/lib/x86_64-linux-gnu/libtiff.so.5.5.0
usr/share/doc/libasound2/changelog.Debian.gz
usr/share/doc/libavahi-common-data/changelog.Debian.gz
usr/share/doc/libgdk-pixbuf2.0-0/changelog.Debian.gz
usr/share/doc/libtiff5/changelog.Debian.gz
usr/share/doc/libx11-data/changelog.Debian.gz
Snapcraft offers some capabilities to solve this by use of the following keywords:
- `filesets`
- `stage`
- `snap`
- `organize`
To learn more about these part keywords, run `snapcraft help plugins`.
I solved this problem by cleaning the desktop-gtk3 snap and re-running the build process, which delivered a valid snap . However my snap size has gone up by 50%!
I suspect this size increase may be due to some duplication of GTK3 libraries or some similar problem, or a change in the GTK3 support system, but I do not have the knowledge of libraries to make a judgement. The App has not increased significantly in size or in range of functionality.
The App is built on JAVAFX 11.0.2 built in a IntelliJ IDEA toolset, JLINK-ed to produce a completely self-contained JAVA environment, and it has been running successfully in the wild for about a year from the store.
My snapcraft.yaml file is unchanged, and is below.
I would be very grateful if someone could help wityh a solution to this issue.
Many thanks in advance.
Alan
name: photonotebook
title: PhotoNoteBook
version: "1.4.2"
summary: A digital photography library manager and notebook
license: Proprietary
description: PhotoNoteBook is a digital photograph library manager enabling collections of images and the making of notes and memo's for the collections and the photographs.
icon: photonotebook.png
confinement: strict
grade: stable
base: core20
# this line enables LZO compression for the snap and speed up first start time - hopefully!
compression: lzo
apps:
photonotebook:
command: bin/photonotebook
command-chain: [bin/desktop-launch]
plugs: [home, unity7, opengl, network, removable-media, optical-drive ,desktop, desktop-legacy, gsettings, x11, wayland]
parts:
photonotebook:
plugin: dump
source: ./photonotebook/
stage-packages: [libgif7, libx11-6, libxext6, libxi6, libxrender1, libxtst6, libasound2, libjpeg8, liblcms2-2, libfreetype6, libpng16-16, libcanberra-gtk-module]
desktop-gtk3:
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-type: git
source-subdir: gtk
plugin: make
make-parameters: ["FLAVOR=gtk3"]
build-packages:
- libgtk-3-dev
stage-packages:
- libxkbcommon0 # XKB_CONFIG_ROOT
- ttf-ubuntu-font-family
- dmz-cursor-theme
- light-themes
- adwaita-icon-theme
- gnome-themes-standard
- shared-mime-info
- libgtk-3-0
- libgdk-pixbuf2.0-0
- libglib2.0-bin
- libgtk-3-bin
- unity-gtk3-module
- libappindicator3-1
- locales-all
- xdg-user-dirs
- ibus-gtk3
- libibus-1.0-5
- fontconfig-config # start of my additions
- fonts-liberation
- ttf-dejavu-core
- hicolor-icon-theme
- libgtk2.0-0
- libcanberra-gtk-module
- libcanberra-gtk0
- libcanberra0