| |
@@ -14,7 +14,8 @@
|
| |
the https://www.freedesktop.org/software/appstream/docs/sect-Quickstart-Addons.html[AppStream add-ons specification].
|
| |
|
| |
The AppData files MUST correctly validate using
|
| |
- `+appstream-util validate-relax+`.
|
| |
+ `+appstream-util validate-relax org.example.FooBar.metainfo.xml+` and
|
| |
+ `+appstreamcli validate org.example.FooBar.metainfo.xml+`.
|
| |
|
| |
.appdata.xml files
|
| |
NOTE: For historical reasons, AppStream specification also allows using
|
| |
@@ -44,9 +45,9 @@
|
| |
include::{examplesdir}/app.metainfo.xml[]
|
| |
----
|
| |
|
| |
- Application's AppData file MUST be named with the same root as the .desktop file,
|
| |
- so if the .desktop file is named `+org.gnome.SomeApp.desktop+`
|
| |
- then the AppData file MUST be called `+org.gnome.SomeApp.metainfo.xml+`.
|
| |
+ An application's metainfo file MUST be named with the same root as the .desktop file,
|
| |
+ so if the .desktop file is named `+org.example.FooBar.desktop+`
|
| |
+ then the AppData file MUST be called `+org.example.FooBar.metainfo.xml+`.
|
| |
|
| |
Here are the contents of a sample addon `+.metainfo.xml+` file
|
| |
(gedit-bookmarks.metainfo.xml):
|
| |
@@ -63,13 +64,16 @@
|
| |
== app-data-validate usage
|
| |
|
| |
Although you can just include the .metainfo.xml file in the package,
|
| |
- you MUST run `+appstream-util validate-relax+`
|
| |
+ you MUST run `+appstream-util validate-relax+` and
|
| |
+ you MUST run `+appstreamcli validate+`
|
| |
(in `+%check+` or `+%install+`)
|
| |
and have `+BuildRequires: libappstream-glib+`,
|
| |
+ and have `+BuildRequires: appstream+`,
|
| |
to help ensure the validity and safety
|
| |
of the appdata files you're installing.
|
| |
An example:
|
| |
|
| |
....
|
| |
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml
|
| |
+ appstreamcli validate --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml
|
| |
....
|
| |
The appstreamcli belonging to the appstream project supercedes appstream-util, which belongs to the appsttream-glib project:
https://github.com/hughsie/appstream-glib/issues/471#issuecomment-1650635348
https://github.com/ximion/appstream