From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 20 12:29:42 2023 Received: (at submit) by debbugs.gnu.org; 20 Nov 2023 17:29:42 +0000 Received: from localhost ([127.0.0.1]:54391 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r585d-0000Si-SY for submit@debbugs.gnu.org; Mon, 20 Nov 2023 12:29:42 -0500 Received: from lists.gnu.org ([2001:470:142::17]:46376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r585Z-0000Rx-0F for submit@debbugs.gnu.org; Mon, 20 Nov 2023 12:29:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r585R-00032l-1b for guix-patches@gnu.org; Mon, 20 Nov 2023 12:29:29 -0500 Received: from planete-kraus.eu ([89.234.140.182]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1r585P-0000b6-7u for guix-patches@gnu.org; Mon, 20 Nov 2023 12:29:28 -0500 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id af04c219; Mon, 20 Nov 2023 17:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:from:date:subject:to:cc:mime-version; s=albinoniA; bh=31/yhG/34TLALmxoCddxmU/WW1g=; b=QzHixpvMA7xUahHvdwNpFHR3XbZU I5Aq2fIecGXIsDT496994siTR4JjNN0TNuFT4/HwTJZVMoxA02lT3m2RZaIXgA8g BMTYeXo7bUxw8gGS5qOIcuGG5WHiKG8tlOPm+VzF6rKstJSa6wVW8VC+fRKLDXla RYRegTVQ5qJ1cX1rPFb6/pzEO5ZzUYxtZ5Ua1txSQ+aSOgGWdmt0w22Q8oDviJfI Xke+R8rcG/r3retP5ctmxOO5PuALC95KwmS1WSeoLTsIxly45FteNjVy5TY/kURi 0CKoM1Pl/FC5z8D+lHwVZjQ9jcYF7KF5TQQayS3LvqlH5iO5zdVAzZtekw== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id e87d5ae5 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Mon, 20 Nov 2023 17:29:22 +0000 (UTC) Message-ID: <85eae89301e97317fb2f8576378890b3e8f29ac2.1700501299.git.vivien@planete-kraus.eu> From: Vivien Kraus Date: Thu, 16 Nov 2023 00:12:44 +0100 Subject: [PATCH gnome-team] gnu: appstream: Fix test. To: guix-patches@gnu.org MIME-Version: 1.0 User-Agent: Evolution 3.46.4 Received-SPF: pass client-ip=89.234.140.182; envelope-from=vivien@planete-kraus.eu; helo=planete-kraus.eu X-Spam_score_int: 13 X-Spam_score: 1.3 X-Spam_bar: + X-Spam_report: (1.3 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_96_XX=3.405, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 3.0 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/packages/patches/appstream-load-stemmer-early.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/freedesktop.scm (appstream) [patches]: Use it here. [#:phases]< [...] Content analysis details: (3.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=vivien%40planete-kraus.eu; ip=2001%3A470%3A142%3A%3A17; r=debbugs.gnu.org] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: submit Cc: rg@raghavgururajan.name, liliana.prikler@gmail.com, maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/packages/patches/appstream-load-stemmer-early.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/freedesktop.scm (appstream) [patches]: Use it here. [#:phases]< [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom;id=vivien%40planete-kraus.eu;ip=2001%3A470%3A142%3A%3A17;r=debbugs.gnu.org] -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager * gnu/packages/patches/appstream-load-stemmer-early.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/freedesktop.scm (appstream) [patches]: Use it here. [#:phases]: Remove. Change-Id: Iddd6ce5887247df46f670c49f9efc66772c82ff0 --- gnu/local.mk | 1 + gnu/packages/freedesktop.scm | 9 +- .../appstream-force-reload-stemmer.patch | 89 +++++++++++++++++++ 3 files changed, 93 insertions(+), 6 deletions(-) create mode 100644 gnu/packages/patches/appstream-force-reload-stemmer.patch diff --git a/gnu/local.mk b/gnu/local.mk index a939b9be8d..5cb9874d9f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -918,6 +918,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 0aeeadf5a3..25b7998d05 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -148,7 +148,9 @@ (define-public appstream "appstream/releases/" "AppStream-" version ".tar.xz")) (sha256 - (base32 "1val1b3dggn9g33q2r9q7wsl75a64x4lcvswvkcjjbvakkbj5xyl")))) + (base32 "1val1b3dggn9g33q2r9q7wsl75a64x4lcvswvkcjjbvakkbj5xyl")) + (patches + (search-patches "appstream-force-reload-stemmer.patch")))) (build-system meson-build-system) (arguments (list @@ -163,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/Stemming.*;") - "")))) (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 +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 + base-commit: 1cc3b7e80f60a2a5a6a1400ed0b025efeae7a523 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 20 14:48:22 2023 Received: (at submit) by debbugs.gnu.org; 20 Nov 2023 19:48:23 +0000 Received: from localhost ([127.0.0.1]:54677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5AFq-000581-Cd for submit@debbugs.gnu.org; Mon, 20 Nov 2023 14:48:22 -0500 Received: from lists.gnu.org ([2001:470:142::17]:33392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5AFo-00057A-PN for submit@debbugs.gnu.org; Mon, 20 Nov 2023 14:48:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r5AFf-0005M0-ND for guix-patches@gnu.org; Mon, 20 Nov 2023 14:48:12 -0500 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r5AFd-0003jc-NY for guix-patches@gnu.org; Mon, 20 Nov 2023 14:48:11 -0500 Received: by mail-lj1-x243.google.com with SMTP id 38308e7fff4ca-2c50305c5c4so65184461fa.1 for ; Mon, 20 Nov 2023 11:48:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700509686; x=1701114486; darn=gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=St9Y7CWGLacHzcPbhmxFrh2RBpwLj51nyC/Ru/p9cAQ=; b=AZb7sbdAqtNxFyFENcKKBtxLOlW/Yj9aZZZyYMpfM7xYzZ5SGbhol4+fFhIS8qAfg/ +sN+zNRBOH/IYMY6GaQgegsKqOg58O2I7s757Lwc3GgVg7FP6HIO0SlsOQle1mYPmk5t u2pWaz3awG7aYsJ3jz7VspDFFrERFgOatsn3GrlqucqJy85tjFhWXaMazrnZvsyeDuEH PDbK+SIwghUypB+y0QS35Gy2OaepOIY5Z1oOugnz2qGVBNzZeZy+mZGSAhLVIkU2VMH5 /v0m5HRZrkt4CYy7+B8qf/rkzEGpDwnJ99gPgIT78m5kYBc4Zsk9GJllbQ7VdJoiqY3T 0WZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700509686; x=1701114486; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=St9Y7CWGLacHzcPbhmxFrh2RBpwLj51nyC/Ru/p9cAQ=; b=xNpgNsFBTfQTspuDlfHKKt3nKnuVGY9w83w78uUUZK5fuKIcOLBrN72xlf9PCu4pyt DlbIP8DrerdbWjbUwPMYwOaA+5lZ7tfh7CS2J33/PyWY0Yxyt8NbwumadMD6P0buQCcF lXE6ftGyjD7bk2C2DUtzdkKodcetMy/n1+rrHdPujlxOT/qxgZSb6rm6AR/5/cJI+cOP o/tqfHkzjCrmeMhZD4+8k5ZO2BOEv+dytL/f5R5w5uSewb6hdow0mVn+qkn6u7A/pZva NzZ0UhJVWSsjFik2mMMs8z2KnKkL5CTtP0G/IskIaGSJWSpxOlYxsxxGHf7qmojRWs3S f7LA== X-Gm-Message-State: AOJu0YxHrl71x0tXIp+UKCBerIieX6BZo7UdKTWfM2HOSHiCrCjN2gei U/bHD0Jt0uS6dNzuURMcwnc= X-Google-Smtp-Source: AGHT+IGpWXkkDoLiCrf5PZf3F9Pk5jdbZS5v5kwwNxxyPdrjqwd++Floqw0JU+jSXob8eiszRQsHiQ== X-Received: by 2002:a2e:7307:0:b0:2c8:721c:6912 with SMTP id o7-20020a2e7307000000b002c8721c6912mr5106425ljc.37.1700509685769; Mon, 20 Nov 2023 11:48:05 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id me23-20020a170906aed700b009e5c644e34dsm4147955ejb.82.2023.11.20.11.48.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 11:48:05 -0800 (PST) Message-ID: <9593421a3ab136064d9a3168ff163e7af3364a12.camel@gmail.com> Subject: Re: [PATCH gnome-team] gnu: appstream: Fix test. From: Liliana Marie Prikler To: Vivien Kraus , guix-patches@gnu.org Date: Mon, 20 Nov 2023 20:48:03 +0100 In-Reply-To: <85eae89301e97317fb2f8576378890b3e8f29ac2.1700501299.git.vivien@planete-kraus.eu> References: <85eae89301e97317fb2f8576378890b3e8f29ac2.1700501299.git.vivien@planete-kraus.eu> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::243; envelope-from=liliana.prikler@gmail.com; helo=mail-lj1-x243.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: rg@raghavgururajan.name, maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Am Donnerstag, dem 16.11.2023 um 00:12 +0100 schrieb Vivien Kraus: > * gnu/packages/patches/appstream-load-stemmer-early.patch: New patch. > * gnu/local.mk (dist_patch_DATA): Register it here. > * gnu/packages/freedesktop.scm (appstream) [patches]: Use it here. > [#:phases]: Remove. >=20 > Change-Id: Iddd6ce5887247df46f670c49f9efc66772c82ff0 > --- This is not so much "Fix test" as it is "Load stemmer early". =20 Still thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 21 15:33:49 2023 Received: (at 67300) by debbugs.gnu.org; 21 Nov 2023 20:33:49 +0000 Received: from localhost ([127.0.0.1]:57513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5XRN-00064x-31 for submit@debbugs.gnu.org; Tue, 21 Nov 2023 15:33:49 -0500 Received: from planete-kraus.eu ([89.234.140.182]:50642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r5XRK-00064j-Ky for 67300@debbugs.gnu.org; Tue, 21 Nov 2023 15:33:47 -0500 Received: from planete-kraus.eu (localhost.lan [127.0.0.1]) by planete-kraus.eu (OpenSMTPD) with ESMTP id d9e8495f; Tue, 21 Nov 2023 20:33:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=planete-kraus.eu; h= message-id:from:date:subject:to:cc:mime-version; s=albinoniA; bh=XEg+K1Hc7ViFpgBxmFRPWVOQhy4=; b=cQheaCkBwvvnhUrbXNqWvXQgflL2 k5oAaYm3IzDiy4q9eYy1EWHlkTqpwfFFnQQAW9f9pQv7uMkEAmTBuepMvqaXFl01 twJM0HgTT99qNwOUHgGBsoXzhGaqZ6vA1U/kpe3j2iSS7QImdDEV5McEo+aGHE+p 1NwHoZI0p9l2WuH/MKMFPihRJUd7WSb+Fv11I825fTvvuruiC//9xAwVTqpAa2UL jgVsWLsA9g3lGHTCnxwGDcg7lFrTUyOMGT5DnKCvCHMiCJza5C+WhBIqygzA6/v0 WGNE1J0lEiDyppCsKeZR1Spst59Nb2Rx+kv81BBuJA67NrclM9AbFYpZJA== Received: by planete-kraus.eu (OpenSMTPD) with ESMTPSA id 26a86582 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Tue, 21 Nov 2023 20:33:41 +0000 (UTC) Message-ID: <21168d1e7da04afbc4ed5797a7957a77f96781ac.1700597302.git.vivien@planete-kraus.eu> From: Vivien Kraus Date: Thu, 16 Nov 2023 00:12:44 +0100 Subject: [PATCH gnome-team v2] gnu: appstream: Load stemmer in all circumstances. To: 67300@debbugs.gnu.org,Liliana Marie Prikler MIME-Version: 1.0 User-Agent: Evolution 3.46.4 X-Spam-Score: 2.1 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: If the default stemmer language is computed to be "en", such as in a Guix build container, then the stemmer will not be loaded. * gnu/packages/patches/appstream-load-stemmer-early.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/freedesktop.scm (appstream) [patches]: Use it here. [#:phases]< [...] Content analysis details: (2.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 67300 Cc: rg@raghavgururajan.name, maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: If the default stemmer language is computed to be "en", such as in a Guix build container, then the stemmer will not be loaded. * gnu/packages/patches/appstream-load-stemmer-early.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/freedesktop.scm (appstream) [patches]: Use it here. [#:phases]< [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.1 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager If the default stemmer language is computed to be "en", such as in a Guix build container, then the stemmer will not be loaded. * gnu/packages/patches/appstream-load-stemmer-early.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it here. * gnu/packages/freedesktop.scm (appstream) [patches]: Use it here. [#:phases]: Remove. Change-Id: Iddd6ce5887247df46f670c49f9efc66772c82ff0 --- gnu/local.mk | 1 + gnu/packages/freedesktop.scm | 9 +- .../appstream-force-reload-stemmer.patch | 89 +++++++++++++++++++ 3 files changed, 93 insertions(+), 6 deletions(-) create mode 100644 gnu/packages/patches/appstream-force-reload-stemmer.patch diff --git a/gnu/local.mk b/gnu/local.mk index a939b9be8d..5cb9874d9f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -918,6 +918,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 0aeeadf5a3..25b7998d05 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -148,7 +148,9 @@ (define-public appstream "appstream/releases/" "AppStream-" version ".tar.xz")) (sha256 - (base32 "1val1b3dggn9g33q2r9q7wsl75a64x4lcvswvkcjjbvakkbj5xyl")))) + (base32 "1val1b3dggn9g33q2r9q7wsl75a64x4lcvswvkcjjbvakkbj5xyl")) + (patches + (search-patches "appstream-force-reload-stemmer.patch")))) (build-system meson-build-system) (arguments (list @@ -163,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/Stemming.*;") - "")))) (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 +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 + base-commit: 1cc3b7e80f60a2a5a6a1400ed0b025efeae7a523 -- 2.41.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 23 03:07:31 2023 Received: (at 67300-done) by debbugs.gnu.org; 23 Nov 2023 08:07:31 +0000 Received: from localhost ([127.0.0.1]:60547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r64kF-0007xq-9c for submit@debbugs.gnu.org; Thu, 23 Nov 2023 03:07:31 -0500 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]:61686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r64kD-0007xa-Da for 67300-done@debbugs.gnu.org; Thu, 23 Nov 2023 03:07:30 -0500 Received: by mail-ed1-x543.google.com with SMTP id 4fb4d7f45d1cf-54553e4888bso799318a12.2 for <67300-done@debbugs.gnu.org>; Thu, 23 Nov 2023 00:07:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700726840; x=1701331640; darn=debbugs.gnu.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=uIn+khF1vQy9wrkUNi5JqYHP5l/2Vf/Ml6K22Ee4aPQ=; b=j8M2rJKiqO1ZnFjMU1HDSuyjvYUnuUdBf43sv/l4Wk0Y4uJnx23OTKcPy20gCS1ZsI FOMamJuYlHOEv3LL6Ic1cRgqx7KuSa3b2k1LYTT2bzUrVk3JXlw/27YllW8+76uqXOlW 1SOPLxiks0mhfY56JnSFhjm7TQmg/8Sp/biq0Pu2L4y37IhYNIE8QRms1O2vtyJ6+Kwt nPH+3dVKUFPJAoIspGeSHzp6amtr9p/kzrWELTSPYkm4DbMItkApLScVRk5VnJ6SuGzu dK2NznsuFtjUr5hbf0SRf4iSThkX5xKn0EflJad4syChRwdBLk4RkKsNMw0BYWm3Z+P1 pQ6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700726840; x=1701331640; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=uIn+khF1vQy9wrkUNi5JqYHP5l/2Vf/Ml6K22Ee4aPQ=; b=vzp7jx9HpnTqLo35CDrSOrXEXRsv9Yo0e02T6yG04mBkqvgQFqP9phc4z52DhkHoGb DnWzeevj4OH/MKpH74EfZXud4X/6cf+BnILxpS2CRQIb/Y+VR9mqcyaLLMTikYTLPd9N bd5bg33OL32ntVk+fLQqiiu54wAA7BlY4P1jQDzDWvYljUGBOe47KrC5tekRXAUWgu6o K7nGtZgkqBODHLWe3YYNN6j5OKpU8s0Y5Kb5cKg0/dO4FokPHsNxjap8LSLA8AipBJ7O gg32iUOw2KgDSM1Cdw02FKahSXhotu1fL4WOCdxtNzJzgbj6EBsT/LoM/pvjKFIfWn0K wzpA== X-Gm-Message-State: AOJu0YyKl1Cfg6Bl43Ipa7pDCO+CFe54GJnWtAAeYknKc1S0lPPConpm R3oNDFMnxnQjNPd0iP2upnw= X-Google-Smtp-Source: AGHT+IGDcCmKcfIVSW74UEpErQWkJjSauSSAHJBk5OlskD1n5RlBk/ItqvRXOwm04kEgCKCMNggKug== X-Received: by 2002:a17:906:fd52:b0:a01:cb59:2e6b with SMTP id wi18-20020a170906fd5200b00a01cb592e6bmr1872213ejb.49.1700726839730; Thu, 23 Nov 2023 00:07:19 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id e25-20020a170906045900b009e655c77a53sm451221eja.132.2023.11.23.00.07.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 00:07:18 -0800 (PST) Message-ID: <309a2ec9ee154aabf18c8ed3bc7e71bcf88111b8.camel@gmail.com> Subject: Re: [PATCH gnome-team v2] gnu: appstream: Load stemmer in all circumstances. From: Liliana Marie Prikler To: Vivien Kraus , 67300-done@debbugs.gnu.org Date: Thu, 23 Nov 2023 09:07:17 +0100 In-Reply-To: <21168d1e7da04afbc4ed5797a7957a77f96781ac.1700597302.git.vivien@planete-kraus.eu> References: <21168d1e7da04afbc4ed5797a7957a77f96781ac.1700597302.git.vivien@planete-kraus.eu> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67300-done Cc: rg@raghavgururajan.name, maxim.cournoyer@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Donnerstag, dem 16.11.2023 um 00:12 +0100 schrieb Vivien Kraus: > If the default stemmer language is computed to be "en", such as in a > Guix > build container, then the stemmer will not be loaded. >=20 > * gnu/packages/patches/appstream-load-stemmer-early.patch: New patch. > * gnu/local.mk (dist_patch_DATA): Register it here. > * gnu/packages/freedesktop.scm (appstream) [patches]: Use it here. > [#:phases]: Remove. >=20 > Change-Id: Iddd6ce5887247df46f670c49f9efc66772c82ff0 > --- Pushed. Thanks From unknown Tue Aug 19 03:05:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 21 Dec 2023 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator