all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#25414: gdk-pixbuf@2.34.0 does not build deterministically
@ 2017-01-10 23:06 Ludovic Courtès
  2017-01-10 23:33 ` Danny Milosavljevic
  2017-06-05  4:53 ` Danny Milosavljevic
  0 siblings, 2 replies; 13+ messages in thread
From: Ludovic Courtès @ 2017-01-10 23:06 UTC (permalink / raw)
  To: 25414

--8<---------------cut here---------------start------------->8---
ludo@ribbon ~/src/guix$ ./pre-inst-env  guix challenge gdk-pixbuf --substitute-urls="https://mirror.hydra.gnu.org https://bayfront.guixsd.org"
updating list of substitutes from 'https://mirror.hydra.gnu.org'... 100.0%
updating list of substitutes from 'https://bayfront.guixsd.org'... 100.0%
guix challenge: warning: no local build for '/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0'
/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0 contents differ:
guix challenge: warning: no local build for '/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0'
  https://mirror.hydra.gnu.org/nar/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0: 1dw8mpw2i5fvvcxsc24dzqqjw43b1rgy2k25ad3z0iahdpq62sdh
  https://bayfront.guixsd.org/nar/gzip/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0: 0h4ff59hjn0libzzm1gvgk0zd0z5r834hfg5n0r61z5m6l6z0x40
ludo@ribbon ~/src/guix$ wget -q -O -  https://mirror.hydra.gnu.org/nar/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0 | bunzip2 | guix archive -x /tmp/one
ludo@ribbon ~/src/guix$ wget -q -O - https://bayfront.guixsd.org/nar/gzip/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0| gunzip | guix archive -x /tmp/two
ludo@ribbon ~/src/guix$ diff -ur /tmp/{one,two}
diff -ur /tmp/one/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache /tmp/two/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
--- /tmp/one/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache	2017-01-11 00:01:02.297133246 +0100
+++ /tmp/two/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache	2017-01-11 00:01:21.092971961 +0100
@@ -4,24 +4,11 @@
 #
 # LoaderDir = /gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders
 #
-"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.so"
-"jpeg" 5 "gdk-pixbuf" "JPEG" "LGPL"
-"image/jpeg" ""
-"jpeg" "jpe" "jpg" ""
-"\377\330" "" 100
-
-"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-icns.so"
-"icns" 4 "gdk-pixbuf" "MacOS X icon" "GPL"
-"image/x-icns" ""
-"icns" ""
-"icns" "" 100
-
-"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-qtif.so"
-"qtif" 4 "gdk-pixbuf" "QuickTime" "LGPL"
-"image/x-quicktime" "image/qtif" ""
-"qtif" "qif" ""
-"abcdidsc" "xxxx    " 100
-"abcdidat" "xxxx    " 100
+"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ani.so"
+"ani" 4 "gdk-pixbuf" "Windows animated cursor" "LGPL"
+"application/x-navi-animation" ""
+"ani" ""
+"RIFF    ACON" "    xxxx    " 100
 
 "/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gif.so"
 "gif" 4 "gdk-pixbuf" "GIF" "LGPL"
@@ -29,6 +16,38 @@
 "gif" ""
 "GIF8" "" 100
 
+"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ico.so"
+"ico" 5 "gdk-pixbuf" "Windows icon" "LGPL"
+"image/x-icon" "image/x-ico" "image/x-win-bitmap" "image/vnd.microsoft.icon" "application/ico" "image/ico" "image/icon" "text/ico" ""
+"ico" "cur" ""
+"  \001   " "zz znz" 100
+"  \002   " "zz znz" 100
+
+"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-tiff.so"
+"tiff" 5 "gdk-pixbuf" "TIFF" "LGPL"
+"image/tiff" ""
+"tiff" "tif" ""
+"MM *" "  z " 100
+"II* " "   z" 100
+"II* \020   CR\002 " "   z zzz   z" 0
+
+"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-pnm.so"
+"pnm" 4 "gdk-pixbuf" "PNM/PBM/PGM/PPM" "LGPL"
+"image/x-portable-anymap" "image/x-portable-bitmap" "image/x-portable-graymap" "image/x-portable-pixmap" ""
+"pnm" "pbm" "pgm" "ppm" ""
+"P1" "" 100
+"P2" "" 100
+"P3" "" 100
+"P4" "" 100
+"P5" "" 100
+"P6" "" 100
+
+"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-bmp.so"
+"bmp" 5 "gdk-pixbuf" "BMP" "LGPL"
+"image/bmp" "image/x-bmp" "image/x-MS-bmp" ""
+"bmp" ""
+"BM" "" 100
+
 "/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xbm.so"
 "xbm" 4 "gdk-pixbuf" "XBM" "LGPL"
 "image/x-xbitmap" ""
@@ -36,11 +55,24 @@
 "#define " "" 100
 "/*" "" 50
 
-"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-bmp.so"
-"bmp" 5 "gdk-pixbuf" "BMP" "LGPL"
-"image/bmp" "image/x-bmp" "image/x-MS-bmp" ""
-"bmp" ""
-"BM" "" 100
+"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.so"
+"jpeg" 5 "gdk-pixbuf" "JPEG" "LGPL"
+"image/jpeg" ""
+"jpeg" "jpe" "jpg" ""
+"\377\330" "" 100
+
+"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-qtif.so"
+"qtif" 4 "gdk-pixbuf" "QuickTime" "LGPL"
+"image/x-quicktime" "image/qtif" ""
+"qtif" "qif" ""
+"abcdidsc" "xxxx    " 100
+"abcdidat" "xxxx    " 100
+
+"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-icns.so"
+"icns" 4 "gdk-pixbuf" "MacOS X icon" "GPL"
+"image/x-icns" ""
+"icns" ""
+"icns" "" 100
 
 "/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so"
 "xpm" 4 "gdk-pixbuf" "XPM" "LGPL"
@@ -48,20 +80,6 @@
 "xpm" ""
 "/* XPM */" "" 100
 
-"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ani.so"
-"ani" 4 "gdk-pixbuf" "Windows animated cursor" "LGPL"
-"application/x-navi-animation" ""
-"ani" ""
-"RIFF    ACON" "    xxxx    " 100
-
-"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-tiff.so"
-"tiff" 5 "gdk-pixbuf" "TIFF" "LGPL"
-"image/tiff" ""
-"tiff" "tif" ""
-"MM *" "  z " 100
-"II* " "   z" 100
-"II* \020   CR\002 " "   z zzz   z" 0
-
 "/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so"
 "png" 5 "gdk-pixbuf" "PNG" "LGPL"
 "image/png" ""
@@ -79,22 +97,4 @@
 "  \n" "xz " 100
 "  \v" "xz " 100
 
-"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ico.so"
-"ico" 5 "gdk-pixbuf" "Windows icon" "LGPL"
-"image/x-icon" "image/x-ico" "image/x-win-bitmap" "image/vnd.microsoft.icon" "application/ico" "image/ico" "image/icon" "text/ico" ""
-"ico" "cur" ""
-"  \001   " "zz znz" 100
-"  \002   " "zz znz" 100
-
-"/gnu/store/m4ccn9nzlsbvlj36w45555pq98spy007-gdk-pixbuf-2.34.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-pnm.so"
-"pnm" 4 "gdk-pixbuf" "PNM/PBM/PGM/PPM" "LGPL"
-"image/x-portable-anymap" "image/x-portable-bitmap" "image/x-portable-graymap" "image/x-portable-pixmap" ""
-"pnm" "pbm" "pgm" "ppm" ""
-"P1" "" 100
-"P2" "" 100
-"P3" "" 100
-"P4" "" 100
-"P5" "" 100
-"P6" "" 100
-
--8<---------------cut here---------------end--------------->8---

Presumably ‘gdk-pixbuf-query-loaders’, which generates ‘loaders.cache’,
does not sort the entries returned by readdir(2).

Ludo’.

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

* bug#25414: gdk-pixbuf@2.34.0 does not build deterministically
  2017-01-10 23:06 bug#25414: gdk-pixbuf@2.34.0 does not build deterministically Ludovic Courtès
