Compare commits

...

10 Commits

Author SHA1 Message Date
Milan Crha 2be666eaa5 Resolves: RHEL-39680 (Build fedora-langpacks subpackage only in Fedora) 2024-06-03 10:29:49 +02:00
Milan Crha 8e7863136e Resolves: RHEL-38644 (Update to 46.2) 2024-05-28 07:28:32 +02:00
Milan Crha bfb401bf61 Resolves: RHEL-34658 (Update to 46.1) 2024-04-29 10:02:32 +02:00
Milan Crha d248e35b02 Resolves: RHEL-30226 (Backport Fedora 40 changes)
- Update to 46.0
2024-03-25 10:04:29 +01:00
Milan Crha e1a74cef52 Update to 46.beta 2024-02-09 10:05:49 +01:00
Milan Crha 0b4b0060f8 Resolves: #2260294 (Split fedora-langpacks plugin into a subpackage) 2024-01-26 11:02:25 +01:00
Fedora Release Engineering 881bbc7f12 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 15:41:25 +00:00
Fedora Release Engineering 2152c30083 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 23:07:23 +00:00
Milan Crha ef76ba9941 Update to 46.alpha 2024-01-05 10:28:23 +01:00
Troy Dawson 3140f37d2d ostree and flatpak not on i686 for RHEL 10
Signed-off-by: Troy Dawson <tdawson@redhat.com>
2023-12-19 09:38:23 -08:00
3 changed files with 62 additions and 514 deletions

View File

