unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Vivien Kraus via Guix-patches via <guix-patches@gnu.org>
To: 61968@debbugs.gnu.org
Cc: rg@raghavgururajan.name, liliana.prikler@gmail.com,
	maxim.cournoyer@gmail.com
Subject: [bug#61968] [PATCH gnome-team v4 2/8] gnu: appstream: Update to 0.16.4.
Date: Thu, 16 Nov 2023 00:12:44 +0100	[thread overview]
Message-ID: <379b53c96534494e0aad359d3d35d91a89f405f1.1700166830.git.vivien@planete-kraus.eu> (raw)
In-Reply-To: <cover.1700166829.git.vivien@planete-kraus.eu>

* gnu/packages/patches/appstream-load-stemmer-early.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it here.
* gnu/packages/freedesktop.scm (appstream): Update to 0.16.4.
[patches]: Use it here.
[#:configure-flags]: Disable systemd integration.
[#:phases]<disable-failing-tests>: Remove.

Change-Id: Iddd6ce5887247df46f670c49f9efc66772c82ff0
---
 gnu/local.mk                                  |  1 +
 gnu/packages/freedesktop.scm                  | 12 ++-
 .../appstream-force-reload-stemmer.patch      | 89 +++++++++++++++++++
 3 files changed, 95 insertions(+), 7 deletions(-)
 create mode 100644 gnu/packages/patches/appstream-force-reload-stemmer.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 254804d055..4d9f4bf26f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -917,6 +917,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/antlr3-3_1-fix-java8-compilation.patch	\
   %D%/packages/patches/antlr3-3_3-fix-java8-compilation.patch	\
   %D%/packages/patches/aoflagger-use-system-provided-pybind11.patch \
+  %D%/packages/patches/appstream-force-reload-stemmer.patch	\
   %D%/packages/patches/apr-fix-atomics.patch			\
   %D%/packages/patches/apr-skip-getservbyname-test.patch	\
   %D%/packages/patches/ark-skip-xar-test.patch			\
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index d920afe1e7..0dc2b1a243 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -139,7 +139,7 @@ (define-module (gnu packages freedesktop)
 (define-public appstream
   (package
     (name "appstream")
-    (version "0.15.6")
+    (version "0.16.4")
     (source
      (origin
        (method url-fetch)
@@ -148,11 +148,14 @@ (define-public appstream
                        "appstream/releases/"
                        "AppStream-" version ".tar.xz"))
        (sha256
-        (base32 "03pirmc5r4izl6mzff879g7pk1nxq03kgpr2yvnnqnlb6r0ckmi3"))))
+        (base32 "1val1b3dggn9g33q2r9q7wsl75a64x4lcvswvkcjjbvakkbj5xyl"))
+       (patches
+        (search-patches "appstream-force-reload-stemmer.patch"))))
     (build-system meson-build-system)
     (arguments
      (list
       #:glib-or-gtk? #t
+      #:configure-flags #~'("-Dsystemd=false")
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'patch-libstemmer
@@ -162,11 +165,6 @@ (define-public appstream
               (substitute* "meson.build"
                 (("/usr/include")
                  (dirname libstemmer.h))))))
-          (add-after 'unpack 'disable-failing-tests
-            (lambda _
-              (substitute* "tests/test-pool.c"
-                (("[ \t]*g_test_add_func \\(\"/AppStream/PoolRead?.*;")
-                 ""))))
           (add-before 'check 'check-setup
             (lambda _
               (setenv "HOME" (getcwd)))))))