@ 2017-01-10 23:33 ` Danny Milosavljevic
  2017-01-11 21:16   ` Ludovic Courtès
  2017-06-05  4:53 ` Danny Milosavljevic
  1 sibling, 1 reply; 13+ messages in thread
From: Danny Milosavljevic @ 2017-01-10 23:33 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 25414

On Wed, 11 Jan 2017 00:06:42 +0100
ludo@gnu.org (Ludovic Courtès) wrote:

> Presumably ‘gdk-pixbuf-query-loaders’, which generates ‘loaders.cache’,
> does not sort the entries returned by readdir(2).

Yep.

gdk-pixbuf/queryloaders.c line 355 uses g_dir_open.

Docs: https://developer.gnome.org/glib/stable/glib-File-Utilities.html#g-dir-open "Note that the ordering is not defined."

One could use g_list_append to append it to a list and then g_list_sort and then g_list_free. Like below (untested! Seriously!):

--- gdk-pixbuf/queryloaders.c.orig      2017-01-11 00:17:32.865843062 +0100
+++ 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	[flat|nested] 13+ messages in thread

* bug#25414: gdk-pixbuf@2.34.0 does not build deterministically
  2017-01-10 23:33 ` Danny Milosavljevic
@ 2017-01-11 21:16   ` Ludovic Courtès
  2017-01-11 22:13     ` Danny Milosavljevic
  0 siblings, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2017-01-11 21:16 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 25414

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> On Wed, 11 Jan 2017 00:06:42 +0100
> ludo@gnu.org (Ludovic Courtès) wrote:
>
>> Presumably ‘gdk-pixbuf-query-loaders’, which generates ‘loaders.cache’,
>> does not sort the entries returned by readdir(2).
>
> Yep.
>
> gdk-pixbuf/queryloaders.c line 355 uses g_dir_open.
>
> Docs: https://developer.gnome.org/glib/stable/glib-File-Utilities.html#g-dir-open "Note that the ordering is not defined."
>
> One could use g_list_append to append it to a list and then g_list_sort and then g_list_free. Like below (untested! Seriously!):

Sounds like the right approach, would you like to test it?  :-)

Ludo’.

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

* bug#25414: gdk-pixbuf@2.34.0 does not build deterministically
  2017-01-11 21:16   ` Ludovic Courtès
@ 2017-01-11 22:13     ` Danny Milosavljevic
  2017-01-12 13:14       ` Ludovic Courtès
  0 siblings, 1 reply; 13+ messages in thread
From: Danny Milosavljevic @ 2017-01-11 22:13 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 25414

Hi Ludo,

> Sounds like the right approach, would you like to test it?  :-)

In principle yes, but even without the patch I get (using current master):

$ ./pre-inst-env  guix challenge gdk-pixbuf --substitute-urls="https://mirror.hydra.gnu.org https://bayfront.guixsd.org"
...

Backtrace:
In unknown file:
   ?: 19 [apply-smob/1 #<catch-closure 233fde0>]
In ice-9/boot-9.scm:
  66: 18 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 17 [eval # #]
In ice-9/boot-9.scm:
2404: 16 [save-module-excursion #<procedure 235f900 at ice-9/boot-9.scm:4051:3 ()>]
4056: 15 [#<procedure 235f900 at ice-9/boot-9.scm:4051:3 ()>]
1727: 14 [%start-stack load-stack ...]
1732: 13 [#<procedure 2373b10 ()>]
In unknown file:
   ?: 12 [primitive-load "/x/home/dannym/src/guix-master/guix/scripts/guix"]
In guix/ui.scm:
1228: 11 [run-guix-command challenge "gdk-pixbuf" ...]
In ice-9/boot-9.scm:
 160: 10 [catch srfi-34 #<procedure 2a91220 at guix/ui.scm:432:2 ()> ...]
 160: 9 [catch system-error ...]
 160: 8 [catch system-error ...]
In guix/scripts/challenge.scm:
 238: 7 [#<procedure 2af1390 at guix/scripts/challenge.scm:224:6 ()>]
In guix/store.scm:
1223: 6 [run-with-store # ...]
In guix/scripts/challenge.scm:
 239: 5 [#<procedure 757dcf0 at guix/scripts/challenge.scm:239:15 (state)> #]
 123: 4 [#<procedure 88effc0 at guix/scripts/challenge.scm:123:2 (state)> #]
In srfi/srfi-1.scm:
 643: 3 [append-map #<procedure 74335a0 at guix/scripts/challenge.scm:125:46 (t-1367901)> ...]
 575: 2 [map #<procedure 74335a0 at guix/scripts/challenge.scm:125:46 (t-1367901)> ...]
In guix/scripts/substitute.scm:
 687: 1 [lookup-narinfos "\"https://mirror.hydra.gnu.org" #]
 659: 0 [fetch-narinfos "\"https://mirror.hydra.gnu.org" #]

guix/scripts/substitute.scm:659:16: In procedure fetch-narinfos:
guix/scripts/substitute.scm:659:16: In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): #f

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

* bug#25414: gdk-pixbuf@2.34.0 does not build deterministically
  2017-01-11 22:13     ` Danny Milosavljevic
@ 2017-01-12 13:14       ` Ludovic Courtès
  2017-01-14  9:21         ` Danny Milosavljevic
  0 siblings, 1 reply; 13+ messages in thread
From: Ludovic Courtès @ 2017-01-12 13:14 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 25414

Hi Danny,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

>> Sounds like the right approach, would you like to test it?  :-)
>
> In principle yes,

I mean, can you apply the patch and build it with:

  guix build gdk-pixbuf --rounds=2 -K

?

> but even without the patch I get (using current master):
>
> $ ./pre-inst-env  guix challenge gdk-pixbuf --substitute-urls="https://mirror.hydra.gnu.org https://bayfront.guixsd.org"

[...]

>  575: 2 [map #<procedure 74335a0 at guix/scripts/challenge.scm:125:46 (t-1367901)> ...]
> In guix/scripts/substitute.scm:
>  687: 1 [lookup-narinfos "\"https://mirror.hydra.gnu.org" #]
>  659: 0 [fetch-narinfos "\"https://mirror.hydra.gnu.org" #]
>
> guix/scripts/substitute.scm:659:16: In procedure fetch-narinfos:
> guix/scripts/substitute.scm:659:16: In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): #f

Hmm hmm!  Is it reproducible (it works for me)?  If so, could you try to
see where the problem comes from by adding ‘pk’ calls like this:

--8<---------------cut here---------------start------------->8---
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 524b019a3..26ed81318 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -657,10 +657,10 @@ if file doesn't exist, and the narinfo otherwise."
 
   (let-values (((cache-info port)
                 (download-cache-info url)))
-    (and cache-info
+    (and (pk 'cache-info cache-info)
          (if (string=? (cache-info-store-directory cache-info)
                        (%store-prefix))
-             (do-fetch (string->uri url) port)    ;reuse PORT
+             (do-fetch (pk 'uri (string->uri url)) port)  ;reuse PORT
              (begin
                (warning (_ "'~a' uses different store '~a'; ignoring it~%")
                         url (cache-info-store-directory cache-info))
--8<---------------cut here---------------end--------------->8---

Thanks,
Ludo’.

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

* bug#25414: gdk-pixbuf@2.34.0 does not build deterministically
  2017-01-12 13:14       ` Ludovic Courtès
@ 2017-01-14  9:21         ` Danny Milosavljevic
  2017-01-15  1:22           ` [PATCH] gnu: gdk-pixbuf: Make it reproducible Danny Milosavljevic
  2017-01-15  1:22           ` Danny Milosavljevic
  0 siblings, 2 replies; 13+ messages in thread
From: Danny Milosavljevic @ 2017-01-14  9:21 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 25414

Hi Ludo,

On Thu, 12 Jan 2017 14:14:59 +0100
ludo@gnu.org (Ludovic Courtès) wrote:

>   guix build gdk-pixbuf --rounds=2 -K

I added the patch and now I get:

$ ./pre-inst-env guix build gdk-pixbuf --rounds=2 -K
/gnu/store/m06fjrx641hbs786m5ysr3j41siqh8bn-gdk-pixbuf-2.36.3

> > guix/scripts/substitute.scm:659:16: In procedure fetch-narinfos:
> > guix/scripts/substitute.scm:659:16: In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): #f  
> 
> Hmm hmm!  Is it reproducible (it works for me)?  If so, could you try to
> see where the problem comes from by adding ‘pk’ calls like this:

I'll try again with latest master (building...). If it still happens I'll try "pk". Thanks!

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

* bug#25414: [PATCH] gnu: gdk-pixbuf: Make it reproducible.
  2017-01-14  9:21         ` Danny Milosavljevic
  2017-01-15  1:22           ` [PATCH] gnu: gdk-pixbuf: Make it reproducible Danny Milosavljevic
@ 2017-01-15  1:22           ` Danny Milosavljevic
  1 sibling, 0 replies; 13+ messages in thread
From: Danny Milosavljevic @ 2017-01-15  1:22 UTC (permalink / raw)
  To: guix-devel, 25414, Ludovic Courtès

* 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] 13+ messages in thread

* [PATCH] gnu: gdk-pixbuf: Make it reproducible.
  2017-01-14  9:21         ` Danny Milosavljevic
@ 2017-01-15  1:22           ` Danny Milosavljevic
  2017-01-16 13:44             ` bug#25414: " Ludovic Courtès
  2017-01-16 13:44             ` Ludovic Courtès
  2017-01-15  1:22           ` Danny Milosavljevic
  1 sibling, 2 replies; 13+ 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] 13+ messages in thread

* bug#25414: [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 13:44             ` Ludovic Courtès
  1 sibling, 0 replies; 13+ 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] 13+ 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             ` bug#25414: " Ludovic Courtès
@ 2017-01-16 13:44             ` Ludovic Courtès
  2017-01-16 15:48               ` bug#25414: " Danny Milosavljevic
  1 sibling, 1 reply; 13+ 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] 13+ 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; 13+ 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] 13+ messages in thread

* bug#25414: [PATCH] gnu: gdk-pixbuf: Make it reproducible.
  2017-01-10 23:06 bug#25414: gdk-pixbuf@2.34.0 does not build deterministically Ludovic Courtès
  2017-01-10 23:33 ` Danny Milosavljevic
@ 2017-06-05  4:53 ` Danny Milosavljevic
  2017-06-05 20:43   ` Ludovic Courtès
  1 sibling, 1 reply; 13+ messages in thread
From: Danny Milosavljevic @ 2017-06-05  4:53 UTC (permalink / raw)
  To: 25414

Note: Bug report is at <https://bugzilla.gnome.org/show_bug.cgi?id=777332>.

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

* bug#25414: [PATCH] gnu: gdk-pixbuf: Make it reproducible.
  2017-06-05  4:53 ` Danny Milosavljevic
@ 2017-06-05 20:43   ` Ludovic Courtès
  0 siblings, 0 replies; 13+ messages in thread
From: Ludovic Courtès @ 2017-06-05 20:43 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 25414-done

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> Note: Bug report is at <https://bugzilla.gnome.org/show_bug.cgi?id=777332>.

Awesome.

BTW, the patch was committed in Guix in commit
8c6b077bfae3c257ad7b9967f63428f8504d61f0 so we can definitely close it
now.

Thank you!

Ludo’.

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

end of thread, other threads:[~2017-06-05 20:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-10 23:06 bug#25414: gdk-pixbuf@2.34.0 does not build deterministically Ludovic Courtès
2017-01-10 23:33 ` Danny Milosavljevic
2017-01-11 21:16   ` Ludovic Courtès
2017-01-11 22:13     ` Danny Milosavljevic
2017-01-12 13:14       ` Ludovic Courtès
2017-01-14  9:21         ` Danny Milosavljevic
2017-01-15  1:22           ` [PATCH] gnu: gdk-pixbuf: Make it reproducible Danny Milosavljevic
2017-01-16 13:44             ` bug#25414: " Ludovic Courtès
2017-01-16 13:44             ` Ludovic Courtès
2017-01-16 15:48               ` bug#25414: " Danny Milosavljevic
2017-01-15  1:22           ` Danny Milosavljevic
2017-06-05  4:53 ` Danny Milosavljevic
2017-06-05 20:43   ` Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.