#1299 Update guidelines/modules/ROOT/pages/AppData.adoc to reference new validation tool
Opened 8 months ago by alexanderwilms. Modified 8 months ago
alexanderwilms/packaging-committee master  into  master

@@ -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

This is a known issue: https://pagure.io/packaging-committee/issue/1053

Long story short: Both tools / libraries are still in use, so we would actually need to validate with both tools.

rebased onto cac9c28

8 months ago

1 new commit added

  • Require validation using both appstream-util and appstreamcli
8 months ago

Ah, I had come across that issue some time ago.

Should I mention both tools? Maybe that'd ease the transition.

Or should I leave it be until there's a decision?

Metadata