guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: gdk-pixbuf: Make it reproducible.


From: Danny Milosavljevic
Subject: 01/01: gnu: gdk-pixbuf: Make it reproducible.
Date: Mon, 16 Jan 2017 15:40:43 +0000 (UTC)

dannym pushed a commit to branch staging
in repository guix.

commit 8c6b077bfae3c257ad7b9967f63428f8504d61f0
Author: Danny Milosavljevic <address@hidden>
Date:   Mon Jan 16 16:27:51 2017 +0100

    gnu: gdk-pixbuf: Make it reproducible.
    
    Fixes <http://bugs.gnu.org/25414>.
    
    * gnu/packages/gtk.scm (gdk-pixbuf)[source](patches): New field.
---
 gnu/local.mk                                   |    1 +
 gnu/packages/gtk.scm                           |    3 +-
 gnu/packages/patches/gdk-pixbuf-list-dir.patch |   35 ++++++++++++++++++++++++
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 7e816f7..34c4587 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -568,6 +568,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 a506949..8f9d5f4 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -433,7 +433,8 @@ highlighting and other features typical of a source code 
editor.")
                                 name "-" version ".tar.xz"))
             (sha256
              (base32
-              "1v1rssjd8p5s3lymsfhiq5mbs2pc0h1r6jd0asrwdbrign7i68sj"))))
+              "1v1rssjd8p5s3lymsfhiq5mbs2pc0h1r6jd0asrwdbrign7i68sj"))
+            (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 0000000..137914a
--- /dev/null
+++ b/gnu/packages/patches/gdk-pixbuf-list-dir.patch
@@ -0,0 +1,35 @@
+Sort directory entries so that the output of
+‘gdk-pixbuf-query-loaders’ is deterministic.
+
+See: https://bugzilla.gnome.org/show_bug.cgi?id=777332
+--- 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-16 
16:12:03.420667874 +0100
+@@ -354,16 +354,27 @@
+ 
+                 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);
++                        /* Sort directory entries so that the output of
++                           ‘gdk-pixbuf-query-loaders’ is deterministic. */
++                        entries = g_list_sort (entries, (GCompareFunc) 
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");



reply via email to

[Prev in Thread] Current Thread [Next in Thread]