Search code examples
flatpak

How do I find out which flatpak sdk provides a certain library?


I'm trying my hand at packaging an application using flatpak. The metadata is pretty simple at the moment:

[Application]
name=io.brackets.App
runtime=org.gnome.Platform/x86_64/3.20
sdk=org.gnome.Sdk/x86_64/3.20
command=brackets

The application depends on certain libraries not contained in the sdk, as it fails at runtime:

/app/bin/brackets: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

I know how to find out the proper runtime in RPM land, but how do I find out what provides these libraries in flatpak?


Solution

  • Since GConf has been deprecated since (IIRC) the first release of Gnome 3, it's not in the Gnome runtime. You'll have to bundle it.

    Using flatpak-builder this will end up as a module similar to the following

        {
            "name": "gconf",
            "config-opts": ["--disable-orbit"],
            "sources" : [
                {
                    "type": "archive",
                    "url": "http://ftp.gnome.org/pub/GNOME/sources/GConf/3.2/GConf-3.2.6.tar.xz",
                    "sha256": "1912b91803ab09a5eed34d364bf09fe3a2a9c96751fde03a4e0cfa51a04d784c"
                }
            ]
        }
    

    An example of this can be found in the spotify flatpak wrapper