getsolus / packages

Solus Package Monorepo & Issue Tracker
66 stars 86 forks source link

appstream: Add metainfo to all packages containing a .desktop file #1389

Open joebonrichie opened 10 months ago

joebonrichie commented 10 months ago

As we plan to ship GNOME Software / Discover to replace solus-sc, it's important that all graphical packages contain appstream metainfo. This is due to the fact that G-S/Discover only show packages with appstream data. For better discoverability all graphical packages should provide this.

A package should provide appstream metainfo if it contains a .desktop file. e.g. /usr/share/applications/foo.desktop

Valid paths for appstream metainfo are: /usr/share/metainfo/org.some.package.xml /usr/share/appdata/org.some.package.xml <- legacy, discouraged.

Since appstream builder can't handle symlinks, the package.yml file should use install for the metadata file rather than a symlink

We have a separate issue for tracking truetype/opentype font packages without appstream metainfo.xml files here: https://github.com/getsolus/packages/issues/449

Scenarios

Scenario 1: An application already provides appstream metainfo. Solution: Nothing to do.

Scenario 2: An application contains appstream metainfo in the source package but we do not install it. Solution: Install the appstream metainfo to /usr/share/metainfo Example: https://github.com/getsolus/packages/commit/0a726a53454e7c8a6b0e66de69d59bcc66f0fc19

Scenario 3: An application doesn't contain appstream metainfo in the source package but it exists on flathub. Solution: Borrow and tweak the appstream metainfo from the flathub repo. Encourage upstream to add it to their source. Example: https://github.com/getsolus/packages/commit/da2f65b93f412da43d1db9edbcb08bb90517a0eb

Scenario 4: An application doesn't provide appstream metainfo and it doesn't exist on flathub Solution: Write the appstream data, submit it to upstream.Appstream data can be created using this webapp. Use CC0-1.0 (Creative Commons Zero v1.0 Universal) as the metadata license Example: https://github.com/getsolus/packages/commit/414219d8b2ceeabe85178d3a467f81b9131016f4

Scenario 5: Appstream metainfo is provided but generation of it is failing Solution: See https://github.com/getsolus/solus-appstream-data#debugging-failures Example: https://github.com/getsolus/packages/commit/583b7c742caf50e2f66a70e9b62e9b91566c03f5

Testing appstream data

See https://github.com/getsolus/solus-appstream-data#testing-individual-packages

Note that after adding appstream data to a package it will not show up in solus-sc/G-S/Discover until we refresh appstream data for the entire repo (normally every couple of weeks).

Other Info

Generally speaking, a package must provide one appstream metainfo file, an icon as well as an .desktop file to succeed. However, there are exceptions to this. If an application provides more than one appstream metainfo file then the package must be subpackaged to generation of all the appstream metainfo files to succeed.

The List

malfisya commented 10 months ago

I will start from games component, that's where GUI at.