我如何找出哪个 flatpak sdk 提供了某个库?

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

我正在尝试使用 flatpak 打包应用程序。目前元数据非常简单:

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

应用程序依赖于 sdk 中未包含的某些库,因为它在运行时失败:

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

我知道如何在 RPM 领域找到合适的运行时,但我如何找到在 flatpak 中提供这些库的是什么?

由于 GConf 自 (IIRC) Gnome 3 的第一个版本以来已被弃用,因此它不在 Gnome 运行时中。你必须捆绑它。

使用flatpak-builder这将最终成为类似于以下的模块

    {
        "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"
            }
        ]
    }

可以在 spotify flatpak wrapper

中找到这方面的示例