From a0d6fc2d63220b2a941b55c37ac0cf6af324b368 Mon Sep 17 00:00:00 2001 From: Guilherme Silva <626206+guihkx@users.noreply.github.com> Date: Wed, 21 Feb 2024 15:19:37 -0300 Subject: [PATCH] Linux: Fixes for AppStream metadata validation using `appstreamcli` (#1302) * Linux: Remove redundant 'content_rating' tag in AppData file This fixes a validation error given by appstreamcli: $ appstreamcli validate io.github.martinrotter.rssguardlite.appdata.xml E: io.github.martinrotter.rssguardlite:69: tag-duplicated content_rating https://www.freedesktop.org/software/appstream/docs/chap-Validation.html#asv-tag-duplicated * Linux: Replace deprecated 'developer_name' tag in AppData file This is not strictly necessary, but it does fix a deprecation message shown when validating with appstreamcli, a tool that replaced appstream-util: $ appstreamcli validate io.github.martinrotter.rssguardlite.appdata.xml I: io.github.martinrotter.rssguardlite:8: developer-name-tag-deprecated https://www.freedesktop.org/software/appstream/docs/chap-Validation.html#asv-developer-name-tag-deprecated * Linux: Replace appstream-util by appstreamcli to validate AppData file The appstream-util tool (from appstream-glib) is essentially deprecated in favor of appstreamcli (from appstream): https://github.com/hughsie/appstream-glib --- resources/desktop/rssguard.metainfo.xml.in | 5 +++-- resources/scripts/github-actions/build-linux-mac.sh | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/desktop/rssguard.metainfo.xml.in b/resources/desktop/rssguard.metainfo.xml.in index cfc23d281..72b5549dd 100644 --- a/resources/desktop/rssguard.metainfo.xml.in +++ b/resources/desktop/rssguard.metainfo.xml.in @@ -5,7 +5,9 @@ CC0-1.0 GPL-3.0 @APPDATA_NAME@ - Martin Rotter + + Martin Rotter + rotter.martinos_AT_gmail.com @APPDATA_SUMMARY@ @@ -65,7 +67,6 @@ The Old Reader Tiny Tiny RSS - diff --git a/resources/scripts/github-actions/build-linux-mac.sh b/resources/scripts/github-actions/build-linux-mac.sh index f790ba98f..081e4e57d 100755 --- a/resources/scripts/github-actions/build-linux-mac.sh +++ b/resources/scripts/github-actions/build-linux-mac.sh @@ -42,7 +42,7 @@ if [ $is_linux = true ]; then sudo add-apt-repository ppa:beineri/opt-qt-5.15.4-focal -y sudo apt-get update - sudo apt-get -qy install qt515tools qt515base qt515webengine qt515svg qt515multimedia qt515imageformats appstream-util + sudo apt-get -qy install qt515tools qt515base qt515webengine qt515svg qt515multimedia qt515imageformats appstream sudo apt-get -qy install cmake ninja-build openssl libssl-dev libgl1-mesa-dev gstreamer1.0-alsa gstreamer1.0-nice gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-qt5 gstreamer1.0-pulseaudio libmpv-dev # The script below performs some broken testing, which ends up tripping 'set -e'. @@ -93,7 +93,7 @@ cmake --install . --prefix "$prefix" if [ $is_linux = true ]; then # Validate AppStream metadata. echo 'Validating AppStream metadata...' - appstream-util validate-relax "$prefix/share/metainfo/$app_id.metainfo.xml" + appstreamcli validate "$prefix/share/metainfo/$app_id.metainfo.xml" # Obtain linuxdeployqt. wget -qc https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage chmod a+x linuxdeployqt-continuous-x86_64.AppImage