diff --git a/0002-Treat-the-text-plain-mimetype-equal-to-YAML-or-XML.patch b/0002-Treat-the-text-plain-mimetype-equal-to-YAML-or-XML.patch new file mode 100644 index 0000000..4ba45c4 --- /dev/null +++ b/0002-Treat-the-text-plain-mimetype-equal-to-YAML-or-XML.patch @@ -0,0 +1,39 @@ +From c5e9ce4e907dc5dee5e8afdb441dc745b2c3e71c Mon Sep 17 00:00:00 2001 +From: Matthias Klumpp +Date: Mon, 22 Sep 2014 17:30:09 +0200 +Subject: [PATCH 2/5] Treat the text/plain mimetype equal to YAML or XML + +--- + src/data-providers/appstream-xml.c | 2 +- + src/data-providers/debian-dep11.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/data-providers/appstream-xml.c b/src/data-providers/appstream-xml.c +index 1791042..40e390b 100644 +--- a/src/data-providers/appstream-xml.c ++++ b/src/data-providers/appstream-xml.c +@@ -276,7 +276,7 @@ as_provider_xml_real_execute (AsDataProvider* base) + continue; + } + content_type = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE); +- if (g_strcmp0 (content_type, "application/xml") == 0) { ++ if ((g_strcmp0 (content_type, "application/xml") == 0) || (g_strcmp0 (content_type, "text/plain") == 0)) { + ret = as_provider_xml_process_file (dprov, infile); + } else if (g_strcmp0 (content_type, "application/gzip") == 0 || + g_strcmp0 (content_type, "application/x-gzip") == 0) { +diff --git a/src/data-providers/debian-dep11.c b/src/data-providers/debian-dep11.c +index 630fe30..e826e4f 100644 +--- a/src/data-providers/debian-dep11.c ++++ b/src/data-providers/debian-dep11.c +@@ -794,7 +794,7 @@ as_provider_dep11_real_execute (AsDataProvider* base) + continue; + } + content_type = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE); +- if (g_strcmp0 (content_type, "application/x-yaml") == 0) { ++ if ((g_strcmp0 (content_type, "application/x-yaml") == 0) || (g_strcmp0 (content_type, "text/plain") == 0)) { + ret = as_provider_dep11_process_file (dprov, infile); + } else if (g_strcmp0 (content_type, "application/gzip") == 0 || + g_strcmp0 (content_type, "application/x-gzip") == 0) { +-- +2.1.0 + diff --git a/0004-spec-Update-the-icon-cache-layout-to-allow-icons-wit.patch b/0004-spec-Update-the-icon-cache-layout-to-allow-icons-wit.patch new file mode 100644 index 0000000..27fe53b --- /dev/null +++ b/0004-spec-Update-the-icon-cache-layout-to-allow-icons-wit.patch @@ -0,0 +1,42 @@ +From c084ad4841cca401d4819bb1bc863ecb06685548 Mon Sep 17 00:00:00 2001 +From: Matthias Klumpp +Date: Fri, 26 Sep 2014 15:15:05 +0200 +Subject: [PATCH 4/5] spec: Update the icon-cache layout to allow icons with + larger sizes + +--- + docs/sources/distrospec/iconcache.xml | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/docs/sources/distrospec/iconcache.xml b/docs/sources/distrospec/iconcache.xml +index 695c0fd..b2f351f 100644 +--- a/docs/sources/distrospec/iconcache.xml ++++ b/docs/sources/distrospec/iconcache.xml +@@ -20,12 +20,21 @@ +
+ Filesystem locations + +- All icons should be placed in /usr/share/app-info/icons/%{origin}/ or /var/cache/app-info/icons/%{origin}/, +- where origin is the AppStream data origin defined in the AppStream data file (see ). ++ All icons of type cached must be placed in /usr/share/app-info/icons/%{origin}/%{size}/ or /var/cache/app-info/icons/%{origin}/%{size}/, ++ where origin is the AppStream data origin defined in the AppStream data file (see ), and size ++ is 64x64 or 128x128 depending on the size of the icon. And icon might be present with different sizes in both directories. + + +- The icon directory should not have subdirectories at the current time. All icons are store in one size. ++ For example the cache icon krita.png of a component in a data file with the origin jessie should be stored in ++ /usr/share/app-info/icons/jessie/64x64/krita.png (or in the /var/cache location). + ++ ++ Legacy Support ++ ++ In order to support the old icon cache layout, client applications may also look for icons in the folder below the size-directories, assuming ++ that the icons placed there are of size 64x64 pixels. ++ ++ +
+ + +-- +2.1.0 + diff --git a/0005-Include-QMultiHash.patch b/0005-Include-QMultiHash.patch new file mode 100644 index 0000000..88c7d54 --- /dev/null +++ b/0005-Include-QMultiHash.patch @@ -0,0 +1,39 @@ +From 1f3690d1f2ff28c62aa244264f23f26a68589a01 Mon Sep 17 00:00:00 2001 +From: Aleix Pol +Date: Tue, 30 Sep 2014 15:53:11 +0200 +Subject: [PATCH 5/5] Include QMultiHash + +Otherwise it fails to build on some systems. It's used so it needs +to be pulled. +--- + qt/src/component.cpp | 1 + + qt/src/database.cpp | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/qt/src/component.cpp b/qt/src/component.cpp +index a829edd..5b84c0a 100644 +--- a/qt/src/component.cpp ++++ b/qt/src/component.cpp +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + using namespace Appstream; + +diff --git a/qt/src/database.cpp b/qt/src/database.cpp +index 3279e9b..ff0720f 100644 +--- a/qt/src/database.cpp ++++ b/qt/src/database.cpp +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + + using namespace Appstream; + +-- +2.1.0 + diff --git a/appstream.spec b/appstream.spec index 912e73b..8612a4a 100644 --- a/appstream.spec +++ b/appstream.spec @@ -1,8 +1,11 @@ +# Qt5 support uses the same library names +#global qt5 1 + Summary: Utilities to generate, maintain and access the AppStream Xapian database Name: appstream Version: 0.7.2 -Release: 1%{?dist} +Release: 2%{?dist} # lib LGPLv2+, tools GPLv2+ License: GPLv2+ and LGPLv2+ @@ -10,6 +13,9 @@ URL: http://www.freedesktop.org/wiki/Distributions/AppStream/Software Source0: http://www.freedesktop.org/software/appstream/releases/AppStream-%{version}.tar.xz ## upstream patches +Patch2: 0002-Treat-the-text-plain-mimetype-equal-to-YAML-or-XML.patch +Patch4: 0004-spec-Update-the-icon-cache-layout-to-allow-icons-wit.patch +Patch5: 0005-Include-QMultiHash.patch ## upstreamable patches @@ -101,7 +107,7 @@ pushd %{_target_platform}-qt5 .. popd -make %{?_smp_mflags} -C %{_target_platform}-qt5 +make -j1 -C %{_target_platform}-qt5 %endif @@ -127,10 +133,7 @@ make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300" ||: %postun -p /sbin/ldconfig %posttrans -## include this scriptlet *somewhere*, but only if it is safe and -## won't hang or take a long time, see -## https://bugzilla.redhat.com/1098306 -%{_bindir}/appstream-index --refresh --force >& /dev/null ||: +%{_bindir}/appstream-index refresh --force >& /dev/null ||: %files -f appstream.lang %doc AUTHORS @@ -178,6 +181,9 @@ make test -C %{_target_platform} ARGS="--output-on-failure --timeout 300" ||: %changelog +* Tue Sep 30 2014 Rex Dieter 0.7.2-2 +- pull in some upstream fixes, fix %%posttrans scriptlet + * Tue Sep 30 2014 Rex Dieter 0.7.2-1 - 0.7.2, ready qt5 support (not enabled yet)