@ -1,507 +0,0 @@
From e6f7e28bdd50a63586ba6a82b936d54db19a311b Mon Sep 17 00:00:00 2001
From: Matthias Klumpp <matthias@tenstral.net>
Date: Sun, 8 Oct 2023 20:22:44 +0200
Subject: [PATCH] Adjust to build with AppStream 1.0 as well as 0.16.x
---
lib/gs-app.c | 4 ++
lib/gs-appstream.c | 58 ++++++++++++++++++++----
lib/gs-utils.c | 8 ++--
meson.build | 22 +--------
plugins/core/gs-plugin-appstream.c | 8 ----
plugins/fwupd/gs-fwupd-app.c | 8 ++++
plugins/fwupd/gs-plugin-fwupd.c | 4 ++
src/gs-hardware-support-context-dialog.c | 6 +++
src/gs-repos-dialog.c | 4 ++
src/gs-screenshot-carousel.c | 4 +-
src/gs-screenshot-image.c | 41 +++++++++++++----
src/gs-screenshot-image.h | 7 +++
subprojects/appstream.wrap | 2 +-
13 files changed, 120 insertions(+), 56 deletions(-)
diff --git a/lib/gs-app.c b/lib/gs-app.c
index 048a061225..e2694057cd 100644
--- a/lib/gs-app.c
+++ b/lib/gs-app.c
@@ -609,7 +609,11 @@ gs_app_to_string_append (GsApp *app, GString *str)
AsScreenshot *ss = g_ptr_array_index (priv->screenshots, i);
g_autofree gchar *key = NULL;
tmp = as_screenshot_get_caption (ss);
+#if AS_CHECK_VERSION(1, 0, 0)
+ im = as_screenshot_get_image (ss, 0, 0, 1);
+#else
im = as_screenshot_get_image (ss, 0, 0);
+#endif
if (im == NULL)
continue;
key = g_strdup_printf ("screenshot-%02u", i);
diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
index deca176dcf..2cc2427a19 100644
--- a/lib/gs-appstream.c
+++ b/lib/gs-appstream.c
@@ -1011,8 +1011,11 @@ gs_appstream_refine_app_relation (GsApp *app,
as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_CONTROL);
as_relation_set_value_control_kind (relation, as_control_kind_from_string (xb_node_get_text (child)));
} else if (g_str_equal (item_kind, "display_length")) {
- AsDisplayLengthKind display_length_kind;
const gchar *compare;
+ const gchar *side;
+#if !AS_CHECK_VERSION(1, 0, 0)
+ AsDisplayLengthKind display_length_kind;
+#endif
/* https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations-display_length */
as_relation_set_item_kind (relation, AS_RELATION_ITEM_KIND_DISPLAY_LENGTH);
@@ -1020,15 +1023,21 @@ gs_appstream_refine_app_relation (GsApp *app,
compare = xb_node_get_attr (child, "compare");
as_relation_set_compare (relation, (compare != NULL) ? as_relation_compare_from_string (compare) : AS_RELATION_COMPARE_GE);
+#if AS_CHECK_VERSION(1, 0, 0)
+ side = xb_node_get_attr (child, "side");
+ as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
+ as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
+#else
display_length_kind = as_display_length_kind_from_string (xb_node_get_text (child));
if (display_length_kind != AS_DISPLAY_LENGTH_KIND_UNKNOWN) {
/* Ignore the `side` attribute */
as_relation_set_value_display_length_kind (relation, display_length_kind);
} else {
- const gchar *side = xb_node_get_attr (child, "side");
+ side = xb_node_get_attr (child, "side");
as_relation_set_display_side_kind (relation, (side != NULL) ? as_display_side_kind_from_string (side) : AS_DISPLAY_SIDE_KIND_SHORTEST);
as_relation_set_value_px (relation, xb_node_get_text_as_uint (child));
}
+#endif
} else {
g_debug ("Relation type %s not currently supported for %s; ignoring",
item_kind, gs_app_get_id (app));
@@ -1472,7 +1481,7 @@ gs_appstream_refine_app (GsPlugin *plugin,
}
typedef struct {
- AsSearchTokenMatch match_value;
+ guint16 match_value;
XbQuery *query;
} GsAppstreamSearchHelper;
@@ -1522,7 +1531,7 @@ gs_appstream_silo_search_component (GPtrArray *array, XbNode *component, const g
}
typedef struct {
- AsSearchTokenMatch match_value;
+ guint16 match_value;
const gchar *xpath;
} Query;
@@ -1585,7 +1594,11 @@ gs_appstream_do_search (GsPlugin *plugin,
* Drop the ID token from it as its the highest
* numeric value but isnt visible to the user in the
* UI, which leads to confusing results ordering. */
+#if AS_CHECK_VERSION(1, 0, 0)
+ gs_app_set_match_value (app, match_value & (~as_utils_get_tag_search_weight ("id")));
+#else
gs_app_set_match_value (app, match_value & (~AS_SEARCH_TOKEN_MATCH_ID));
+#endif
gs_app_list_add (list, app);
if (gs_app_get_kind (app) == AS_COMPONENT_KIND_ADDON) {
@@ -1624,18 +1637,32 @@ gs_appstream_search (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
+#if AS_CHECK_VERSION(1, 0, 0)
+ guint16 pkgname_weight = as_utils_get_tag_search_weight ("pkgname");
+ guint16 name_weight = as_utils_get_tag_search_weight ("name");
+ guint16 id_weight = as_utils_get_tag_search_weight ("id");
const Query queries[] = {
- #ifdef HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE
- { AS_SEARCH_TOKEN_MATCH_MEDIATYPE, "mimetypes/mimetype[text()~=stem(?)]" },
- #else
- { AS_SEARCH_TOKEN_MATCH_MIMETYPE, "mimetypes/mimetype[text()~=stem(?)]" },
- #endif
+ { as_utils_get_tag_search_weight ("mediatype"), "provides/mediatype[text()~=stem(?)]" },
/* Search once with a tokenize-and-casefold operator (`~=`) to support casefolded
* full-text search, then again using substring matching (`contains()`), to
* support prefix matching. Only do the prefix matches on a few fields, and at a
* lower priority, otherwise things will get confusing.
- *
+ *
* See https://gitlab.gnome.org/GNOME/gnome-software/-/issues/2277 */
+ { pkgname_weight, "pkgname[text()~=stem(?)]" },
+ { pkgname_weight / 2, "pkgname[contains(text(),stem(?))]" },
+ { as_utils_get_tag_search_weight ("summary"), "summary[text()~=stem(?)]" },
+ { name_weight, "name[text()~=stem(?)]" },
+ { name_weight / 2, "name[contains(text(),stem(?))]" },
+ { as_utils_get_tag_search_weight ("keyword"), "keywords/keyword[text()~=stem(?)]" },
+ { id_weight, "id[text()~=stem(?)]" },
+ { id_weight, "launchable[text()~=stem(?)]" },
+ { as_utils_get_tag_search_weight ("origin"), "../components[@origin~=stem(?)]" },
+ { 0, NULL }
+ };
+#else
+ const Query queries[] = {
+ { AS_SEARCH_TOKEN_MATCH_MEDIATYPE, "mimetypes/mimetype[text()~=stem(?)]" },
{ AS_SEARCH_TOKEN_MATCH_PKGNAME, "pkgname[text()~=stem(?)]" },
{ AS_SEARCH_TOKEN_MATCH_PKGNAME / 2, "pkgname[contains(text(),stem(?))]" },
{ AS_SEARCH_TOKEN_MATCH_SUMMARY, "summary[text()~=stem(?)]" },
@@ -1647,6 +1674,7 @@ gs_appstream_search (GsPlugin *plugin,
{ AS_SEARCH_TOKEN_MATCH_ORIGIN, "../components[@origin~=stem(?)]" },
{ AS_SEARCH_TOKEN_MATCH_NONE, NULL }
};
+#endif
return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
}
@@ -1659,11 +1687,21 @@ gs_appstream_search_developer_apps (GsPlugin *plugin,
GCancellable *cancellable,
GError **error)
{
+#if AS_CHECK_VERSION(1, 0, 0)
+ const Query queries[] = {
+ { as_utils_get_tag_search_weight ("pkgname"), "developer/name[text()~=stem(?)]" },
+ { as_utils_get_tag_search_weight ("summary"), "project_group[text()~=stem(?)]" },
+ /* for legacy support */
+ { as_utils_get_tag_search_weight ("pkgname"), "developer_name[text()~=stem(?)]" },
+ { 0, NULL }
+ };
+#else
const Query queries[] = {
{ AS_SEARCH_TOKEN_MATCH_PKGNAME, "developer_name[text()~=stem(?)]" },
{ AS_SEARCH_TOKEN_MATCH_SUMMARY, "project_group[text()~=stem(?)]" },
{ AS_SEARCH_TOKEN_MATCH_NONE, NULL }
};
+#endif
return gs_appstream_do_search (plugin, silo, values, queries, list, cancellable, error);
}
diff --git a/lib/gs-utils.c b/lib/gs-utils.c
index cf9073025f..19e6ebd046 100644
--- a/lib/gs-utils.c
+++ b/lib/gs-utils.c
@@ -1694,9 +1694,9 @@ gs_utils_gstring_replace (GString *str,
const gchar *find,
const gchar *replace)
{
- #ifdef HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS
+#if AS_CHECK_VERSION(1, 0, 0)
as_gstring_replace (str, find, replace, 0);
- #else
- as_gstring_replace (str, find, replace);
- #endif
+#else
+ as_gstring_replace2 (str, find, replace, 0);
+#endif
}
diff --git a/meson.build b/meson.build
index 09c39df180..ad105869e5 100644
--- a/meson.build
+++ b/meson.build
@@ -113,7 +113,7 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
conf.set('HAVE_LINUX_UNISTD_H', cc.has_header('linux/unistd.h'))
appstream = dependency('appstream',
- version : '>= 0.14.0',
+ version : '>= 0.16.2',
fallback : ['appstream', 'appstream_dep'],
default_options : [
'docs=false',
@@ -121,26 +121,6 @@ appstream = dependency('appstream',
'install-docs=false'
]
)
-if appstream.type_name() == 'internal'
-else
- if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_SEARCH_TOKEN_MATCH_MEDIATYPE', dependencies: appstream)
- conf.set('HAVE_AS_SEARCH_TOKEN_MATCH_MEDIATYPE', '1')
- endif
- if meson.get_compiler('c').has_header_symbol('appstream.h', 'AS_FORMAT_STYLE_CATALOG', dependencies: appstream)
- conf.set('HAVE_AS_FORMAT_STYLE_CATALOG', '1')
- endif
- if meson.get_compiler('c').has_function('as_metadata_components_to_catalog', prefix: '#include <appstream.h>', dependencies: appstream)
- conf.set('HAVE_AS_METADATA_COMPONENTS_TO_CATALOG', '1')
- endif
- if meson.get_compiler('c').links('''#include <appstream.h>
- int main (void)
- {
- as_gstring_replace (NULL, "a", "b", 0);
- return 0;
- }''', name: 'as_gstring_replace() has four arguments', dependencies: appstream)
- conf.set('HAVE_AS_GSTRING_REPLACE_WITH_FOUR_ARGS', '1')
- endif
-endif
gdk_pixbuf = dependency('gdk-pixbuf-2.0', version : '>= 2.32.0')
libxmlb = dependency('xmlb', version : '>= 0.1.7', fallback : ['libxmlb', 'libxmlb_dep'])
diff --git a/plugins/core/gs-plugin-appstream.c b/plugins/core/gs-plugin-appstream.c
index cf9f3022b1..ef3226a591 100644
--- a/plugins/core/gs-plugin-appstream.c
+++ b/plugins/core/gs-plugin-appstream.c
@@ -414,11 +414,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
if (bytes == NULL)
return NULL;
- #ifdef HAVE_AS_FORMAT_STYLE_CATALOG
as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_CATALOG);
- #else
- as_metadata_set_format_style (mdata, AS_FORMAT_STYLE_COLLECTION);
- #endif
as_metadata_parse_bytes (mdata,
bytes,
AS_FORMAT_KIND_YAML,
@@ -428,11 +424,7 @@ gs_plugin_appstream_load_dep11_cb (XbBuilderSource *self,
return NULL;
}
- #ifdef HAVE_AS_METADATA_COMPONENTS_TO_CATALOG
xml = as_metadata_components_to_catalog (mdata, AS_FORMAT_KIND_XML, &tmp_error);
- #else
- xml = as_metadata_components_to_collection (mdata, AS_FORMAT_KIND_XML, &tmp_error);
- #endif
if (xml == NULL) {
// This API currently returns NULL if there is nothing to serialize, so we
// have to test if this is an error or not.
diff --git a/plugins/fwupd/gs-fwupd-app.c b/plugins/fwupd/gs-fwupd-app.c
index 6dcda6ee92..5d3254da59 100644
--- a/plugins/fwupd/gs-fwupd-app.c
+++ b/plugins/fwupd/gs-fwupd-app.c
@@ -164,7 +164,11 @@ gs_fwupd_app_set_from_device (GsApp *app,
gs_app_set_install_date (app, fwupd_device_get_created (dev));
if (fwupd_device_get_description (dev) != NULL) {
g_autofree gchar *tmp = NULL;
+#if AS_CHECK_VERSION(1, 0, 0)
+ tmp = as_markup_convert (fwupd_device_get_description (dev), AS_MARKUP_KIND_TEXT, NULL);
+#else
tmp = as_markup_convert_simple (fwupd_device_get_description (dev), NULL);
+#endif
if (tmp != NULL)
gs_app_set_description (app, GS_APP_QUALITY_NORMAL, tmp);
}
@@ -402,7 +406,11 @@ gs_fwupd_app_set_from_release (GsApp *app, FwupdRelease *rel)
}
if (fwupd_release_get_description (rel) != NULL) {
g_autofree gchar *tmp = NULL;
+#if AS_CHECK_VERSION(1, 0, 0)
+ tmp = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
+#else
tmp = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
+#endif
if (tmp != NULL)
gs_app_set_update_details_text (app, tmp);
}
diff --git a/plugins/fwupd/gs-plugin-fwupd.c b/plugins/fwupd/gs-plugin-fwupd.c
index e931b2b6db..0747d6e250 100644
--- a/plugins/fwupd/gs-plugin-fwupd.c
+++ b/plugins/fwupd/gs-plugin-fwupd.c
@@ -726,7 +726,11 @@ gs_plugin_add_updates (GsPlugin *plugin,
g_autofree gchar *desc = NULL;
if (fwupd_release_get_description (rel) == NULL)
continue;
+#if AS_CHECK_VERSION(1, 0, 0)
+ desc = as_markup_convert (fwupd_release_get_description (rel), AS_MARKUP_KIND_TEXT, NULL);
+#else
desc = as_markup_convert_simple (fwupd_release_get_description (rel), NULL);
+#endif
if (desc == NULL)
continue;
g_string_append_printf (update_desc,
diff --git a/src/gs-hardware-support-context-dialog.c b/src/gs-hardware-support-context-dialog.c
index 0e48c8c266..14653401de 100644
--- a/src/gs-hardware-support-context-dialog.c
+++ b/src/gs-hardware-support-context-dialog.c
@@ -461,6 +461,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor *monitor,
AsRelationCompare comparator = as_relation_get_compare (relation);
Range current_display_comparand, relation_comparand;
+#if !AS_CHECK_VERSION(1, 0, 0)
/* From https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-requires-recommends-display_length */
Range display_lengths[] = {
[AS_DISPLAY_LENGTH_KIND_XSMALL] = { 0, 360 },
@@ -469,6 +470,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor *monitor,
[AS_DISPLAY_LENGTH_KIND_LARGE] = { 1024, 3840 },
[AS_DISPLAY_LENGTH_KIND_XLARGE] = { 3840, G_MAXUINT },
};
+#endif
any_display_relations_set = TRUE;
@@ -485,11 +487,14 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor *monitor,
case AS_DISPLAY_SIDE_KIND_LAST:
default:
current_display_comparand.min = current_display_comparand.max = MAX (current_screen_size.width, current_screen_size.height);
+#if !AS_CHECK_VERSION(1, 0, 0)
relation_comparand.min = display_lengths[as_relation_get_value_display_length_kind (relation)].min;
relation_comparand.max = display_lengths[as_relation_get_value_display_length_kind (relation)].max;
+#endif
break;
}
+#if !AS_CHECK_VERSION(1, 0, 0)
if (evaluate_display_comparison (display_lengths[AS_DISPLAY_LENGTH_KIND_SMALL], comparator, relation_comparand)) {
*mobile_relation_kind_out = max_relation_kind (*mobile_relation_kind_out, as_relation_get_kind (relation));
*mobile_match_out = TRUE;
@@ -499,6 +504,7 @@ gs_hardware_support_context_dialog_get_display_support (GdkMonitor *monitor,
*desktop_relation_kind_out = max_relation_kind (*desktop_relation_kind_out, as_relation_get_kind (relation));
*desktop_match_out = TRUE;
}
+#endif
if (evaluate_display_comparison (current_display_comparand, comparator, relation_comparand)) {
*current_relation_kind_out = max_relation_kind (*current_relation_kind_out, as_relation_get_kind (relation));
diff --git a/src/gs-repos-dialog.c b/src/gs-repos-dialog.c
index c41c4944a1..7dac0416d9 100644
--- a/src/gs-repos-dialog.c
+++ b/src/gs-repos-dialog.c
@@ -154,7 +154,11 @@ enable_repo (GsReposDialog *dialog,
g_autoptr(GError) error = NULL;
/* convert from AppStream markup */
+#if AS_CHECK_VERSION(1, 0, 0)
+ message = as_markup_convert (gs_app_get_agreement (repo), AS_MARKUP_KIND_TEXT, &error);
+#else
message = as_markup_convert_simple (gs_app_get_agreement (repo), &error);
+#endif
if (message == NULL) {
/* failed, so just try and show the original markup */
message = g_strdup (gs_app_get_agreement (repo));
diff --git a/src/gs-screenshot-carousel.c b/src/gs-screenshot-carousel.c
index 04bbf86a1e..d269af6605 100644
--- a/src/gs-screenshot-carousel.c
+++ b/src/gs-screenshot-carousel.c
@@ -141,8 +141,8 @@ gs_screenshot_carousel_load_screenshots (GsScreenshotCarousel *self, GsApp *app,
gtk_widget_set_can_focus (gtk_widget_get_first_child (ssimg), FALSE);
gs_screenshot_image_set_screenshot (GS_SCREENSHOT_IMAGE (ssimg), ss);
gs_screenshot_image_set_size (GS_SCREENSHOT_IMAGE (ssimg),
- AS_IMAGE_NORMAL_WIDTH,
- AS_IMAGE_NORMAL_HEIGHT);
+ GS_IMAGE_NORMAL_WIDTH,
+ GS_IMAGE_NORMAL_HEIGHT);
gtk_widget_add_css_class (ssimg, "screenshot-image-main");
gs_screenshot_image_load_async (GS_SCREENSHOT_IMAGE (ssimg), cancellable);
diff --git a/src/gs-screenshot-image.c b/src/gs-screenshot-image.c
index c313a2589f..b24083b387 100644
--- a/src/gs-screenshot-image.c
+++ b/src/gs-screenshot-image.c
@@ -284,13 +284,13 @@ gs_screenshot_image_save_downloaded_img (GsScreenshotImage *ssimg,
if (images->len > 1)
return TRUE;
- if (width == AS_IMAGE_THUMBNAIL_WIDTH &&
- height == AS_IMAGE_THUMBNAIL_HEIGHT) {
- width = AS_IMAGE_NORMAL_WIDTH;
- height = AS_IMAGE_NORMAL_HEIGHT;
+ if (width == GS_IMAGE_THUMBNAIL_WIDTH &&
+ height == GS_IMAGE_THUMBNAIL_HEIGHT) {
+ width = GS_IMAGE_NORMAL_WIDTH;
+ height = GS_IMAGE_NORMAL_HEIGHT;
} else {
- width = AS_IMAGE_THUMBNAIL_WIDTH;
- height = AS_IMAGE_THUMBNAIL_HEIGHT;
+ width = GS_IMAGE_THUMBNAIL_WIDTH;
+ height = GS_IMAGE_THUMBNAIL_HEIGHT;
}
width *= ssimg->scale;
@@ -582,16 +582,30 @@ gs_screenshot_image_get_url (GsScreenshotImage *ssimg)
} else if (as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE) {
AsImage *im;
+#if AS_CHECK_VERSION(1, 0, 0)
+ im = as_screenshot_get_image (ssimg->screenshot,
+ ssimg->width,
+ ssimg->height,
+ ssimg->scale);
+#else
im = as_screenshot_get_image (ssimg->screenshot,
ssimg->width * ssimg->scale,
ssimg->height * ssimg->scale);
+#endif
/* if we've failed to load a HiDPI image, fallback to LoDPI */
if (im == NULL && ssimg->scale > 1) {
ssimg->scale = 1;
+#if AS_CHECK_VERSION(1, 0, 0)
+ im = as_screenshot_get_image (ssimg->screenshot,
+ ssimg->width,
+ ssimg->height,
+ 1);
+#else
im = as_screenshot_get_image (ssimg->screenshot,
ssimg->width,
ssimg->height);
+#endif
}
if (im)
@@ -698,15 +712,22 @@ gs_screenshot_image_load_async (GsScreenshotImage *ssimg,
* smaller version of it straight away */
if (!ssimg->showing_image &&
as_screenshot_get_media_kind (ssimg->screenshot) == AS_SCREENSHOT_MEDIA_KIND_IMAGE &&
- ssimg->width > AS_IMAGE_THUMBNAIL_WIDTH &&
- ssimg->height > AS_IMAGE_THUMBNAIL_HEIGHT) {
+ ssimg->width > GS_IMAGE_THUMBNAIL_WIDTH &&
+ ssimg->height > GS_IMAGE_THUMBNAIL_HEIGHT) {
const gchar *url_thumb;
g_autofree gchar *basename_thumb = NULL;
g_autofree gchar *cache_kind_thumb = NULL;
AsImage *im;
+#if AS_CHECK_VERSION(1, 0, 0)
im = as_screenshot_get_image (ssimg->screenshot,
- AS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
- AS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
+ GS_IMAGE_THUMBNAIL_WIDTH,
+ GS_IMAGE_THUMBNAIL_HEIGHT,
+ ssimg->scale);
+#else
+ im = as_screenshot_get_image (ssimg->screenshot,
+ GS_IMAGE_THUMBNAIL_WIDTH * ssimg->scale,
+ GS_IMAGE_THUMBNAIL_HEIGHT * ssimg->scale);
+#endif
url_thumb = as_image_get_url (im);
basename_thumb = gs_screenshot_get_cachefn_for_url (url_thumb);
cache_kind_thumb = g_build_filename ("screenshots", "112x63", NULL);
diff --git a/src/gs-screenshot-image.h b/src/gs-screenshot-image.h
index 1f6cf81ce6..6e45f5d20a 100644
--- a/src/gs-screenshot-image.h
+++ b/src/gs-screenshot-image.h
@@ -21,6 +21,13 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GsScreenshotImage, gs_screenshot_image, GS, SCREENSHOT_IMAGE, GtkWidget)
+#define GS_IMAGE_LARGE_HEIGHT 423
+#define GS_IMAGE_LARGE_WIDTH 752
+#define GS_IMAGE_NORMAL_HEIGHT 351
+#define GS_IMAGE_NORMAL_WIDTH 624
+#define GS_IMAGE_THUMBNAIL_HEIGHT 63
+#define GS_IMAGE_THUMBNAIL_WIDTH 112
+
GtkWidget *gs_screenshot_image_new (SoupSession *session);
AsScreenshot *gs_screenshot_image_get_screenshot (GsScreenshotImage *ssimg);
diff --git a/subprojects/appstream.wrap b/subprojects/appstream.wrap
index 6f0beb0cbc..5763a32c64 100644
--- a/subprojects/appstream.wrap
+++ b/subprojects/appstream.wrap
@@ -1,5 +1,5 @@
[wrap-git]
directory = appstream
url = https://github.com/ximion/appstream.git
-revision = v0.14.1
+revision = v0.16.3
depth = 1
diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
index 6504d6f25..4fd7f5334 100644
--- a/lib/gs-appstream.c
+++ b/lib/gs-appstream.c
@@ -587,8 +587,6 @@ gs_appstream_refine_add_provides (GsApp *app, XbNode *component, GError **error)
kind = AS_PROVIDED_KIND_FIRMWARE_RUNTIME;
else if (g_strcmp0 (fw_type, "flashed") == 0)
kind = AS_PROVIDED_KIND_FIRMWARE_FLASHED;
- } else if (g_strcmp0 (element_name, "python2") == 0) {
- kind = AS_PROVIDED_KIND_PYTHON_2;
} else if (g_strcmp0 (element_name, "python3") == 0) {
kind = AS_PROVIDED_KIND_PYTHON;
} else if (g_strcmp0 (element_name, "dbus") == 0) {
--
GitLab

View File

@ -14,6 +14,8 @@
%bcond malcontent %[!0%{?rhel}]
# Disable rpm-ostree support for RHEL builds
%bcond rpmostree %[!0%{?rhel}]
# Disable fedora-langpacks subpackage for RHEL builds
%bcond langpacks %[!0%{?rhel}]
# this is not a library version
%define gs_plugin_version 20
@ -23,16 +25,19 @@
%global __provides_exclude_from ^%{_libdir}/%{name}/plugins-%{gs_plugin_version}/.*\\.so.*$
Name: gnome-software
Version: 45.2
Release: 1%{?dist}
Version: 46.2
Release: 2%{?dist}
Summary: A software center for GNOME
License: GPL-2.0-or-later
URL: https://wiki.gnome.org/Apps/Software
Source0: https://download.gnome.org/sources/gnome-software/45/%{name}-%{tarball_version}.tar.xz
Source0: https://download.gnome.org/sources/gnome-software/46/%{name}-%{tarball_version}.tar.xz
# https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/1810
Patch: 0001-port-to-appstream1.patch
# ostree and flatpak not on i686 for RHEL 10
# https://github.com/containers/composefs/pull/229#issuecomment-1838735764
%if 0%{?rhel} >= 10
ExcludeArch: %{ix86}
%endif
BuildRequires: docbook-style-xsl
BuildRequires: desktop-file-utils
@ -87,6 +92,9 @@ Requires: librsvg2%{?_isa}
Requires: libxmlb%{?_isa} >= %{libxmlb_version}
Recommends: PackageKit%{?_isa} >= %{packagekit_version}
%if %{with langpacks}
Recommends: %{name}-fedora-langpacks
%endif
Obsoletes: gnome-software-snap < 3.33.1
Obsoletes: gnome-software-editor < 3.35.1
@ -103,6 +111,16 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
These development files are for building gnome-software plugins outside
the source tree. Most users do not need this subpackage installed.
%if %{with langpacks}
%package fedora-langpacks
Summary: Contains fedora-langpacks plugin
Requires: %{name}%{?_isa} = %{version}-%{release}
%description fedora-langpacks
The fedora-langpacks plugin ensures langpacks packages are installed
for the current locale.
%endif
%if %{with rpmostree}
%package rpm-ostree
Summary: rpm-ostree backend for gnome-software
@ -156,6 +174,10 @@ This package includes the rpm-ostree backend.
# remove unneeded dpkg plugin
rm %{buildroot}%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_dpkg.so
%if !%{with langpacks}
rm %{buildroot}%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_fedora-langpacks.so
%endif
# make the software center load faster
desktop-file-edit %{buildroot}%{_datadir}/applications/org.gnome.Software.desktop \
--set-key=X-AppInstall-Package --set-value=%{name}
@ -185,6 +207,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{_datadir}/applications/gnome-software-local-file-fwupd.desktop
%{_datadir}/applications/gnome-software-local-file-packagekit.desktop
%{_datadir}/applications/org.gnome.Software.desktop
%{_datadir}/bash-completion/completions/gnome-software
%{_mandir}/man1/gnome-software.1*
%{_datadir}/icons/hicolor/*/apps/org.gnome.Software.svg
%{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Software-symbolic.svg
@ -202,7 +225,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%if %{with webapps}
%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_epiphany.so
%endif
%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_fedora-langpacks.so
%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_fedora-pkgdb-collections.so
%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_flatpak.so
%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_fwupd.so
@ -234,6 +256,11 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{_libexecdir}/gnome-software-cmd
%{_libexecdir}/gnome-software-restarter
%if %{with langpacks}
%files fedora-langpacks
%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_fedora-langpacks.so
%endif
%if %{with rpmostree}
%files rpm-ostree
%{_libdir}/gnome-software/plugins-%{gs_plugin_version}/libgs_plugin_rpm-ostree.so
@ -249,6 +276,34 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{_datadir}/gtk-doc/html/gnome-software/
%changelog
* Mon Jun 03 2024 Milan Crha <mcrha@redhat.com> - 46.2-2
- Resolves: RHEL-39680 (Build fedora-langpacks subpackage only in Fedora)
* Tue May 28 2024 Milan Crha <mcrha@redhat.com> - 46.2-1
- Resolves: RHEL-38644 (Update to 46.2)
* Mon Apr 29 2024 Milan Crha <mcrha@redhat.com> - 46.1-1
- Resolves: RHEL-34658 (Update to 46.1)
* Mon Mar 25 2024 Milan Crha <mcrha@redhat.com> - 46.0-1
- Resolves: RHEL-30226 (Backport Fedora 40 changes)
- Update to 46.0
* Fri Feb 09 2024 Milan Crha <mcrha@redhat.com> - 46~beta-1
- Update to 46.beta
* Fri Jan 26 2024 Milan Crha <mcrha@redhat.com> - 46~alpha-4
- Resolves: #2260294 (Split fedora-langpacks plugin into a subpackage)
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 46~alpha-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 46~alpha-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 05 2024 Milan Crha <mcrha@redhat.com> - 46~alpha-1
- Update to 46.alpha
* Fri Dec 01 2023 Milan Crha <mcrha@redhat.com> - 45.2-1
- Update to 45.2

View File

@ -1 +1 @@
SHA512 (gnome-software-45.2.tar.xz) = ea271146683d199b27ffaaab98a13c25f8f794da3c6cc6b0daeb37f3f4c92d8644926dc592d309ea32dcb131d33e6c77d1c6fa36ac10cf6b23cd7adc73e898cb
SHA512 (gnome-software-46.2.tar.xz) = 4e7cccc20001ccee114508bb50e2a25968ee6fea64fb545e1174ff435cd368b2d7c928b6a182874af8e9f0c99f9f506e75c5ac9bf61b35ba0a897368ae0abc3c