From 99a7eb4fbe5a313870b8d6ba5ff4c07b4d8e8ea0 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Mon, 28 Oct 2019 18:58:48 +0100 Subject: [PATCH] Validate appdata file in %check and fix the validation to pass This ensures that we fail early, instead of failing during the flatpak building that checks that the appdata files are valid. https://gitlab.gnome.org/GNOME/evince/merge_requests/197 --- evince-appdata-validate-patch | 27 +++++++++++++++++++++++++++ evince.spec | 3 +++ 2 files changed, 30 insertions(+) create mode 100644 evince-appdata-validate-patch diff --git a/evince-appdata-validate-patch b/evince-appdata-validate-patch new file mode 100644 index 0000000..cf7d0a3 --- /dev/null +++ b/evince-appdata-validate-patch @@ -0,0 +1,27 @@ +From df320fd57d9dae6a4600ddcd795809e495c7ae6b Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Mon, 28 Oct 2019 20:03:55 +0100 +Subject: [PATCH] AppData: Fix validation error + +Remove the 3.30.3 release from the appdata file to make 'appstream-util +validate-relax' not error out on the release tag order. + +tag-invalid : versions are not in order [3.30.3 before 3.32.0] +--- + org.gnome.Evince.appdata.xml.in | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/org.gnome.Evince.appdata.xml.in b/org.gnome.Evince.appdata.xml.in +index 5f19b3d5..c5aa8989 100644 +--- a/org.gnome.Evince.appdata.xml.in ++++ b/org.gnome.Evince.appdata.xml.in +@@ -110,6 +110,5 @@ + + + +- + + +-- +2.23.0 + diff --git a/evince.spec b/evince.spec index 9d30a6c..93599ad 100644 --- a/evince.spec +++ b/evince.spec @@ -15,6 +15,8 @@ Source0: https://download.gnome.org/sources/%{name}/3.34/%{name}-%{versio # https://bugzilla.gnome.org/show_bug.cgi?id=766749 Patch0: 0001-Resolves-deb-762530-rhbz-1061177-add-man-pages.patch +# https://gitlab.gnome.org/GNOME/evince/merge_requests/197 +Patch1: evince-appdata-validate-patch # https://bugzilla.redhat.com/show_bug.cgi?id=1753830 Patch1: evince-text-drag.patch @@ -173,6 +175,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/*.a %check +appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_datadir}/metainfo/org.gnome.Evince.appdata.xml desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince.desktop desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Evince-previewer.desktop