unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: gdk-pixbuf: Make it reproducible.
       [not found] <20170114102117.71ec814d@scratchpost.org>
@ 2017-01-15  1:22 ` Danny Milosavljevic
  2017-01-16 13:44   ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Danny Milosavljevic @ 2017-01-15  1:22 UTC (permalink / raw)
  To: guix-devel, 25414, Ludovic Court=C3=A8s

* gnu/packages/gtk.scm (gdk-pixbuf): Make it reproducible.
---
 gnu/local.mk                                   |  1 +
 gnu/packages/gtk.scm                           |  3 ++-
 gnu/packages/patches/gdk-pixbuf-list-dir.patch | 29 ++++++++++++++++++++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/gdk-pixbuf-list-dir.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index d37887237..05e6d653f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -567,6 +567,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gcc-6-arm-none-eabi-multilib.patch	\
   %D%/packages/patches/gcc-6-cross-environment-variables.patch	\
   %D%/packages/patches/gcj-arm-mode.patch			\
+  %D%/packages/patches/gdk-pixbuf-list-dir.patch		\
   %D%/packages/patches/gd-CVE-2016-7568.patch			\
   %D%/packages/patches/gd-CVE-2016-8670.patch			\
   %D%/packages/patches/gd-fix-chunk-size-on-boundaries.patch	\
diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index b2882b5e9..c4c441f4c 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -434,7 +434,8 @@ highlighting and other features typical of a source code editor.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "0yc8indbl3hf18z6x6kjg59xp9sngm1d8vmz4c7bs6g27qw5npnm"))))
+              "0yc8indbl3hf18z6x6kjg59xp9sngm1d8vmz4c7bs6g27qw5npnm"))
+            (patches (search-patches "gdk-pixbuf-list-dir.patch"))))
    (build-system gnu-build-system)
    (arguments
     '(#:configure-flags '("--with-x11")
diff --git a/gnu/packages/patches/gdk-pixbuf-list-dir.patch b/gnu/packages/patches/gdk-pixbuf-list-dir.patch
new file mode 100644
index 000000000..d1427cc38
--- /dev/null
+++ b/gnu/packages/patches/gdk-pixbuf-list-dir.patch
@@ -0,0 +1,29 @@
+--- gdk-pixbuf-2.34.0/gdk-pixbuf/queryloaders.c.orig      2017-01-11 00:17:32.865843062 +0100
++++ gdk-pixbuf-2.34.0/gdk-pixbuf/queryloaders.c   2017-01-11 00:31:29.428372177 +0100
+@@ -354,16 +354,25 @@
+ 
+                 dir = g_dir_open (path, 0, NULL);
+                 if (dir) {
++                        GList *entries = NULL;
+                         const char *dent;
+ 
+                         while ((dent = g_dir_read_name (dir))) {
+                                 gint len = strlen (dent);
+                                 if (len > SOEXT_LEN &&
+                                     strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) {
+-                                        query_module (contents, path, dent);
++                                        entries = g_list_append (entries, g_strdup (dent));
+                                 }
+                         }
+                         g_dir_close (dir);
++                        entries = g_list_sort (entries, strcmp);
++                        GList *xentries;
++                        for (xentries = entries; xentries; xentries = g_list_next (xentries)) {
++                                dent = xentries->data;
++                                query_module (contents, path, dent);
++                                g_free (xentries->data);
++                        }
++                        g_list_free (entries);
+                 }
+ #else
+                 g_string_append_printf (contents, "# dynamic loading of modules not supported\n");

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: gdk-pixbuf: Make it reproducible.
  2017-01-15  1:22 ` [PATCH] gnu: gdk-pixbuf: Make it reproducible Danny Milosavljevic
@ 2017-01-16 13:44   ` Ludovic Courtès
  2017-01-16 15:48     ` bug#25414: " Danny Milosavljevic
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2017-01-16 13:44 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel, 25414

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> * gnu/packages/gtk.scm (gdk-pixbuf): Make it reproducible.

Rather:

  Fixes <http://bugs.gnu.org/25414>.

  * gnu/packages/gtk.scm (gdk-pixbuf)[source](patches): New field.

> diff --git a/gnu/packages/patches/gdk-pixbuf-list-dir.patch b/gnu/packages/patches/gdk-pixbuf-list-dir.patch
> new file mode 100644
> index 000000000..d1427cc38
> --- /dev/null
> +++ b/gnu/packages/patches/gdk-pixbuf-list-dir.patch

Please add a one-line comment, like:

  Sort directory entries so that the output of
  ‘gdk-pixbuf-query-loaders’ is deterministic.

OK with these changes for a new ‘staging’ branch!

Also, it would be nice if you could report it upstream and add the
reference in the .patch file.

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#25414: [PATCH] gnu: gdk-pixbuf: Make it reproducible.
  2017-01-16 13:44   ` Ludovic Courtès
@ 2017-01-16 15:48     ` Danny Milosavljevic
  0 siblings, 0 replies; 3+ messages in thread
From: Danny Milosavljevic @ 2017-01-16 15:48 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel, 25414

> OK with these changes for a new ‘staging’ branch!

Done.

> Also, it would be nice if you could report it upstream and add the
> reference in the .patch file.

Also done.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-01-16 15:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20170114102117.71ec814d@scratchpost.org>
2017-01-15  1:22 ` [PATCH] gnu: gdk-pixbuf: Make it reproducible Danny Milosavljevic
2017-01-16 13:44   ` Ludovic Courtès
2017-01-16 15:48     ` bug#25414: " Danny Milosavljevic

Code repositories for project(s) associated with this public inbox

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

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