[gnome-team 1/2] gnu: gdk-pixbuf: Respect GUIX_GDK_PIXBUF_MODULE_FILES search path.

  • Done
  • quality assurance status badge
Details
4 participants
  • iyzsong
  • Liliana Marie Prikler
  • Maxim Cournoyer
  • Simon Streit
Owner
unassigned
Submitted by
iyzsong
Severity
normal
I
I
iyzsong wrote on 24 Jan 04:26 +0100
(address . guix-patches@gnu.org)(name . ???)(address . iyzsong@member.fsf.org)
3690118c9d5b8b536faba3909ee8c2fb1eb38cbb.1737689162.git.iyzsong@member.fsf.org
From: ??? <iyzsong@member.fsf.org>


* gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Register patch.
* gnu/packages/gtk.scm (gdk-pixbuf)[source]: Add patch.
[native-search-paths]: Replace GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES.

Change-Id: Ibcf6ebf33f5de2c889bc27a88d59a5f444b77906
---
gnu/local.mk | 1 +
gnu/packages/gtk.scm | 8 ++++---
...respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch | 21 +++++++++++++++++++
3 files changed, 27 insertions(+), 3 deletions(-)
create mode 100644 gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch

Toggle diff (70 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 72b27cb915..21f04f8a51 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1395,6 +1395,7 @@ dist_patch_DATA = \
%D%/packages/patches/gd-fix-tests-on-i686.patch \
%D%/packages/patches/gd-brect-bounds.patch \
%D%/packages/patches/gdb-hurd64.patch \
+ %D%/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch \
%D%/packages/patches/gdm-default-session.patch \
%D%/packages/patches/gdm-remove-hardcoded-xwayland-path.patch \
%D%/packages/patches/gdm-wayland-session-wrapper-from-env.patch \
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index fac94e293b..97d5ca98d0 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -725,7 +725,10 @@ (define-public gdk-pixbuf
name "-" version ".tar.xz"))
(sha256
(base32
- "1iz392vrlrnb92hrak697bgndsbkrcxhqxilxn6f99xr8ls5nl5r"))))
+ "1iz392vrlrnb92hrak697bgndsbkrcxhqxilxn6f99xr8ls5nl5r"))
+ (patches
+ (search-patches
+ "gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch"))))
(build-system meson-build-system)
(outputs '("out" "debug"))
(arguments
@@ -779,9 +782,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..d47a54bef1
--- /dev/null
+++ b/gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch
@@ -0,0 +1,21 @@
+diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
+index e1df590..214a283 100644
+--- a/gdk-pixbuf/gdk-pixbuf-io.c
++++ b/gdk-pixbuf/gdk-pixbuf-io.c
+@@ -670,6 +670,16 @@ gdk_pixbuf_io_init (void)
+ gboolean ret;
+
+ gdk_pixbuf_io_init_builtin ();
++
++ /* Load loaders from GUIX_GDK_PIXBUF_MODULE_FILES. */
++ gchar *guix_module_files_env = g_getenv ("GUIX_GDK_PIXBUF_MODULE_FILES");
++ if (guix_module_files_env) {
++ gchar **guix_module_files = g_strsplit (guix_module_files_env, G_SEARCHPATH_SEPARATOR_S, 0);
++ for (int i = 0; guix_module_files[i] != NULL; i++)
++ gdk_pixbuf_io_init_modules (guix_module_files[i], NULL);
++ g_strfreev (guix_module_files);
++ }
++
+ #ifdef USE_GMODULE
+ module_file = gdk_pixbuf_get_module_file ();
+ #endif

base-commit: 8acd7541b1ba276580d91650bea0b8933e555ca0
--
2.47.1
I
I
iyzsong wrote on 24 Jan 04:30 +0100
[gnome-team 2/2] services: gdm: Set GUIX_GDK_PIXBUF_MODULE_FILES.
(address . 75795@debbugs.gnu.org)(name . ???)(address . iyzsong@member.fsf.org)
e2e4ac64fa4a7b67c8d93963a11871464b45251d.1737689162.git.iyzsong@member.fsf.org
From: ??? <iyzsong@member.fsf.org>

* gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch: Replace
GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES.
* gnu/services/xorg.scm (gdm-shepherd-service): Replace GDK_PIXBUF_MODULE_FILE
with GUIX_GDK_PIXBUF_MODULE_FILES.
---
gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch | 4 ++--
gnu/services/xorg.scm | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

Toggle diff (36 lines)
diff --git a/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch b/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch
index 2c095c8003..5108da33df 100644
--- a/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch
+++ b/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch
@@ -1,6 +1,6 @@
From: Josselin Poiret <dev@jpoiret.xyz>
Date: Tue, 23 Nov 2021 18:39:39 +0000
-Subject: [PATCH] Make GDM pass GDK_PIXBUF_MODULE_FILE to sessions
+Subject: [PATCH] Make GDM pass GUIX_GDK_PIXBUF_MODULE_FILES to sessions
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c
index 932c3e8a..a50dcc8c 100644
--- a/daemon/gdm-launch-environment.c
@@ -9,7 +9,7 @@ index 932c3e8a..a50dcc8c 100644
"WINDOWPATH",
"XCURSOR_PATH",
"XDG_CONFIG_DIRS",
-+ "GDK_PIXBUF_MODULE_FILE",
++ "GUIX_GDK_PIXBUF_MODULE_FILES",
NULL
};
char *system_data_dirs;
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index d3912a7de6..7e179d32b8 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -1293,7 +1293,7 @@ (define (gdm-shepherd-service config)
;; the corresponding line in /etc/profile.
"XCURSOR_PATH=/run/current-system/profile/share/icons"
(string-append
- "GDK_PIXBUF_MODULE_FILE="
+ "GUIX_GDK_PIXBUF_MODULE_FILES="
#$gnome-shell "/" #$%gdk-pixbuf-loaders-cache-file)
(string-append
"GDM_WAYLAND_SESSION="
--
2.47.1
M
M
Maxim Cournoyer wrote on 27 Jan 02:03 +0100
Re: [bug#75795] [gnome-team 1/2] gnu: gdk-pixbuf: Respect GUIX_GDK_PIXBUF_MODULE_FILES search path.
(address . iyzsong@envs.net)
87ikq15aqn.fsf@gmail.com
Hello,

iyzsong@envs.net writes:

Toggle quote (10 lines)
> From: ??? <iyzsong@member.fsf.org>
>
> This fixes <https://issues.guix.gnu.org/75523>.
>
> * gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch:
> New file.
> * gnu/local.mk (dist_patch_DATA): Register patch.
> * gnu/packages/gtk.scm (gdk-pixbuf)[source]: Add patch.
> [native-search-paths]: Replace GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES.

Sounds good.

[...]

Toggle quote (7 lines)
> (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))))

Neat.

Toggle quote (21 lines)
> (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..d47a54bef1> --- /dev/null
> +++ b/gnu/packages/patches/gdk-pixbuf-respect-GUIX_GDK_PIXBUF_MODULE_FILES.patch
> @@ -0,0 +1,21 @@
> +diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
> +index e1df590..214a283 100644
> +--- a/gdk-pixbuf/gdk-pixbuf-io.c
> ++++ b/gdk-pixbuf/gdk-pixbuf-io.c
> +@@ -670,6 +670,16 @@ gdk_pixbuf_io_init (void)
> + gboolean ret;
> +
> + gdk_pixbuf_io_init_builtin ();
> ++
> ++ /* Load loaders from GUIX_GDK_PIXBUF_MODULE_FILES. */
> ++ gchar *guix_module_files_env = g_getenv ("GUIX_GDK_PIXBUF_MODULE_FILES");
> ++ if (guix_module_files_env) {
> ++ gchar **guix_module_files = g_strsplit (guix_module_files_env, G_SEARCHPATH_SEPARATOR_S, 0);

I'd honor the classic max 80 characters width here.

Toggle quote (6 lines)
> ++ for (int i = 0; guix_module_files[i] != NULL; i++)
> ++ gdk_pixbuf_io_init_modules (guix_module_files[i], NULL);
> ++ g_strfreev (guix_module_files);
> ++ }
> ++

The rest looks good to me; but! Could you please submit to upstream the
above but with s/GUIX_GDK_PIXBUF_MODULE_FILES/GDK_PIXBUF_MODULE_FILES/
and link it in the patch via e.g.:

Toggle snippet (3 lines)
Upstream-status: https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/NNN

This way we can track its status there, rebase if needed or respond to
requests for adjustments.

Eventually we'd have gdk-pixbuf honor GDK_PIXBUF_MODULE_FILES natively,
and apply on top of that our patch to have the GUIX_ prefixed variant.

How does that sound?

--
Thanks,
Maxim
I
I
iyzsong wrote on 27 Jan 05:27 +0100
[gnome-team v2 1/2] gnu: gdk-pixbuf: Honor GUIX_GDK_PIXBUF_MODULE_FILES search path.
(address . 75795@debbugs.gnu.org)(name . ???)(address . iyzsong@member.fsf.org)
112469ef967a464b64dd552a70b8af6e19d8766c.1737951075.git.iyzsong@member.fsf.org
From: ??? <iyzsong@member.fsf.org>


* gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Register patch.
* gnu/packages/gtk.scm (gdk-pixbuf)[source]: Add patch.
[native-search-paths]: Replace GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES.

Change-Id: Ibcf6ebf33f5de2c889bc27a88d59a5f444b77906
---
gnu/local.mk | 1 +
gnu/packages/gtk.scm | 8 ++++---
...f-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch | 22 +++++++++++++++++++
3 files changed, 28 insertions(+), 3 deletions(-)
create mode 100644 gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch

Toggle diff (71 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index ca7ff0a89a..56cf534ac3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1398,6 +1398,7 @@ dist_patch_DATA = \
%D%/packages/patches/gd-fix-tests-on-i686.patch \
%D%/packages/patches/gd-brect-bounds.patch \
%D%/packages/patches/gdb-hurd64.patch \
+ %D%/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch \
%D%/packages/patches/gdm-default-session.patch \
%D%/packages/patches/gdm-remove-hardcoded-xwayland-path.patch \
%D%/packages/patches/gdm-wayland-session-wrapper-from-env.patch \
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index fac94e293b..011a1db687 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -725,7 +725,10 @@ (define-public gdk-pixbuf
name "-" version ".tar.xz"))
(sha256
(base32
- "1iz392vrlrnb92hrak697bgndsbkrcxhqxilxn6f99xr8ls5nl5r"))))
+ "1iz392vrlrnb92hrak697bgndsbkrcxhqxilxn6f99xr8ls5nl5r"))
+ (patches
+ (search-patches
+ "gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch"))))
(build-system meson-build-system)
(outputs '("out" "debug"))
(arguments
@@ -779,9 +782,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-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch b/gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch
new file mode 100644
index 0000000000..ff2eadb6c8
--- /dev/null
+++ b/gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch
@@ -0,0 +1,22 @@
+diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
+index e1df590..913ce89 100644
+--- a/gdk-pixbuf/gdk-pixbuf-io.c
++++ b/gdk-pixbuf/gdk-pixbuf-io.c
+@@ -670,6 +670,17 @@ gdk_pixbuf_io_init (void)
+ gboolean ret;
+
+ gdk_pixbuf_io_init_builtin ();
++
++ /* Load modules from GUIX_GDK_PIXBUF_MODULE_FILES. */
++ gchar *module_files_env = g_getenv ("GUIX_GDK_PIXBUF_MODULE_FILES");
++ if (module_files_env) {
++ gchar **module_files = g_strsplit (module_files_env,
++ G_SEARCHPATH_SEPARATOR_S, 0);
++ for (int i = 0; module_files[i] != NULL; i++)
++ gdk_pixbuf_io_init_modules (module_files[i], NULL);
++ g_strfreev (module_files);
++ }
++
+ #ifdef USE_GMODULE
+ module_file = gdk_pixbuf_get_module_file ();
+ #endif

base-commit: 0c2ff81ca3673c93d72c7caf7c5e8f03b385110e
--
2.47.1
I
I
iyzsong wrote on 27 Jan 05:27 +0100
[gnome-team v2 2/2] services: gdm: Set GUIX_GDK_PIXBUF_MODULE_FILES.
(address . 75795@debbugs.gnu.org)(name . ???)(address . iyzsong@member.fsf.org)
c2e7b35088501bd562dda1227f8068e473867522.1737951075.git.iyzsong@member.fsf.org
From: ??? <iyzsong@member.fsf.org>

* gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch: Replace
GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES.
* gnu/services/xorg.scm (gdm-shepherd-service): Replace GDK_PIXBUF_MODULE_FILE
with GUIX_GDK_PIXBUF_MODULE_FILES.
---
gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch | 4 ++--
gnu/services/xorg.scm | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

Toggle diff (36 lines)
diff --git a/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch b/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch
index 2c095c8003..5108da33df 100644
--- a/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch
+++ b/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch
@@ -1,6 +1,6 @@
From: Josselin Poiret <dev@jpoiret.xyz>
Date: Tue, 23 Nov 2021 18:39:39 +0000
-Subject: [PATCH] Make GDM pass GDK_PIXBUF_MODULE_FILE to sessions
+Subject: [PATCH] Make GDM pass GUIX_GDK_PIXBUF_MODULE_FILES to sessions
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c
index 932c3e8a..a50dcc8c 100644
--- a/daemon/gdm-launch-environment.c
@@ -9,7 +9,7 @@ index 932c3e8a..a50dcc8c 100644
"WINDOWPATH",
"XCURSOR_PATH",
"XDG_CONFIG_DIRS",
-+ "GDK_PIXBUF_MODULE_FILE",
++ "GUIX_GDK_PIXBUF_MODULE_FILES",
NULL
};
char *system_data_dirs;
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index d3912a7de6..7e179d32b8 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -1293,7 +1293,7 @@ (define (gdm-shepherd-service config)
;; the corresponding line in /etc/profile.
"XCURSOR_PATH=/run/current-system/profile/share/icons"
(string-append
- "GDK_PIXBUF_MODULE_FILE="
+ "GUIX_GDK_PIXBUF_MODULE_FILES="
#$gnome-shell "/" #$%gdk-pixbuf-loaders-cache-file)
(string-append
"GDM_WAYLAND_SESSION="
--
2.47.1
?
Re: [bug#75795] [gnome-team 1/2] gnu: gdk-pixbuf: Respect GUIX_GDK_PIXBUF_MODULE_FILES search path.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87ikq06fq3.fsf@envs.net
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (16 lines)
> [...]
>
> The rest looks good to me; but! Could you please submit to upstream the
> above but with s/GUIX_GDK_PIXBUF_MODULE_FILES/GDK_PIXBUF_MODULE_FILES/
> and link it in the patch via e.g.:
>
> Upstream-status: https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/NNN
>
> This way we can track its status there, rebase if needed or respond to
> requests for adjustments.
>
> Eventually we'd have gdk-pixbuf honor GDK_PIXBUF_MODULE_FILES natively,
> and apply on top of that our patch to have the GUIX_ prefixed variant.
>
> How does that sound?

Sure, that'll be great.

I had sent an email to request an account there (can't use its web form
due to networking blocking in my country..), will update the patch
later.

Thank you!
M
M
Maxim Cournoyer wrote on 27 Jan 06:02 +0100
Re: bug#75795: [gnome-team 1/2] gnu: gdk-pixbuf: Respect GUIX_GDK_PIXBUF_MODULE_FILES search path.
(address . iyzsong@envs.net)
87y0yw4znx.fsf_-_@gmail.com
iyzsong@envs.net writes:

Toggle quote (7 lines)
> From: ??? <iyzsong@member.fsf.org>
>
> * gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch: Replace
> GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES.
> * gnu/services/xorg.scm (gdm-shepherd-service): Replace GDK_PIXBUF_MODULE_FILE
> with GUIX_GDK_PIXBUF_MODULE_FILES.

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

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 27 Jan 06:10 +0100
(address . iyzsong@envs.net)
87plk84zb3.fsf_-_@gmail.com
Hello,

iyzsong@envs.net writes:

Toggle quote (12 lines)
> From: ??? <iyzsong@member.fsf.org>
>
> This fixes <https://issues.guix.gnu.org/75523>.
>
> * gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch:
> New file.
> * gnu/local.mk (dist_patch_DATA): Register patch.
> * gnu/packages/gtk.scm (gdk-pixbuf)[source]: Add patch.
> [native-search-paths]: Replace GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES.
>
> Change-Id: Ibcf6ebf33f5de2c889bc27a88d59a5f444b77906

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

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 27 Jan 06:11 +0100
(address . iyzsong@envs.net)
87lduw4z8h.fsf_-_@gmail.com
Hi again,

I forgot one comment.

iyzsong@envs.net writes:

Toggle quote (68 lines)
> From: ??? <iyzsong@member.fsf.org>
>
> This fixes <https://issues.guix.gnu.org/75523>.
>
> * gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch:
> New file.
> * gnu/local.mk (dist_patch_DATA): Register patch.
> * gnu/packages/gtk.scm (gdk-pixbuf)[source]: Add patch.
> [native-search-paths]: Replace GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES.
>
> Change-Id: Ibcf6ebf33f5de2c889bc27a88d59a5f444b77906
> ---
> gnu/local.mk | 1 +
> gnu/packages/gtk.scm | 8 ++++---
> ...f-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch | 22 +++++++++++++++++++
> 3 files changed, 28 insertions(+), 3 deletions(-)
> create mode 100644 gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index ca7ff0a89a..56cf534ac3 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1398,6 +1398,7 @@ dist_patch_DATA = \
> %D%/packages/patches/gd-fix-tests-on-i686.patch \
> %D%/packages/patches/gd-brect-bounds.patch \
> %D%/packages/patches/gdb-hurd64.patch \
> + %D%/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch \
> %D%/packages/patches/gdm-default-session.patch \
> %D%/packages/patches/gdm-remove-hardcoded-xwayland-path.patch \
> %D%/packages/patches/gdm-wayland-session-wrapper-from-env.patch \
> diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
> index fac94e293b..011a1db687 100644
> --- a/gnu/packages/gtk.scm
> +++ b/gnu/packages/gtk.scm
> @@ -725,7 +725,10 @@ (define-public gdk-pixbuf
> name "-" version ".tar.xz"))
> (sha256
> (base32
> - "1iz392vrlrnb92hrak697bgndsbkrcxhqxilxn6f99xr8ls5nl5r"))))
> + "1iz392vrlrnb92hrak697bgndsbkrcxhqxilxn6f99xr8ls5nl5r"))
> + (patches
> + (search-patches
> + "gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch"))))
> (build-system meson-build-system)
> (outputs '("out" "debug"))
> (arguments
> @@ -779,9 +782,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-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch b/gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch
> new file mode 100644
> index 0000000000..ff2eadb6c8
> --- /dev/null
> +++ b/gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch
> @@ -0,0 +1,22 @@
> +diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
> +index e1df590..913ce89 100644
> +--- a/gdk-pixbuf/gdk-pixbuf-io.c
> ++++ b/gdk-pixbuf/gdk-pixbuf-io.c

Please add some text at the top of the diff explaining what it does,
perhaps with a

Upstream-status: N/A

tag to denote it's not meant to be forwarded to upstream (as it's Guix-specific).

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 27 Jan 06:12 +0100
(address . iyzsong@envs.net)
87h65k4z86.fsf_-_@gmail.com
iyzsong@envs.net writes:

Toggle quote (7 lines)
> From: ??? <iyzsong@member.fsf.org>
>
> * gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch: Replace
> GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES.
> * gnu/services/xorg.scm (gdm-shepherd-service): Replace GDK_PIXBUF_MODULE_FILE
> with GUIX_GDK_PIXBUF_MODULE_FILES.

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

--
Thanks,
Maxim
I
I
iyzsong wrote on 27 Jan 12:04 +0100
[gnome-team PATCH v3 1/2] gnu: gdk-pixbuf: Honor GUIX_GDK_PIXBUF_MODULE_FILES search path.
(address . 75795@debbugs.gnu.org)(name . ???)(address . iyzsong@member.fsf.org)
f1da66e9f16bf67ceb9127f1c958b3134f74a735.1737975783.git.iyzsong@member.fsf.org
From: ??? <iyzsong@member.fsf.org>


* gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch:
New file.
* gnu/local.mk (dist_patch_DATA): Register patch.
* gnu/packages/gtk.scm (gdk-pixbuf)[source]: Add patch.
[native-search-paths]: Replace GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES.

Change-Id: Ibcf6ebf33f5de2c889bc27a88d59a5f444b77906
---
gnu/local.mk | 1 +
gnu/packages/gtk.scm | 8 +++--
...f-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch | 34 +++++++++++++++++++
3 files changed, 40 insertions(+), 3 deletions(-)
create mode 100644 gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch

Toggle diff (83 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index ca7ff0a89a..56cf534ac3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1398,6 +1398,7 @@ dist_patch_DATA = \
%D%/packages/patches/gd-fix-tests-on-i686.patch \
%D%/packages/patches/gd-brect-bounds.patch \
%D%/packages/patches/gdb-hurd64.patch \
+ %D%/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch \
%D%/packages/patches/gdm-default-session.patch \
%D%/packages/patches/gdm-remove-hardcoded-xwayland-path.patch \
%D%/packages/patches/gdm-wayland-session-wrapper-from-env.patch \
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index fac94e293b..011a1db687 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -725,7 +725,10 @@ (define-public gdk-pixbuf
name "-" version ".tar.xz"))
(sha256
(base32
- "1iz392vrlrnb92hrak697bgndsbkrcxhqxilxn6f99xr8ls5nl5r"))))
+ "1iz392vrlrnb92hrak697bgndsbkrcxhqxilxn6f99xr8ls5nl5r"))
+ (patches
+ (search-patches
+ "gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch"))))
(build-system meson-build-system)
(outputs '("out" "debug"))
(arguments
@@ -779,9 +782,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-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch b/gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch
new file mode 100644
index 0000000000..4e97d3aa5b
--- /dev/null
+++ b/gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch
@@ -0,0 +1,34 @@
+This patch makes gdk-pixbuf look for additional modules in a list of files
+specified by the environment variable "GUIX_GDK_PIXBUF_MODULE_FILES".
+
+A similiar patch for "GDK_PIXBUF_MODULE_FILES" had been sent to upstream:
+ https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/180
+
+We use a "GUIX_" prefixed one to avoid breaking foreign programs:
+ https://issues.guix.gnu.org/63853
+ https://issues.guix.gnu.org/75523
+
+Upstream-status: N/A
+---
+diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
+index e1df590..913ce89 100644
+--- a/gdk-pixbuf/gdk-pixbuf-io.c
++++ b/gdk-pixbuf/gdk-pixbuf-io.c
+@@ -670,6 +670,17 @@ gdk_pixbuf_io_init (void)
+ gboolean ret;
+
+ gdk_pixbuf_io_init_builtin ();
++
++ /* Load modules from GUIX_GDK_PIXBUF_MODULE_FILES. */
++ gchar *module_files_env = g_getenv ("GUIX_GDK_PIXBUF_MODULE_FILES");
++ if (module_files_env) {
++ gchar **module_files = g_strsplit (module_files_env,
++ G_SEARCHPATH_SEPARATOR_S, 0);
++ for (int i = 0; module_files[i] != NULL; i++)
++ gdk_pixbuf_io_init_modules (module_files[i], NULL);
++ g_strfreev (module_files);
++ }
++
+ #ifdef USE_GMODULE
+ module_file = gdk_pixbuf_get_module_file ();
+ #endif

base-commit: 0c2ff81ca3673c93d72c7caf7c5e8f03b385110e
--
2.47.1
I
I
iyzsong wrote on 27 Jan 12:04 +0100
[gnome-team PATCH v3 2/2] services: gdm: Set GUIX_GDK_PIXBUF_MODULE_FILES.
(address . 75795@debbugs.gnu.org)(name . ???)(address . iyzsong@member.fsf.org)
2bcfc68b9210a352d874e29925dd810a17c075ae.1737975783.git.iyzsong@member.fsf.org
From: ??? <iyzsong@member.fsf.org>

* gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch: Replace
GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES.
* gnu/services/xorg.scm (gdm-shepherd-service): Replace GDK_PIXBUF_MODULE_FILE
with GUIX_GDK_PIXBUF_MODULE_FILES.
---
gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch | 4 ++--
gnu/services/xorg.scm | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

Toggle diff (36 lines)
diff --git a/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch b/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch
index 2c095c8003..5108da33df 100644
--- a/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch
+++ b/gnu/packages/patches/gdm-pass-gdk-pixbuf-loader-env.patch
@@ -1,6 +1,6 @@
From: Josselin Poiret <dev@jpoiret.xyz>
Date: Tue, 23 Nov 2021 18:39:39 +0000
-Subject: [PATCH] Make GDM pass GDK_PIXBUF_MODULE_FILE to sessions
+Subject: [PATCH] Make GDM pass GUIX_GDK_PIXBUF_MODULE_FILES to sessions
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c
index 932c3e8a..a50dcc8c 100644
--- a/daemon/gdm-launch-environment.c
@@ -9,7 +9,7 @@ index 932c3e8a..a50dcc8c 100644
"WINDOWPATH",
"XCURSOR_PATH",
"XDG_CONFIG_DIRS",
-+ "GDK_PIXBUF_MODULE_FILE",
++ "GUIX_GDK_PIXBUF_MODULE_FILES",
NULL
};
char *system_data_dirs;
diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm
index d3912a7de6..7e179d32b8 100644
--- a/gnu/services/xorg.scm
+++ b/gnu/services/xorg.scm
@@ -1293,7 +1293,7 @@ (define (gdm-shepherd-service config)
;; the corresponding line in /etc/profile.
"XCURSOR_PATH=/run/current-system/profile/share/icons"
(string-append
- "GDK_PIXBUF_MODULE_FILE="
+ "GUIX_GDK_PIXBUF_MODULE_FILES="
#$gnome-shell "/" #$%gdk-pixbuf-loaders-cache-file)
(string-append
"GDM_WAYLAND_SESSION="
--
2.47.1
?
Re: bug#75795: [gnome-team 1/2] gnu: gdk-pixbuf: Respect GUIX_GDK_PIXBUF_MODULE_FILES search path.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
87zfjc1poe.fsf@envs.net
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (16 lines)
>> [...]
>> --- /dev/null
>> +++ b/gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch
>> @@ -0,0 +1,22 @@
>> +diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
>> +index e1df590..913ce89 100644
>> +--- a/gdk-pixbuf/gdk-pixbuf-io.c
>> ++++ b/gdk-pixbuf/gdk-pixbuf-io.c
>
> Please add some text at the top of the diff explaining what it does,
> perhaps with a
>
> Upstream-status: N/A
>
> tag to denote it's not meant to be forwarded to upstream (as it's Guix-specific).

Thanks. v3 patch just sent to address this.
M
M
Maxim Cournoyer wrote on 27 Jan 13:38 +0100
(address . iyzsong@envs.net)
87y0yw2zzq.fsf_-_@gmail.com
iyzsong@envs.net writes:

Toggle quote (12 lines)
> From: ??? <iyzsong@member.fsf.org>
>
> This fixes <https://issues.guix.gnu.org/75523>.
>
> * gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch:
> New file.
> * gnu/local.mk (dist_patch_DATA): Register patch.
> * gnu/packages/gtk.scm (gdk-pixbuf)[source]: Add patch.
> [native-search-paths]: Replace GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES.
>
> Change-Id: Ibcf6ebf33f5de2c889bc27a88d59a5f444b77906

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

--
Thanks,
Maxim
L
L
Liliana Marie Prikler wrote on 27 Jan 20:06 +0100
Re: [bug#75795] [gnome-team PATCH v3 1/2] gnu: gdk-pixbuf: Honor GUIX_GDK_PIXBUF_MODULE_FILES search path.
42791dead4f912796ec3568cf5bf48aa04731679.camel@gmail.com
Am Montag, dem 27.01.2025 um 19:04 +0800 schrieb iyzsong@envs.net:
Toggle quote (14 lines)
> From: ??? <iyzsong@member.fsf.org>
>
> This fixes <https://issues.guix.gnu.org/75523>.
>
> * gnu/packages/patches/gdk-pixbuf-honor-
> GUIX_GDK_PIXBUF_MODULE_FILES.patch:
> New file.
> * gnu/local.mk (dist_patch_DATA): Register patch.
> * gnu/packages/gtk.scm (gdk-pixbuf)[source]: Add patch.
> [native-search-paths]: Replace GDK_PIXBUF_MODULE_FILE with
> GUIX_GDK_PIXBUF_MODULE_FILES.
>
> Change-Id: Ibcf6ebf33f5de2c889bc27a88d59a5f444b77906
> ---
Reworded slightly and pushed to gnome-team.

Thanks
Closed
S
S
Simon Streit wrote on 28 Jan 21:21 +0100
Re: bug#75795: [gnome-team PATCH v3 1/2] gnu: gdk-pixbuf: Honor GUIX_GDK_PIXBUF_MODULE_FILES search path.
(address . 75795@debbugs.gnu.org)
ygu5xlyofjw.fsf@netpanic.org
Hello,

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (2 lines)
> Reworded slightly and pushed to gnome-team.

I couldn't check out gnome-team, so I applied the patches locally to
master and they work well there. I have icons back again on Debian
Stable. I can't comment on applying Guix System, as I have not done
this yet.


Thank you. Kind regards

--
Simon
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 75795@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 75795
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch