[GRASS-dev] [GRASS GIS] #3388: Legacy appstream metadata

#3388: Legacy appstream metadata
----------------------------+-------------------------
Reporter: Bas Couwenberg | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.2.2
Component: Default | Version: 7.2.1
Keywords: appstream | CPU: Unspecified
Platform: Linux |
----------------------------+-------------------------
The [https://www.freedesktop.org/software/appstream/docs/chap-
Metadata.html AppSteam] metadata is installed in the legacy location
(`/usr/share/appdata`), it should now be installed in
`/usr/share/metainfo`.

The `.appdata.xml` file should now be named `.metainfo.xml`, and the
syntax has changed.

There are a couple of validation issues reported:
{{{
$ appstreamcli validate gui/icons/grass.appdata.xml
W - grass.appdata.xml:grass.desktop:4
     The component ID is not a reverse domain-name. Please update the ID
and that of
     the accompanying .desktop file to follow the latest version of the
Desktop-Entry
     and AppStream specifications and avoid future issues.

E - grass.appdata.xml:grass.desktop
     The component is missing a name (<name/> tag).

E - grass.appdata.xml:grass.desktop:9
     The description contains an URL. This is not allowed, please use the
<url/> tag
     to share links.

Validation failed: errors: 2, warnings: 1
}}}

The changes to the AppStream metadata are likely to trigger changes to the
`.desktop` file too (e.g. the reverse domain ID).

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3388&gt;
GRASS GIS <https://grass.osgeo.org>

#3388: Legacy appstream metadata
-----------------------------+-------------------------
  Reporter: Bas Couwenberg | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.2
Component: Default | Version: 7.2.1
Resolution: | Keywords: appstream
       CPU: Unspecified | Platform: Linux
-----------------------------+-------------------------

Comment (by neteler):

But would such changes be backward compatible? The appdata metadata used
on various distros, probably not all come with the latest related tools?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3388#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3388: Legacy appstream metadata
-----------------------------+-------------------------
  Reporter: Bas Couwenberg | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.2
Component: Default | Version: 7.2.1
Resolution: | Keywords: appstream
       CPU: Unspecified | Platform: Linux
-----------------------------+-------------------------

Comment (by Bas Couwenberg):

The AppStream specification doesn't mention backwards compatibility.

I guess that just using the path and format from the (current)
specification is sufficient. I'm not aware of any consumers that expect
the old `/usr/share/appdata` path.

Alternatively maintain two files with the old and new formats and their
respective installation path.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3388#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3388: Legacy appstream metadata
-----------------------------+-------------------------
  Reporter: Bas Couwenberg | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.3
Component: Default | Version: 7.2.1
Resolution: | Keywords: appstream
       CPU: Unspecified | Platform: Linux
-----------------------------+-------------------------

Comment (by neteler):

Updated in trunk: r71777; in relbr74: r71776; in relbr72: r71778.

Validated OK on Fedora with:

{{{
appstream-util validate gui/icons/grass.appdata.xml
}}}

TODO (if a todo): rename grass.appdata.xml file to grass.metainfo.xml (?)

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3388#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#3388: Legacy appstream metadata
-----------------------------+-------------------------
  Reporter: Bas Couwenberg | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.3
Component: Default | Version: 7.2.1
Resolution: | Keywords: appstream
       CPU: Unspecified | Platform: Linux
-----------------------------+-------------------------

Comment (by neteler):

Bas, anything missing here?

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3388#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>

#3388: Legacy appstream metadata
-----------------------------+-------------------------
  Reporter: Bas Couwenberg | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.3
Component: Default | Version: 7.2.1
Resolution: | Keywords: appstream
       CPU: Unspecified | Platform: Linux
-----------------------------+-------------------------

Comment (by Bas Couwenberg):

Instead of installing the file as `/usr/share/appdata/grass.appdata.xml`
it should be installed as
`/usr/share/metainfo/org.osgeo.grass.appdata.xml`.

The Debian package does that because lintian complains about the legacy
location.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3388#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>

#3388: Legacy appstream metadata
-----------------------------+-------------------------
  Reporter: Bas Couwenberg | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.3
Component: Default | Version: 7.2.1
Resolution: | Keywords: appstream
       CPU: Unspecified | Platform: Linux
-----------------------------+-------------------------

Comment (by neteler):

Please check if r72356 makes sense (trunk). Then I'll backport it.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3388#comment:7&gt;
GRASS GIS <https://grass.osgeo.org>

#3388: Legacy appstream metadata
-----------------------------+-------------------------
  Reporter: Bas Couwenberg | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.2.3
Component: Default | Version: 7.2.1
Resolution: | Keywords: appstream
       CPU: Unspecified | Platform: Linux
-----------------------------+-------------------------

Comment (by Bas Couwenberg):

That's what the Debian package does as well, that should be fine.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3388#comment:8&gt;
GRASS GIS <https://grass.osgeo.org>

#3388: Legacy appstream metadata
-----------------------------+-------------------------
  Reporter: Bas Couwenberg | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.2.3
Component: Default | Version: 7.2.1
Resolution: fixed | Keywords: appstream
       CPU: Unspecified | Platform: Linux
-----------------------------+-------------------------
Changes (by neteler):

* status: new => closed
* resolution: => fixed

Comment:

Backported to 7.4.svn, 7.2.svn, 7.0.svn, and 6.4.svn. Closing.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3388#comment:9&gt;
GRASS GIS <https://grass.osgeo.org>