From 46e2c3517eefc838ce6ee980475bc65bc531b01a Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 3 Feb 2017 07:32:21 +0100 Subject: [PATCH] Backport a patch for overly strict appstream-util validate-relax --- ...-name-and-summary-for-validate-relax.patch | 29 +++++++++++++++++++ libappstream-glib.spec | 9 +++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 0001-Revert-Require-name-and-summary-for-validate-relax.patch diff --git a/0001-Revert-Require-name-and-summary-for-validate-relax.patch b/0001-Revert-Require-name-and-summary-for-validate-relax.patch new file mode 100644 index 0000000..7182b9f --- /dev/null +++ b/0001-Revert-Require-name-and-summary-for-validate-relax.patch @@ -0,0 +1,29 @@ +From efa74cb2b59071507e240b5aa89426269856c879 Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Fri, 3 Feb 2017 07:29:15 +0100 +Subject: [PATCH] Revert "Require name and summary for validate-relax" + +This made it too strict and started incorrectly failing apps that don't +have set in the appdata file and fall back to Comment in the +desktop file. + +This reverts commit 57e1575ebcf2c041071f32c2e79098c3f07c8987. +--- + libappstream-glib/as-app-validate.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libappstream-glib/as-app-validate.c b/libappstream-glib/as-app-validate.c +index b72fda7..1fa435f 100644 +--- a/libappstream-glib/as-app-validate.c ++++ b/libappstream-glib/as-app-validate.c +@@ -1066,6 +1066,7 @@ as_app_validate (AsApp *app, AsAppValidateFlags flags, GError **error) + require_translation = FALSE; + switch (as_app_get_source_kind (app)) { + case AS_APP_SOURCE_KIND_METAINFO: ++ case AS_APP_SOURCE_KIND_APPDATA: + require_name = FALSE; + break; + default: +-- +1.8.3.1 + diff --git a/libappstream-glib.spec b/libappstream-glib.spec index 67f7812..149d460 100644 --- a/libappstream-glib.spec +++ b/libappstream-glib.spec @@ -6,11 +6,14 @@ Summary: Library for AppStream metadata Name: libappstream-glib Version: 0.6.8 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv2+ URL: http://people.freedesktop.org/~hughsient/appstream-glib/ Source0: http://people.freedesktop.org/~hughsient/appstream-glib/releases/appstream-glib-%{version}.tar.xz +# Backported from upstream +Patch0: 0001-Revert-Require-name-and-summary-for-validate-relax.patch + BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: libtool BuildRequires: docbook-utils @@ -82,6 +85,7 @@ GLib headers and libraries for appstream-builder. %prep %setup -q -n appstream-glib-%{version} +%patch0 -p1 %build %configure \ @@ -150,6 +154,9 @@ make install DESTDIR=$RPM_BUILD_ROOT %{_datadir}/gir-1.0/AppStreamBuilder-1.0.gir %changelog +* Fri Feb 03 2017 Kalev Lember 0.6.8-2 +- Backport a patch for overly strict appstream-util validate-relax + * Thu Feb 02 2017 Kalev Lember 0.6.8-1 - New upstream release