I have a Java-based desktop application currently being distributed via a .deb. I’ve tested the .deb on Ubuntu 22 and all features are working as expected. I want to offer the application on the snap store as well.
The Java application is built using Maven which produces the .deb file. I wanted to take the easy path and just package that into a snap, mostly because I’m not familiar with Linux and the application is non-trivial with JavaFX involved.
This was my attempt (I removed the noise):
base: core22
apps:
my-app:
command: desktop-launch $SNAP/opt/my-app/bin/my-app
desktop: opt/my-app/lib/my-app.desktop
extensions: [gnome]
plugs:
- home
- network
- opengl
- removable-media
- unity7
- x11
- wayland
- desktop
- desktop-legacy
- audio-playback
- hardware-observe
parts:
my-app:
source: ./my-app.deb
plugin: dump
source-type: deb
When I run this I get the following output:
Generated snap metadata
Unable to determine library dependencies for 'opt/my-app/lib/runtime/lib/libawt_headless.so'
Unable to determine library dependencies for 'opt/my-app/lib/runtime/lib/libawt_xawt.so'
Unable to determine library dependencies for 'opt/my-app/lib/runtime/lib/libjawt.so'
Unable to determine library dependencies for 'opt/my-app/lib/runtime/lib/liblcms.so'
Unable to determine library dependencies for 'opt/my-app/lib/runtime/lib/libnio.so'
Lint warnings:
- library: opt/my-app/lib/runtime/lib/libavplugin-54.so: missing dependency 'libavcodec.so.54'. (https://snapcraft.io/docs/linters-library)
- library: opt/my-app/lib/runtime/lib/libavplugin-54.so: missing dependency 'libavformat.so.54'. (https://snapcraft.io/docs/linters-library)
- library: opt/my-app/lib/runtime/lib/libavplugin-56.so: missing dependency 'libavcodec.so.56'. (https://snapcraft.io/docs/linters-library)
- library: opt/my-app/lib/runtime/lib/libavplugin-56.so: missing dependency 'libavformat.so.56'. (https://snapcraft.io/docs/linters-library)
- library: opt/my-app/lib/runtime/lib/libavplugin-57.so: missing dependency 'libavcodec.so.57'. (https://snapcraft.io/docs/linters-library)
- library: opt/my-app/lib/runtime/lib/libavplugin-57.so: missing dependency 'libavformat.so.57'. (https://snapcraft.io/docs/linters-library)
- library: opt/my-app/lib/runtime/lib/libavplugin-ffmpeg-56.so: missing dependency 'libavcodec-ffmpeg.so.56'. (https://snapcraft.io/docs/linters-library)
- library: opt/my-app/lib/runtime/lib/libavplugin-ffmpeg-56.so: missing dependency 'libavformat-ffmpeg.so.56'. (https://snapcraft.io/docs/linters-library)
- library: opt/my-app/lib/runtime/lib/libavplugin-ffmpeg-57.so: missing dependency 'libavcodec.so.57'. (https://snapcraft.io/docs/linters-library)
- library: opt/my-app/lib/runtime/lib/libavplugin-ffmpeg-57.so: missing dependency 'libavformat.so.57'. (https://snapcraft.io/docs/linters-library)
- library: opt/my-app/lib/runtime/lib/libavplugin-ffmpeg-58.so: missing dependency 'libavcodec.so.58'. (https://snapcraft.io/docs/linters-library)
- library: opt/my-app/lib/runtime/lib/libavplugin-ffmpeg-58.so: missing dependency 'libavformat.so.58'. (https://snapcraft.io/docs/linters-library)
- library: opt/my-app/lib/runtime/lib/libavplugin-ffmpeg-59.so: missing dependency 'libavcodec.so.59'. (https://snapcraft.io/docs/linters-library)
- library: opt/my-app/lib/runtime/lib/libavplugin-ffmpeg-59.so: missing dependency 'libavformat.so.59'. (https://snapcraft.io/docs/linters-library)
- library: libjpackageapplauncheraux.so: unused library 'opt/my-app/lib/libapplauncher.so'. (https://snapcraft.io/docs/linters-library)
- library: libawt_headless.so: unused library 'opt/my-app/lib/runtime/lib/libawt_headless.so'. (https://snapcraft.io/docs/linters-library)
- library: libawt_xawt.so: unused library 'opt/my-app/lib/runtime/lib/libawt_xawt.so'. (https://snapcraft.io/docs/linters-library)
- library: libfontmanager.so: unused library 'opt/my-app/lib/runtime/lib/libfontmanager.so'. (https://snapcraft.io/docs/linters-library)
- library: libjavajpeg.so: unused library 'opt/my-app/lib/runtime/lib/libjavajpeg.so'. (https://snapcraft.io/docs/linters-library)
- library: libjawt.so: unused library 'opt/my-app/lib/runtime/lib/libjawt.so'. (https://snapcraft.io/docs/linters-library)
- library: libjfxwebkit.so: unused library 'opt/my-app/lib/runtime/lib/libjfxwebkit.so'. (https://snapcraft.io/docs/linters-library)
- library: libjimage.so: unused library 'opt/my-app/lib/runtime/lib/libjimage.so'. (https://snapcraft.io/docs/linters-library)
- library: libjli.so: unused library 'opt/my-app/lib/runtime/lib/libjli.so'. (https://snapcraft.io/docs/linters-library)
- library: libjsig.so: unused library 'opt/my-app/lib/runtime/lib/libjsig.so'. (https://snapcraft.io/docs/linters-library)
- library: libjsound.so: unused library 'opt/my-app/lib/runtime/lib/libjsound.so'. (https://snapcraft.io/docs/linters-library)
- library: liblcms.so: unused library 'opt/my-app/lib/runtime/lib/liblcms.so'. (https://snapcraft.io/docs/linters-library)
- library: libmanagement.so: unused library 'opt/my-app/lib/runtime/lib/libmanagement.so'. (https://snapcraft.io/docs/linters-library)
- library: libmlib_image.so: unused library 'opt/my-app/lib/runtime/lib/libmlib_image.so'. (https://snapcraft.io/docs/linters-library)
- library: libnet.so: unused library 'opt/my-app/lib/runtime/lib/libnet.so'. (https://snapcraft.io/docs/linters-library)
- library: libnio.so: unused library 'opt/my-app/lib/runtime/lib/libnio.so'. (https://snapcraft.io/docs/linters-library)
- library: libprefs.so: unused library 'opt/my-app/lib/runtime/lib/libprefs.so'. (https://snapcraft.io/docs/linters-library)
- library: libsplashscreen.so: unused library 'opt/my-app/lib/runtime/lib/libsplashscreen.so'. (https://snapcraft.io/docs/linters-library)
- library: libsyslookup.so: unused library 'opt/my-app/lib/runtime/lib/libsyslookup.so'. (https://snapcraft.io/docs/linters-library)
- library: libverify.so: unused library 'opt/my-app/lib/runtime/lib/libverify.so'. (https://snapcraft.io/docs/linters-library)
- library: libzip.so: unused library 'opt/my-app/lib/runtime/lib/libzip.so'. (https://snapcraft.io/docs/linters-library)
Command '['snap', 'pack', '--filename', 'my-app_2.0.0_amd64.snap', '--compression', 'xz', PosixPath('/root/prime'), PosixPath('/root/project')]' returned non-zero exit status 1.
Failed to execute pack in instance.
If I understand correctly, it’s complaining that I need to add libavcodec54 (and others) but these packages don’t appear to exist any more (or maybe aren’t available on core22)?
How can I resolve these dependencies on core22?
I’ve also tried core20 + gnome-3-38 combination and core18 + gnome-3-28 combination. Both of these report “file could not be opened successfully” I’m assuming because they don’t support the zst format that the .deb is using. The last option to try is to decompress the .deb and re-archive it in zip format (for example), and then try core18/20 again.