diff --git a/gnu/packages/patches/appstream-force-reload-stemmer.patch b/gnu/packages/patches/appstream-force-reload-stemmer.patch
new file mode 100644
index 0000000000..a2cf84c8b1
--- /dev/null
+++ b/gnu/packages/patches/appstream-force-reload-stemmer.patch
@@ -0,0 +1,89 @@
+From 32182d7a7a67d0d204cd0a37bd211bfd0177bc27 Mon Sep 17 00:00:00 2001
+Message-ID: <32182d7a7a67d0d204cd0a37bd211bfd0177bc27.1700093066.git.vivien@planete-kraus.eu>
+From: Matthias Klumpp <matthias@tenstral.net>
+Date: Thu, 16 Nov 2023 00:59:15 +0100
+Subject: [PATCH] stemmer: Resolve potential issue where stemmer may never be
+ initialized
+
+If the initial locale was equal to the current stemming language, we may
+never have initialized the stemmer (which could lead to crashes or
+stemming being disabled).
+
+So we force the reload to always happen on initialization.
+CC: #558
+---
+ src/as-stemmer.c | 33 +++++++++++++++++++++------------
+ 1 file changed, 21 insertions(+), 12 deletions(-)
+
+diff --git a/src/as-stemmer.c b/src/as-stemmer.c
+index 63d45267..16ebd09b 100644
+--- a/src/as-stemmer.c
++++ b/src/as-stemmer.c
+@@ -47,6 +47,8 @@ G_DEFINE_TYPE (AsStemmer, as_stemmer, G_TYPE_OBJECT)
+ 
+ static gpointer as_stemmer_object = NULL;
+ 
++static void as_stemmer_reload_internal (AsStemmer *stemmer, const gchar *locale, gboolean force);
++
+ /**
+  * as_stemmer_finalize:
+  **/
+@@ -76,21 +78,14 @@ as_stemmer_init (AsStemmer *stemmer)
+ 
+ 	/* we don't use the locale in XML, so it can be POSIX */
+ 	locale = as_get_current_locale_posix ();
+-	stemmer->current_lang = as_utils_locale_to_language (locale);
+ 
+-	as_stemmer_reload (stemmer, stemmer->current_lang);
++	/* force a reload for initialization */
++	as_stemmer_reload_internal (stemmer, locale, TRUE);
+ #endif
+ }
+ 
+-/**
+- * as_stemmer_reload:
+- * @stemmer: A #AsStemmer
+- * @locale: The stemming language as POSIX locale.
+- *
+- * Allows realoading the #AsStemmer with a different language.
+- */
+-void
+-as_stemmer_reload (AsStemmer *stemmer, const gchar *locale)
++static void
++as_stemmer_reload_internal (AsStemmer *stemmer, const gchar *locale, gboolean force)
+ {
+ #ifdef HAVE_STEMMING
+ 	g_autofree gchar *lang = NULL;
+@@ -99,7 +94,7 @@ as_stemmer_reload (AsStemmer *stemmer, const gchar *locale)
+ 	/* check if we need to reload */
+ 	lang = as_utils_locale_to_language (locale);
+ 	locker = g_mutex_locker_new (&stemmer->mutex);
+-	if (as_str_equal0 (lang, stemmer->current_lang)) {
++	if (!force && as_str_equal0 (lang, stemmer->current_lang)) {
+ 		g_mutex_locker_free (locker);
+ 		return;
+ 	}
+@@ -119,6 +114,20 @@ as_stemmer_reload (AsStemmer *stemmer, const gchar *locale)
+ #endif
+ }
+ 
++/**
++ * as_stemmer_reload:
++ * @stemmer: A #AsStemmer
++ * @locale: The stemming language as POSIX locale.
++ *
++ * Allows realoading the #AsStemmer with a different language.
++ * Does nothing if the stemmer is already using the selected language.
++ */
++void
++as_stemmer_reload (AsStemmer *stemmer, const gchar *locale)
++{
++	as_stemmer_reload_internal (stemmer, locale, FALSE);
++}
++
+ /**
+  * as_stemmer_stem:
+  * @stemmer: A #AsStemmer
+-- 
+2.41.0
+
-- 
2.41.0




  parent reply	other threads:[~2023-11-16 20:40 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-04 20:04 [bug#61968] [PATCH 0/7] Update GNOME Builder Vivien Kraus via Guix-patches via
2023-03-04 17:39 ` [bug#61968] [PATCH 7/7] gnu: gnome-builder: Update to 43.6 Vivien Kraus via Guix-patches via
2023-03-04 20:53   ` Liliana Marie Prikler
2023-03-04 17:52 ` [bug#61968] [PATCH 2/7] gnu: Add libpanel Vivien Kraus via Guix-patches via
2023-03-04 18:13 ` [bug#61968] [PATCH 1/7] gnu: glib-next: Update to 2.75.4 Vivien Kraus via Guix-patches via
2023-03-04 18:28 ` [bug#61968] [PATCH 3/7] gnu: gtksourceview: Update to 5.7.2 Vivien Kraus via Guix-patches via
2023-03-04 18:30 ` [bug#61968] [PATCH 4/7] gnu: libpeas: Update to 1.34.0 Vivien Kraus via Guix-patches via
2023-03-04 18:33 ` [bug#61968] [PATCH 5/7] gnu: template-glib: Update to 3.36.1 Vivien Kraus via Guix-patches via
2023-03-04 19:24 ` [bug#61968] [PATCH 6/7] gnu: sysprof: Update to 3.46.0 Vivien Kraus via Guix-patches via
2023-03-04 22:58 ` [bug#61968] [PATCH v2 0/8] Update GNOME Builder Vivien Kraus via Guix-patches via
2023-03-04 17:39   ` [bug#61968] [PATCH v2 8/8] gnu: gnome-builder: Update to 43.6 Vivien Kraus via Guix-patches via
2023-03-04 17:52   ` [bug#61968] [PATCH v2 2/8] gnu: Add libpanel Vivien Kraus via Guix-patches via
2023-03-04 18:13   ` [bug#61968] [PATCH v2 1/8] gnu: glib-next: Update to 2.75.4 Vivien Kraus via Guix-patches via
2023-03-04 18:28   ` [bug#61968] [PATCH v2 3/8] gnu: gtksourceview: Update to 5.7.2 Vivien Kraus via Guix-patches via
2023-03-04 18:30   ` [bug#61968] [PATCH v2 4/8] gnu: libpeas: Update to 1.34.0 Vivien Kraus via Guix-patches via
2023-03-04 18:33   ` [bug#61968] [PATCH v2 5/8] gnu: template-glib: Update to 3.36.1 Vivien Kraus via Guix-patches via
2023-03-04 19:24   ` [bug#61968] [PATCH v2 6/8] gnu: sysprof: Update to 3.46.0 Vivien Kraus via Guix-patches via
2023-03-04 22:19   ` [bug#61968] [PATCH v2 7/8] gnu: gnome-builder: Move to (gnu packages text-editors) Vivien Kraus via Guix-patches via
2023-03-05  6:27 ` [bug#61968] [PATCH v3 00/12] Update GNOME Builder to 43.6 Vivien Kraus via Guix-patches via
2023-03-04 17:39   ` [bug#61968] [PATCH v3 12/12] gnu: gnome-builder: Update " Vivien Kraus via Guix-patches via
2023-03-04 17:52   ` [bug#61968] [PATCH v3 03/12] gnu: Add libpanel Vivien Kraus via Guix-patches via
2023-03-04 18:13   ` [bug#61968] [PATCH v3 02/12] gnu: glib-next: Update to 2.75.4 Vivien Kraus via Guix-patches via
2023-03-04 18:28   ` [bug#61968] [PATCH v3 07/12] gnu: gtksourceview: Update to 5.7.2 Vivien Kraus via Guix-patches via
2023-03-04 18:30   ` [bug#61968] [PATCH v3 08/12] gnu: libpeas: Update to 1.34.0 Vivien Kraus via Guix-patches via
2023-03-04 18:33   ` [bug#61968] [PATCH v3 09/12] gnu: template-glib: Update to 3.36.1 Vivien Kraus via Guix-patches via
2023-03-04 19:24   ` [bug#61968] [PATCH v3 10/12] gnu: sysprof: Update to 3.46.0 Vivien Kraus via Guix-patches via
2023-03-04 22:19   ` [bug#61968] [PATCH v3 11/12] gnu: gnome-builder: Move to (gnu packages text-editors) Vivien Kraus via Guix-patches via
2023-03-05  6:04   ` [bug#61968] [PATCH v3 04/12] gnu: gnome-calculator: Use glib-next Vivien Kraus via Guix-patches via
2023-03-05  6:08   ` [bug#61968] [PATCH v3 05/12] gnu: gnome-text-editor: " Vivien Kraus via Guix-patches via
2023-03-05  6:16   ` [bug#61968] [PATCH v3 01/12] gnu: sbcl-cl-cffi-gtk: Use pango-next Vivien Kraus via Guix-patches via
2023-03-05  6:22   ` [bug#61968] [PATCH v3 06/12] gnu: textpieces: Use glib-next Vivien Kraus via Guix-patches via
2023-03-05  7:35   ` [bug#61968] [PATCH v3 00/12] Update GNOME Builder to 43.6 Liliana Marie Prikler
2023-03-14 11:15     ` Vivien Kraus via Guix-patches via
2023-03-16 21:56     ` [bug#61968] [PATCH 0/7] Update GNOME Builder Ludovic Courtès
2023-03-17  5:22       ` Liliana Marie Prikler
2023-03-17  5:51         ` Vivien Kraus via Guix-patches via
2023-03-17 21:49         ` Ludovic Courtès
2023-03-19 11:50       ` Vivien Kraus via Guix-patches via
2023-11-16 20:33 ` [bug#61968] [PATCH gnome-team v4 0/8] Update GNOME Builder to 44.2 Vivien Kraus via Guix-patches via
2023-11-15 23:11   ` [bug#61968] [PATCH gnome-team v4 1/8] gnu: libxmlb: Update to 0.3.14 Vivien Kraus via Guix-patches via
2023-11-15 23:12   ` Vivien Kraus via Guix-patches via [this message]
2023-11-19  8:51     ` [bug#61968] [PATCH gnome-team v4 2/8] gnu: appstream: Update to 0.16.4 Liliana Marie Prikler
2023-11-16 16:45   ` [bug#61968] [PATCH gnome-team v4 3/8] gnu: Add libdex Vivien Kraus via Guix-patches via
2023-11-16 16:54   ` [bug#61968] [PATCH gnome-team v4 4/8] gnu: libpanel: Update to 1.2.0 Vivien Kraus via Guix-patches via
2023-11-16 17:04   ` [bug#61968] [PATCH gnome-team v4 5/8] gnu: jsonrpc-glib: Update to 3.44.0 Vivien Kraus via Guix-patches via
2023-11-16 17:12   ` [bug#61968] [PATCH gnome-team v4 6/8] gnu: libpeas: Update to 1.36.0 Vivien Kraus via Guix-patches via
2023-11-16 17:23   ` [bug#61968] [PATCH gnome-team v4 7/8] gnu: sysprof: Update to 3.48.0 Vivien Kraus via Guix-patches via
2023-11-16 19:49   ` [bug#61968] [PATCH gnome-team v4 8/8] gnu: gnome-builder: Update to 44.2 Vivien Kraus via Guix-patches via
2023-11-16 21:04   ` [bug#61968] [PATCH gnome-team v4 0/8] Update GNOME Builder " Liliana Marie Prikler
2023-11-16 21:58     ` Vivien Kraus via Guix-patches via
2023-11-16 22:35       ` Jack Hill
2023-11-16 22:40         ` Vivien Kraus via Guix-patches via
2023-11-17  5:20           ` Liliana Marie Prikler
2023-11-17  9:00             ` Vivien Kraus via Guix-patches via
2023-11-20 17:22 ` [bug#61968] [PATCH gnome-team v5 0/6] Update GNOME Builder Vivien Kraus via Guix-patches via
2023-11-16 16:45   ` [bug#61968] [PATCH gnome-team v5 1/6] gnu: Add libdex Vivien Kraus via Guix-patches via
2023-11-16 16:54   ` [bug#61968] [PATCH gnome-team v5 2/6] gnu: libpanel: Update to 1.2.0 Vivien Kraus via Guix-patches via
2023-11-16 17:04   ` [bug#61968] [PATCH gnome-team v5 3/6] gnu: jsonrpc-glib: Update to 3.44.0 Vivien Kraus via Guix-patches via
2023-11-16 17:12   ` [bug#61968] [PATCH gnome-team v5 4/6] gnu: libpeas: Update to 1.36.0 Vivien Kraus via Guix-patches via
2023-11-16 17:23   ` [bug#61968] [PATCH gnome-team v5 5/6] gnu: sysprof: Update to 3.48.0 Vivien Kraus via Guix-patches via
2023-11-16 19:49   ` [bug#61968] [PATCH gnome-team v5 6/6] gnu: gnome-builder: Update to 44.2 Vivien Kraus via Guix-patches via
2023-11-23  8:05     ` bug#61968: " Liliana Marie Prikler
2023-11-20 19:45   ` [bug#61968] [PATCH gnome-team v5 0/6] Update GNOME Builder Liliana Marie Prikler
2023-11-20 19:47     ` Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=379b53c96534494e0aad359d3d35d91a89f405f1.1700166830.git.vivien@planete-kraus.eu \
    --to=guix-patches@gnu.org \
    --cc=61968@debbugs.gnu.org \
    --cc=liliana.prikler@gmail.com \
    --cc=maxim.cournoyer@gmail.com \
    --cc=rg@raghavgururajan.name \
    --cc=vivien@planete-kraus.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).