I have packaged a test “Hello World” app as an binary RPM (using rpmbuild). I have followed all the guidelines regarding .desktop and metainfo.xml files.
I can install and remove my RPM app from the command line (using dnf) and the app appears to show correctly in Gnome Software.
HOWEVER, the “Open” and “Uninstall” buttons do nothing when clicked. See the screenshot.
I’m guessing this is an AppStream metainfo issue, however, it seems that Gnome Software picks up on the AppStream metainfo and desktop files. I cannot fathom why it cannot launch the app or uninstall it.
What do I need to do to make these buttons work? Are there any logs which will help me diagnose the problem?
/usr/share/applications/net.example.hellopuppy.desktop
[Desktop Entry]
Type=Application
Name=Hello Puppy
Icon=net.example.hellopuppy
Comment=A HelloWorld application
Exec=/opt/net.example.hellopuppy/HelloPuppy
TryExec=/opt/net.example.hellopuppy/HelloPuppy
Terminal=true
Categories=Utility
MimeType=
Keywords=
/usr/share/metainfo/net.example.hellopuppy.metainfo.xml
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>net.example.hellopuppy</id>
<name>HelloPuppy</name>
<summary>A HelloWorld application</summary>
<developer_name>Acme Ltd</developer_name>
<url type="homepage">https://example.net</url>
<metadata_license>MIT</metadata_license>
<project_license>GPL-3.0-or-later</project_license>
<content_rating type="oars-1.1" />
<description>
<p>This is a longer application description. REPLACE THIS WITH YOUR OWN.
IMPORTANT: In this file, you can use supported macros. See the --help output for details.</p>
</description>
<releases>
<release version="1.0.0" date="2023-03-04">
<description><p>The latest release.</p></description>
</release>
</releases>
<screenshots>
<screenshot type="default">
<image>https://i.postimg.cc/0jc8xxxC/Hello-Computer.png</image>
</screenshot>
</screenshots>
<launchable type="desktop-id">net.example.hellopuppy.desktop</launchable>
</component>
RPM SPEC
And here is the RPM SPEC file. Here, I am building a binary RPM from the output of C# dotnet. There’s no make or autotools here (and yes we have .dll extension under linux), so I’m just including the files in pre-built directory structure.
NOTE. While I’m putting all the metadata under /usr/share, I’m actually installing the app binary itself under the “/opt/appname” directory, so that all the dotnet DLL files can live together in the same place. Any problems with this BTW?
Name: HelloPuppy
Version: 1.0.0
Release: 1
BuildArch: x86_64
Summary: A HelloWorld application
License: GPL-3.0-or-later
Vendor: Acme Ltd
Url: https://example.net
AutoReqProv: no
BuildRequires: libappstream-glib
%check
desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/net.example.hellopuppy.metainfo.xml
%description
A HelloWorld application
%files
/opt/net.example.hellopuppy/Microsoft.CSharp.dll
/opt/net.example.hellopuppy/HelloPuppy.dll
/opt/net.example.hellopuppy/HelloPuppy.deps.json
[REMOVED MOST APP FILES TO SHORTEN POST]
/opt/net.example.hellopuppy/libmscordaccore.so
/opt/net.example.hellopuppy/libmscordbi.so
/opt/net.example.hellopuppy/HelloPuppy
/usr/bin/hellopuppy
/usr/share/applications/net.example.hellopuppy.desktop
/usr/share/metainfo/net.example.hellopuppy.metainfo.xml
/usr/share/icons/hicolor/48x48/apps/net.example.hellopuppy.png
/usr/share/icons/hicolor/32x32/apps/net.example.hellopuppy.png
/usr/share/icons/hicolor/24x24/apps/net.example.hellopuppy.png
/usr/share/icons/hicolor/16x16/apps/net.example.hellopuppy.png
/usr/share/icons/hicolor/scalable/apps/net.example.hellopuppy.svg