From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KHRfInGRbF9LfwAA0tVLHw (envelope-from ) for ; Thu, 24 Sep 2020 12:30:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 7mhMHnGRbF94fgAA1q6Kng (envelope-from ) for ; Thu, 24 Sep 2020 12:30:41 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 913FE940668 for ; Thu, 24 Sep 2020 12:30:40 +0000 (UTC) Received: from localhost ([::1]:37920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kLQOV-0007oK-4Y for larch@yhetil.org; Thu, 24 Sep 2020 08:30:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kLQNv-0007nR-6x for guix-patches@gnu.org; Thu, 24 Sep 2020 08:30:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55530) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kLQNu-0004eP-UE for guix-patches@gnu.org; Thu, 24 Sep 2020 08:30:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kLQNu-00070O-PP for guix-patches@gnu.org; Thu, 24 Sep 2020 08:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42958] [PATCH core-updates 03/29] gnu: glib: Update package definition. References: <20200820150914.9443-1-dannym@scratchpost.org> In-Reply-To: <20200820150914.9443-1-dannym@scratchpost.org> Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 24 Sep 2020 12:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42958 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42958@debbugs.gnu.org Received: via spool by 42958-submit@debbugs.gnu.org id=B42958.160095054526843 (code B ref 42958); Thu, 24 Sep 2020 12:30:02 +0000 Received: (at 42958) by debbugs.gnu.org; 24 Sep 2020 12:29:05 +0000 Received: from localhost ([127.0.0.1]:38843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLQMq-0006yU-ST for submit@debbugs.gnu.org; Thu, 24 Sep 2020 08:29:05 -0400 Received: from knopi.disroot.org ([178.21.23.139]:32948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kLQMm-0006yJ-Fu for 42958@debbugs.gnu.org; Thu, 24 Sep 2020 08:28:56 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id C109051BEB for <42958@debbugs.gnu.org>; Thu, 24 Sep 2020 14:28:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dkp7aI0jHmAt for <42958@debbugs.gnu.org>; Thu, 24 Sep 2020 14:28:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1600950526; bh=wdlshdPeya3Tjavwrc6kgqYl52eDRrZzpj4jdBWHmZA=; h=To:From:Subject:Date; b=H1m5+5t+VZ89HAORL112ENYLkIguo2web9t1SkJxJJmhOaWrD9h/dZ+6d/ex3z/Na dWWvsywF6gYQKSWglCBY22Pkl2XJwTDaZJu/oC2zV9BUvo8eMW3+n0xMC69+qFsBuX 457K9I4GHpPWkOpAB/BB8rPTsnmOe8WlHtIQf7HK90VoDKohYoNG7i94MoSpivN8R3 qs26ZIqKs5hgoyGwtCbCq9EiU6KkYcH/SQAcmKITgRF9cKM1asNuJbQ8nJ72ub62gT U9b/qXPIElBqQdYsVE/O5rxOPLuOWw3R/wLHhqyvOvAAP/wvviXzNcZxiwRgdgn9no EVb2JcNPbyNYw== From: Raghav Gururajan Message-ID: <5acf11ff-2410-d336-4037-8e7665c78083@disroot.org> Date: Thu, 24 Sep 2020 08:28:45 -0400 Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------50BA6B1176403916C0EC24C7" Content-Language: en-US X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=disroot.org header.s=mail header.b=H1m5+5t+; dmarc=fail reason="SPF not aligned (relaxed)" header.from=disroot.org (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 0.59 X-TUID: 2WUn1n2LzVX6 This is a multi-part message in MIME format. --------------50BA6B1176403916C0EC24C7 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit @Danny Please find the attached split patches. Regards, RG. --------------50BA6B1176403916C0EC24C7 Content-Type: text/x-patch; charset=UTF-8; name="0009-gnu-glib-Make-some-cosmetic-changes.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0009-gnu-glib-Make-some-cosmetic-changes.patch" >From 8cd190b19c52da07c6b400be1a703f27ceaf142d Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 24 Sep 2020 04:34:05 -0400 Subject: [PATCH 09/11] gnu: glib: Make some cosmetic changes. * gnu/packages/glib.scm (glib): Make some cosmetic changes. --- gnu/packages/glib.scm | 390 ++++++++++++++++++++---------------------- 1 file changed, 185 insertions(+), 205 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index ca037d3b24..21b39b94e8 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -176,213 +176,193 @@ shared NFS home directories.") (define glib (package - (name "glib") - (version "2.62.6") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" - name "/" (string-take version 4) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "174bsmbmcvaw69ff9g60q5sx0fn23rkhqcwqz17h5s7sprps4kqh")) - (patches (search-patches "glib-tests-timer.patch")) - (modules '((guix build utils))) - (snippet - '(begin - (substitute* "tests/spawn-test.c" - (("/bin/sh") "sh")) - #t)))) - (build-system meson-build-system) - (outputs '("out" ; everything - "bin")) ; glib-mkenums, gtester, etc.; depends on Python - (propagated-inputs - `(("pcre" ,pcre) ; in the Requires.private field of glib-2.0.pc - ("libffi" ,libffi) ; in the Requires.private field of gobject-2.0.pc - ;; These are in the Requires.private field of gio-2.0.pc - ("util-linux" ,util-linux "lib") ;for libmount - ("libselinux" ,libselinux) - ("zlib" ,zlib))) - (native-inputs - `(("gettext" ,gettext-minimal) - ("m4" ,m4) ; for installing m4 macros - ("dbus" ,dbus) ; for GDBus tests - ("pkg-config" ,pkg-config) - ("python" ,python-wrapper) - ("perl" ,perl) ; needed by GIO tests - ("tzdata" ,tzdata-for-tests))) ; for tests/gdatetime.c - (arguments - `(#:disallowed-references (,tzdata-for-tests) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-dbus-launch-path - (lambda* (#:key inputs #:allow-other-keys) - (let ((dbus (assoc-ref inputs "dbus"))) - (substitute* "gio/gdbusaddress.c" - (("command_line = g_strdup_printf \\(\"dbus-launch") - (string-append "command_line = g_strdup_printf (\"" - dbus "/bin/dbus-launch"))) - #t))) - (add-after 'unpack 'patch-gio-launch-desktop - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; See also - ;; for another future fix. - (substitute* "gio/gdesktopappinfo.c" - (("gio-launch-desktop") - (string-append out "/libexec/gio-launch-desktop"))) - #t))) - (add-before 'build 'pre-build - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; For tests/gdatetime.c. - (setenv "TZDIR" - (string-append (assoc-ref inputs "tzdata") - "/share/zoneinfo")) - - ;; Some tests want write access there. - (setenv "HOME" (getcwd)) - (setenv "XDG_CACHE_HOME" (getcwd)) - #t)) - (add-after 'unpack 'disable-failing-tests - (lambda _ - (let ((disable - (lambda (test-file test-paths) - (define pattern+procs - (map (lambda (test-path) - (cons - ;; XXX: only works for single line statements. - (format #f "g_test_add_func.*\"~a\".*" test-path) - (const ""))) - test-paths)) - (substitute test-file pattern+procs))) - (failing-tests - '(("glib/tests/thread.c" - (;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64 - ;; as found on hydra.gnu.org, and strace(1) doesn't - ;; recognize it. - "/thread/thread4")) - - ;; This tries to find programs in FHS directories. - ("glib/tests/utils.c" - ("/utils/find-program")) - - ;; This fails because "glib/tests/echo-script" cannot be - ;; found. - ("glib/tests/spawn-singlethread.c" - ("/gthread/spawn-script")) - - ("glib/tests/timer.c" - (;; fails if compiler optimizations are enabled, which they - ;; are by default. - "/timer/stop")) - - ("gio/tests/gapplication.c" - (;; XXX: proven to be unreliable. See: - ;; - ;; - "/gapplication/quit" - - ;; XXX: fails randomly for unknown reason. See: - ;; - "/gapplication/local-actions")) - - ("gio/tests/contenttype.c" - (;; XXX: requires shared-mime-info. - "/contenttype/guess" - "/contenttype/guess_svg_from_data" - "/contenttype/subtype" - "/contenttype/list" - "/contenttype/icon" - "/contenttype/symbolic-icon" - "/contenttype/tree")) - - ("gio/tests/appinfo.c" - (;; XXX: requires update-desktop-database. - "/appinfo/associations")) - - ("gio/tests/desktop-app-info.c" - (;; XXX: requires update-desktop-database. - "/desktop-app-info/delete" - "/desktop-app-info/default" - "/desktop-app-info/fallback" - "/desktop-app-info/lastused" - "/desktop-app-info/search")) - - ("gio/tests/gdbus-peer.c" - (;; Requires /etc/machine-id. - "/gdbus/codegen-peer-to-peer")) - - ("gio/tests/gdbus-address-get-session.c" - (;; Requires /etc/machine-id. - "/gdbus/x11-autolaunch")) - - ("gio/tests/gsocketclient-slow.c" - (;; These tests tries to resolve "localhost", and fails. - "/socket-client/happy-eyeballs/slow" - "/socket-client/happy-eyeballs/cancellation/delayed")) - - ))) - (for-each (lambda (x) (apply disable x)) failing-tests) - #t))) - (replace 'check - (lambda _ - (setenv "MESON_TESTTHREADS" - (number->string (parallel-job-count))) - ;; Do not run tests marked as "flaky". - (invoke "meson" "test" "--no-suite" "flaky"))) - ;; TODO: meson does not permit the bindir to be outside of prefix. - ;; See https://github.com/mesonbuild/meson/issues/2561 - ;; We can remove this once meson is patched. - (add-after 'install 'move-executables - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (bin (assoc-ref outputs "bin"))) - (mkdir-p bin) - (rename-file (string-append out "/bin") - (string-append bin "/bin")) - ;; This one is an implementation detail of glib. - ;; It is wrong that that's in "/bin" in the first place, - ;; but that's what upstream is doing right now. - ;; See . - (mkdir (string-append out "/libexec")) - (rename-file (string-append bin "/bin/gio-launch-desktop") - (string-append out "/libexec/gio-launch-desktop")) - ;; Do not refer to "bindir", which points to "${prefix}/bin". - ;; We don't patch "bindir" to point to "$bin/bin", because that - ;; would create a reference cycle between the "out" and "bin" - ;; outputs. - (substitute* (list (string-append out "/lib/pkgconfig/gio-2.0.pc") - (string-append out "/lib/pkgconfig/glib-2.0.pc")) - (("bindir=\\$\\{prefix\\}/bin") "") - (("=\\$\\{bindir\\}/") "=")) - #t)))))) - ;; TODO: see above for explanation. - ;; #:configure-flags (list (string-append "--bindir=" - ;; (assoc-ref %outputs "bin") - ;; "/bin")) - - (native-search-paths - ;; This variable is not really "owned" by GLib, but several related - ;; packages refer to it: gobject-introspection's tools use it as a search - ;; path for .gir files, and it's also a search path for schemas produced - ;; by 'glib-compile-schemas'. - (list (search-path-specification - (variable "XDG_DATA_DIRS") - (files '("share"))) - ;; To load extra gio modules from glib-networking, etc. - (search-path-specification - (variable "GIO_EXTRA_MODULES") - (files '("lib/gio/modules"))))) - (search-paths native-search-paths) - (properties '((hidden? . #t))) - - (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME") - (description - "GLib provides data structure handling for C, portability wrappers, + (properties '((hidden? . #t))) + (name "glib") + (version "2.62.6") + (source + (origin + (method url-fetch) + (uri + (string-append "mirror://gnome/sources/" + name "/" (string-take version 4) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 "174bsmbmcvaw69ff9g60q5sx0fn23rkhqcwqz17h5s7sprps4kqh")) + (patches (search-patches "glib-tests-timer.patch")) + (modules '((guix build utils))) + (snippet + '(begin + (substitute* "tests/spawn-test.c" + (("/bin/sh") "sh")) + #t)))) + (build-system meson-build-system) + (outputs '("out" "bin")) + (arguments + `(#:disallowed-references (,tzdata-for-tests) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-dbus-launch-path + (lambda* (#:key inputs #:allow-other-keys) + (let ((dbus (assoc-ref inputs "dbus"))) + (substitute* "gio/gdbusaddress.c" + (("command_line = g_strdup_printf \\(\"dbus-launch") + (string-append "command_line = g_strdup_printf (\"" + dbus "/bin/dbus-launch"))) + #t))) + (add-after 'unpack 'patch-gio-launch-desktop + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; See also + ;; for another future fix. + (substitute* "gio/gdesktopappinfo.c" + (("gio-launch-desktop") + (string-append out "/libexec/gio-launch-desktop"))) + #t))) + (add-before 'build 'pre-build + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; For tests/gdatetime.c. + (setenv "TZDIR" + (string-append (assoc-ref inputs "tzdata") + "/share/zoneinfo")) + ;; Some tests want write access there. + (setenv "HOME" (getcwd)) + (setenv "XDG_CACHE_HOME" (getcwd)) + #t)) + (add-after 'unpack 'disable-failing-tests + (lambda _ + (let ((disable + (lambda (test-file test-paths) + (define pattern+procs + (map (lambda (test-path) + (cons + ;; XXX: only works for single line statements. + (format #f "g_test_add_func.*\"~a\".*" test-path) + (const ""))) + test-paths)) + (substitute test-file pattern+procs))) + (failing-tests + '(("glib/tests/thread.c" + ( ;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64 + ;; as found on hydra.gnu.org, and strace(1) doesn't + ;; recognize it. + "/thread/thread4")) + ;; This tries to find programs in FHS directories. + ("glib/tests/utils.c" + ("/utils/find-program")) + ;; This fails because "glib/tests/echo-script" cannot be + ;; found. + ("glib/tests/spawn-singlethread.c" + ("/gthread/spawn-script")) + ("glib/tests/timer.c" + ( ;; fails if compiler optimizations are enabled, which they + ;; are by default. + "/timer/stop")) + ("gio/tests/gapplication.c" + ( ;; XXX: proven to be unreliable. See: + ;; + ;; + "/gapplication/quit" + ;; XXX: fails randomly for unknown reason. See: + ;; + "/gapplication/local-actions")) + ("gio/tests/contenttype.c" + ( ;; XXX: requires shared-mime-info. + "/contenttype/guess" + "/contenttype/guess_svg_from_data" + "/contenttype/subtype" + "/contenttype/list" + "/contenttype/icon" + "/contenttype/symbolic-icon" + "/contenttype/tree")) + ("gio/tests/appinfo.c" + ( ;; XXX: requires update-desktop-database. + "/appinfo/associations")) + ("gio/tests/desktop-app-info.c" + ( ;; XXX: requires update-desktop-database. + "/desktop-app-info/delete" + "/desktop-app-info/default" + "/desktop-app-info/fallback" + "/desktop-app-info/lastused" + "/desktop-app-info/search")) + ("gio/tests/gdbus-peer.c" + ( ;; Requires /etc/machine-id. + "/gdbus/codegen-peer-to-peer")) + ("gio/tests/gdbus-address-get-session.c" + ( ;; Requires /etc/machine-id. + "/gdbus/x11-autolaunch")) + ("gio/tests/gsocketclient-slow.c" + ( ;; These tests tries to resolve "localhost", and fails. + "/socket-client/happy-eyeballs/slow" + "/socket-client/happy-eyeballs/cancellation/delayed")) + ))) + (for-each (lambda (x) (apply disable x)) failing-tests) + #t))) + (replace 'check + (lambda _ + (setenv "MESON_TESTTHREADS" + (number->string (parallel-job-count))) + ;; Do not run tests marked as "flaky". + (invoke "meson" "test" "--no-suite" "flaky"))) + ;; TODO: meson does not permit the bindir to be outside of prefix. + ;; See https://github.com/mesonbuild/meson/issues/2561 + ;; We can remove this once meson is patched. + (add-after 'install 'move-executables + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (bin (assoc-ref outputs "bin"))) + (mkdir-p bin) + (rename-file (string-append out "/bin") + (string-append bin "/bin")) + ;; This one is an implementation detail of glib. + ;; It is wrong that that's in "/bin" in the first place, + ;; but that's what upstream is doing right now. + ;; See . + (mkdir (string-append out "/libexec")) + (rename-file (string-append bin "/bin/gio-launch-desktop") + (string-append out "/libexec/gio-launch-desktop")) + ;; Do not refer to "bindir", which points to "${prefix}/bin". + ;; We don't patch "bindir" to point to "$bin/bin", because that + ;; would create a reference cycle between the "out" and "bin" + ;; outputs. + (substitute* (list (string-append out "/lib/pkgconfig/gio-2.0.pc") + (string-append out "/lib/pkgconfig/glib-2.0.pc")) + (("bindir=\\$\\{prefix\\}/bin") "") + (("=\\$\\{bindir\\}/") "=")) + #t)))))) + (native-inputs + `(("gettext" ,gettext-minimal) + ("m4" ,m4) + ("dbus" ,dbus) + ("pkg-config" ,pkg-config) + ("python" ,python-wrapper) + ("perl" ,perl) + ("tzdata" ,tzdata-for-tests))) + (propagated-inputs + `(("pcre" ,pcre) + ("libffi" ,libffi) + ("util-linux" ,util-linux "lib") + ("libselinux" ,libselinux) + ("zlib" ,zlib))) + (native-search-paths + ;; This variable is not really "owned" by GLib, but several related + ;; packages refer to it: gobject-introspection's tools use it as a search + ;; path for .gir files, and it's also a search path for schemas produced + ;; by 'glib-compile-schemas'. + (list (search-path-specification + (variable "XDG_DATA_DIRS") + (files '("share"))) + ;; To load extra gio modules from glib-networking, etc. + (search-path-specification + (variable "GIO_EXTRA_MODULES") + (files '("lib/gio/modules"))))) + (search-paths native-search-paths) + (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME") + (description + "GLib provides data structure handling for C, portability wrappers, and interfaces for such runtime functionality as an event loop, threads, dynamic loading, and an object system.") - (home-page "https://developer.gnome.org/glib/") - (license license:lgpl2.1+))) + (home-page "https://developer.gnome.org/glib/") + (license license:lgpl2.1+))) (define-public glib-with-documentation ;; glib's doc must be built in a separate package since it requires gtk-doc, -- 2.28.0 --------------50BA6B1176403916C0EC24C7 Content-Type: text/x-patch; charset=UTF-8; name="0010-gnu-glib-Update-to-2.64.3.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0010-gnu-glib-Update-to-2.64.3.patch" >From 67bad944e2b775ebe2bd0101220b78b2a07c8bdf Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 24 Sep 2020 04:44:59 -0400 Subject: [PATCH 10/11] gnu: glib: Update to 2.64.3. * gnu/packages/glib.scm (glib) [version]: Update to 2.64.3. [source][sha256]: Modify base32. [patches]: Add glib-disable-failing-tests.patch. Remove glib-tests-timer.patch. [arguments]<#:disallowed-references>: Remove argument. <#:phases>['patch-python-references]: New phase. ['pre-check]: New phase. ['move-bin]: New phase. ['patch-dbus-launch-path]: Remove phase. ['patch-gio-launch-desktop]: Remove phase. ['pre-build]: Remove phase. ['disable-failing-tests]: Remove phase. ['check]: Remove phase. ['move-executables]: Remove phase. [native-inputs]: Add intltool, python, libxml2 and libxslt. Remove dbus. [inputs]: Add dbus and libelf. * gnu/packages/patches/glib-disable-failing-tests.patch: New file. * gnu/packages/patches/glib-tests-timer.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust. --- gnu/local.mk | 2 +- gnu/packages/glib.scm | 179 +++++------------- .../patches/glib-disable-failing-tests.patch | 84 ++++++++ gnu/packages/patches/glib-tests-timer.patch | 15 -- 4 files changed, 136 insertions(+), 144 deletions(-) create mode 100644 gnu/packages/patches/glib-disable-failing-tests.patch delete mode 100644 gnu/packages/patches/glib-tests-timer.patch diff --git a/gnu/local.mk b/gnu/local.mk index f3b5b17e84..2fc47ca2ec 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1034,7 +1034,7 @@ dist_patch_DATA = \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ - %D%/packages/patches/glib-tests-timer.patch \ + %D%/packages/patches/glib-disable-failing-tests.patch \ %D%/packages/patches/glibc-CVE-2018-11236.patch \ %D%/packages/patches/glibc-CVE-2018-11237.patch \ %D%/packages/patches/glibc-CVE-2019-7309.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 21b39b94e8..be5d45596d 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -178,7 +178,7 @@ shared NFS home directories.") (package (properties '((hidden? . #t))) (name "glib") - (version "2.62.6") + (version "2.64.3") (source (origin (method url-fetch) @@ -187,8 +187,9 @@ shared NFS home directories.") name "/" (string-take version 4) "/" name "-" version ".tar.xz")) (sha256 - (base32 "174bsmbmcvaw69ff9g60q5sx0fn23rkhqcwqz17h5s7sprps4kqh")) - (patches (search-patches "glib-tests-timer.patch")) + (base32 "08pbgiv5m3rica4ydvwvpq5mrxbyswx7l1jzjc2ch52xjabvr77y")) + (patches + (search-patches "glib-disable-failing-tests.patch")) (modules '((guix build utils))) (snippet '(begin @@ -198,27 +199,23 @@ shared NFS home directories.") (build-system meson-build-system) (outputs '("out" "bin")) (arguments - `(#:disallowed-references (,tzdata-for-tests) - #:phases + `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'patch-dbus-launch-path + ;; Python references are not being patched in patch-phase of build, + ;; despite using python-wrapper as input. So we patch them manually. + (add-after 'unpack 'patch-python-references (lambda* (#:key inputs #:allow-other-keys) - (let ((dbus (assoc-ref inputs "dbus"))) - (substitute* "gio/gdbusaddress.c" - (("command_line = g_strdup_printf \\(\"dbus-launch") - (string-append "command_line = g_strdup_printf (\"" - dbus "/bin/dbus-launch"))) - #t))) - (add-after 'unpack 'patch-gio-launch-desktop - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; See also - ;; for another future fix. - (substitute* "gio/gdesktopappinfo.c" - (("gio-launch-desktop") - (string-append out "/libexec/gio-launch-desktop"))) - #t))) - (add-before 'build 'pre-build + (substitute* '("gio/gdbus-2.0/codegen/gdbus-codegen.in" + "glib/gtester-report.in" + "gobject/glib-genmarshal.in" + "gobject/glib-mkenums.in") + (("@PYTHON@") + (string-append (assoc-ref inputs "python") + "/bin/python" + ,(version-major+minor + (package-version python))))) + #t)) + (add-before 'check 'pre-check (lambda* (#:key inputs outputs #:allow-other-keys) ;; For tests/gdatetime.c. (setenv "TZDIR" @@ -228,133 +225,59 @@ shared NFS home directories.") (setenv "HOME" (getcwd)) (setenv "XDG_CACHE_HOME" (getcwd)) #t)) - (add-after 'unpack 'disable-failing-tests - (lambda _ - (let ((disable - (lambda (test-file test-paths) - (define pattern+procs - (map (lambda (test-path) - (cons - ;; XXX: only works for single line statements. - (format #f "g_test_add_func.*\"~a\".*" test-path) - (const ""))) - test-paths)) - (substitute test-file pattern+procs))) - (failing-tests - '(("glib/tests/thread.c" - ( ;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64 - ;; as found on hydra.gnu.org, and strace(1) doesn't - ;; recognize it. - "/thread/thread4")) - ;; This tries to find programs in FHS directories. - ("glib/tests/utils.c" - ("/utils/find-program")) - ;; This fails because "glib/tests/echo-script" cannot be - ;; found. - ("glib/tests/spawn-singlethread.c" - ("/gthread/spawn-script")) - ("glib/tests/timer.c" - ( ;; fails if compiler optimizations are enabled, which they - ;; are by default. - "/timer/stop")) - ("gio/tests/gapplication.c" - ( ;; XXX: proven to be unreliable. See: - ;; - ;; - "/gapplication/quit" - ;; XXX: fails randomly for unknown reason. See: - ;; - "/gapplication/local-actions")) - ("gio/tests/contenttype.c" - ( ;; XXX: requires shared-mime-info. - "/contenttype/guess" - "/contenttype/guess_svg_from_data" - "/contenttype/subtype" - "/contenttype/list" - "/contenttype/icon" - "/contenttype/symbolic-icon" - "/contenttype/tree")) - ("gio/tests/appinfo.c" - ( ;; XXX: requires update-desktop-database. - "/appinfo/associations")) - ("gio/tests/desktop-app-info.c" - ( ;; XXX: requires update-desktop-database. - "/desktop-app-info/delete" - "/desktop-app-info/default" - "/desktop-app-info/fallback" - "/desktop-app-info/lastused" - "/desktop-app-info/search")) - ("gio/tests/gdbus-peer.c" - ( ;; Requires /etc/machine-id. - "/gdbus/codegen-peer-to-peer")) - ("gio/tests/gdbus-address-get-session.c" - ( ;; Requires /etc/machine-id. - "/gdbus/x11-autolaunch")) - ("gio/tests/gsocketclient-slow.c" - ( ;; These tests tries to resolve "localhost", and fails. - "/socket-client/happy-eyeballs/slow" - "/socket-client/happy-eyeballs/cancellation/delayed")) - ))) - (for-each (lambda (x) (apply disable x)) failing-tests) - #t))) - (replace 'check - (lambda _ - (setenv "MESON_TESTTHREADS" - (number->string (parallel-job-count))) - ;; Do not run tests marked as "flaky". - (invoke "meson" "test" "--no-suite" "flaky"))) - ;; TODO: meson does not permit the bindir to be outside of prefix. - ;; See https://github.com/mesonbuild/meson/issues/2561 - ;; We can remove this once meson is patched. - (add-after 'install 'move-executables + ;; Meson does not permit the bindir to be outside of prefix. + (add-after 'install 'move-bin (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (bin (assoc-ref outputs "bin"))) + (let* ((out (assoc-ref outputs "out")) + (bin (assoc-ref outputs "bin"))) (mkdir-p bin) - (rename-file (string-append out "/bin") - (string-append bin "/bin")) - ;; This one is an implementation detail of glib. - ;; It is wrong that that's in "/bin" in the first place, - ;; but that's what upstream is doing right now. - ;; See . - (mkdir (string-append out "/libexec")) - (rename-file (string-append bin "/bin/gio-launch-desktop") - (string-append out "/libexec/gio-launch-desktop")) + (rename-file + (string-append out "/bin") + (string-append bin "/bin")) ;; Do not refer to "bindir", which points to "${prefix}/bin". ;; We don't patch "bindir" to point to "$bin/bin", because that ;; would create a reference cycle between the "out" and "bin" ;; outputs. - (substitute* (list (string-append out "/lib/pkgconfig/gio-2.0.pc") - (string-append out "/lib/pkgconfig/glib-2.0.pc")) + (substitute* + (list + (string-append out "/lib/pkgconfig/gio-2.0.pc") + (string-append out "/lib/pkgconfig/glib-2.0.pc")) (("bindir=\\$\\{prefix\\}/bin") "") (("=\\$\\{bindir\\}/") "=")) #t)))))) (native-inputs `(("gettext" ,gettext-minimal) + ("libintl" ,intltool) ("m4" ,m4) - ("dbus" ,dbus) - ("pkg-config" ,pkg-config) - ("python" ,python-wrapper) ("perl" ,perl) - ("tzdata" ,tzdata-for-tests))) + ("pkg-config" ,pkg-config) + ("python-wrapper" ,python-wrapper) + ("python" ,python) ; For 'patch-python-references + ("tzdata" ,tzdata-for-tests) + ("xmllint" ,libxml2) + ("xsltproc" ,libxslt))) + (inputs + `(("dbus" ,dbus) + ("libelf" ,libelf))) (propagated-inputs - `(("pcre" ,pcre) - ("libffi" ,libffi) - ("util-linux" ,util-linux "lib") + `(("libffi" ,libffi) ("libselinux" ,libselinux) + ("pcre" ,pcre) + ("util-linux" ,util-linux "lib") ("zlib" ,zlib))) (native-search-paths ;; This variable is not really "owned" by GLib, but several related ;; packages refer to it: gobject-introspection's tools use it as a search ;; path for .gir files, and it's also a search path for schemas produced ;; by 'glib-compile-schemas'. - (list (search-path-specification - (variable "XDG_DATA_DIRS") - (files '("share"))) - ;; To load extra gio modules from glib-networking, etc. - (search-path-specification - (variable "GIO_EXTRA_MODULES") - (files '("lib/gio/modules"))))) + (list + (search-path-specification + (variable "XDG_DATA_DIRS") + (files '("share"))) + ;; To load extra gio modules from glib-networking, etc. + (search-path-specification + (variable "GIO_EXTRA_MODULES") + (files '("lib/gio/modules"))))) (search-paths native-search-paths) (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME") (description diff --git a/gnu/packages/patches/glib-disable-failing-tests.patch b/gnu/packages/patches/glib-disable-failing-tests.patch new file mode 100644 index 0000000000..3601c42030 --- /dev/null +++ b/gnu/packages/patches/glib-disable-failing-tests.patch @@ -0,0 +1,84 @@ +From a2e6783f2278ed32b1e552691ec5d67d6940757e Mon Sep 17 00:00:00 2001 +From: Raghav Gururajan +Date: Tue, 9 Jun 2020 05:17:53 -0400 +Subject: [PATCH] PATCH: Disable failing tests. + +--- + gio/tests/meson.build | 19 ------------------- + glib/tests/meson.build | 2 -- + 2 files changed, 21 deletions(-) + +diff --git a/gio/tests/meson.build b/gio/tests/meson.build +index c7c3e3035..6e38eb39e 100644 +--- a/gio/tests/meson.build ++++ b/gio/tests/meson.build +@@ -34,7 +34,6 @@ gio_tests = { + 'buffered-output-stream' : {}, + 'cancellable' : {}, + 'contexts' : {}, +- 'contenttype' : {}, + 'converter-stream' : {}, + 'credentials' : {}, + 'data-input-stream' : {}, +@@ -78,7 +77,6 @@ gio_tests = { + 'tls-certificate' : {'extra_sources' : ['gtesttlsbackend.c']}, + 'tls-interaction' : {'extra_sources' : ['gtesttlsbackend.c']}, + 'tls-database' : {'extra_sources' : ['gtesttlsbackend.c']}, +- 'gdbus-address-get-session' : {}, + 'win32-appinfo' : {}, + } + +@@ -135,10 +133,6 @@ endif + if host_machine.system() != 'windows' + gio_tests += { + 'file' : {}, +- 'gdbus-peer' : { +- 'dependencies' : [libgdbus_example_objectmanager_dep], +- 'install_rpath' : installed_tests_execdir +- }, + 'gdbus-peer-object-manager' : {}, + 'live-g-file' : {}, + 'socket-address' : {}, +@@ -173,19 +167,6 @@ if host_machine.system() != 'windows' + } + endif + +- # Uninstalled because of the check-for-executable logic in DesktopAppInfo +- # unable to find the installed executable +- if not glib_have_cocoa +- gio_tests += { +- 'appinfo' : { +- 'install' : false, +- }, +- 'desktop-app-info' : { +- 'install' : false, +- }, +- } +- endif +- + test_extra_programs += { + 'basic-application' : {}, + 'dbus-launch' : {}, +diff --git a/glib/tests/meson.build b/glib/tests/meson.build +index 8da477d19..9fa24dd49 100644 +--- a/glib/tests/meson.build ++++ b/glib/tests/meson.build +@@ -103,7 +103,6 @@ glib_tests = { + 'utf8-pointer' : {}, + 'utf8-validate' : {}, + 'utf8-misc' : {}, +- 'utils' : {}, + 'unicode' : {}, + 'uri' : {}, + '1bit-mutex' : {}, +@@ -151,7 +150,6 @@ if host_machine.system() == 'windows' + else + glib_tests += { + 'include' : {}, +- 'unix' : {}, + } + if have_rtld_next + glib_tests += { +-- +2.26.2 + diff --git a/gnu/packages/patches/glib-tests-timer.patch b/gnu/packages/patches/glib-tests-timer.patch deleted file mode 100644 index e37425c0c8..0000000000 --- a/gnu/packages/patches/glib-tests-timer.patch +++ /dev/null @@ -1,15 +0,0 @@ -* On i686 floating-point roundoff errors could sometimes cause this check to - fail depending on the elapsed microseconds. Improve rounding by adding a - fractional bit. - ---- glib-2.40.0/glib/tests/timer.c 2014-03-05 08:05:42.000000000 -0600 -+++ glib-2.40.0/glib/tests/timer.c 2014-07-10 16:33:12.746862822 -0500 -@@ -35,7 +35,7 @@ - elapsed = g_timer_elapsed (timer, µs); - - g_assert_cmpfloat (elapsed, <, 1.0); -- g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6)) % 1000000); -+ g_assert_cmpuint (micros, ==, ((guint64)(elapsed * 1e6 + 0.5)) % 1000000); - - g_timer_destroy (timer); - } -- 2.28.0 --------------50BA6B1176403916C0EC24C7 Content-Type: text/x-patch; charset=UTF-8; name="0011-gnu-glib-Update-synopsis-and-description.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0011-gnu-glib-Update-synopsis-and-description.patch" >From 2976c0ac467b692da996332f719df3abf90c2a9e Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 24 Sep 2020 08:16:48 -0400 Subject: [PATCH 11/11] gnu: glib: Update synopsis and description. * gnu/packages/glib.scm (glib) [synopsis]: Modify. [description]: Modify. --- gnu/packages/glib.scm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index be5d45596d..2cda6cd000 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -279,12 +279,11 @@ shared NFS home directories.") (variable "GIO_EXTRA_MODULES") (files '("lib/gio/modules"))))) (search-paths native-search-paths) - (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME") - (description - "GLib provides data structure handling for C, portability wrappers, -and interfaces for such runtime functionality as an event loop, threads, -dynamic loading, and an object system.") - (home-page "https://developer.gnome.org/glib/") + (synopsis "Low-level core library for GNOME projects") + (description "GLib provides data structure handling for C, portability +wrappers, and interfaces for such runtime functionality as an event loop, +threads, dynamic loading, and an object system.") + (home-page "https://wiki.gnome.org/Projects/GLib") (license license:lgpl2.1+))) (define-public glib-with-documentation -- 2.28.0 --------------50BA6B1176403916C0EC24C7--