GNU bug report logs - #75688
Replace wrapper scripts with search path value files in search-paths.d

Previous Next

Package: guix-patches;

Reported by: iyzsong <at> envs.net

Date: Mon, 20 Jan 2025 12:02:02 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: iyzsong <at> envs.net
Cc: 75688 <at> debbugs.gnu.org, 宋文武 <iyzsong <at> member.fsf.org>, Vivien Kraus <vivien <at> planete-kraus.eu>, Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Subject: [bug#75688] GUIX_ify harmful environment variables and replace wrapper scripts with search path value files
Date: Mon, 27 Jan 2025 12:03:44 +0900
Hi,

iyzsong <at> envs.net writes:

> From: 宋文武 <iyzsong <at> member.fsf.org>
>
> This fixes <https://issues.guix.gnu.org/75523>.
>
> * gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch:

nitpick: I'd name this patch
gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch (s/respect/honor/).

[...]

> +              (patches
> +               (search-patches
> +                "gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch"))))
>      (build-system meson-build-system)
>      (outputs '("out" "debug"))
>      (arguments
> @@ -777,9 +780,8 @@ (define-public gdk-pixbuf
>       ;; This file is produced by the gdk-pixbuf-loaders-cache-file
>       ;; profile hook.
>       (list (search-path-specification
> -            (variable "GDK_PIXBUF_MODULE_FILE")
> +            (variable "GUIX_GDK_PIXBUF_MODULE_FILES")
>              (files (list %gdk-pixbuf-loaders-cache-file))
> -            (separator #f)              ;single valued
>              (file-type 'regular))))
>      (synopsis "Image loading library")
>      (description "GdkPixbuf is a library that loads image data in various
> diff --git a/gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch b/gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch
> new file mode 100644
> index 0000000000..eb22761403
> --- /dev/null
> +++ b/gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch
> @@ -0,0 +1,18 @@
> +diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
> +index e1df590..ba24cf6 100644
> +--- a/gdk-pixbuf/gdk-pixbuf-io.c
> ++++ b/gdk-pixbuf/gdk-pixbuf-io.c
> +@@ -670,6 +670,13 @@ gdk_pixbuf_io_init (void)
> + 	gboolean ret;
> + 
> + 	gdk_pixbuf_io_init_builtin ();
> ++
> ++	/* Load loaders from GUIX_GDK_PIXBUF_MODULE_FILES. */

nitpick: "Load loaders" reads a bit loaded ;-).  I'd write "Load modules
[...]" instead.

> ++	gchar **guix_module_files = g_build_guix_search_path_dirs ("GUIX_GDK_PIXBUF_MODULE_FILES");
> ++	for (int i = 0; guix_module_files[i] != NULL; i++)

nitpick: I read a long time ago that ++i achieves the same and is more
efficient, though I forgot the reasons.  Probably doesn't matter here,
but could be neater (here and elsewhere).

Otherwise, for this commit alone,

Reviewed-by: Maxim Cournoyer <maxim.cournoyer <at> gmail>

(You'll want to give this series plenty of time for others to chime in).

-- 
Thanks,
Maxim




This bug report was last modified 73 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.