Update GTK+ related packages.
authorWerner Koch <wk@gnupg.org>
Tue, 30 Apr 2013 09:19:20 +0000 (11:19 +0200)
committerWerner Koch <wk@gnupg.org>
Tue, 30 Apr 2013 09:26:45 +0000 (11:26 +0200)
* packages/packages.current: Update glib, gdk_pixbuf, gtk+, libffi and
check all other packages for necessary updates.
* patches/glib-2.34.3/01-socket.patch: Copy from 2.24.0.
* patches/glib-2.34.3/02-no-kill.patch: New.
* Makefile.am (EXTRA_DIST): Add new patches.
* src/Makefile.am (gpg4win_pkg_glib_configure): Add
option --disable-modular-tests.
* src/inst-libffi.nsi: Update SO-name from 5 to 6.
* src/uninst-libffi.nsi: Ditto.  Remove unneeded top dir rmdir.
--

The update of glib from 2.32 to 2.34 is due to a changed requirement
in gdk_pixbuf 2.26.5 (which has been updated from 2.26.0).

Note that the GPA crashes in the latest beta are due to the missing
01-socket.patch.  I simply forgot to copy it to the newer gtk version.
We should tell the GTK folks to include our patches.

Makefile.am
packages/packages.current
patches/glib-2.34.3/01-socket.patch [new file with mode: 0755]
patches/glib-2.34.3/02-no-kill.patch [new file with mode: 0755]
src/Makefile.am
src/inst-libffi.nsi
src/uninst-libffi.nsi

index 2b7a2c3..9ac9603 100644 (file)
@@ -31,6 +31,8 @@ EXTRA_DIST = autogen.sh README.GIT ONEWS \
         patches/glib-2.12.12/03-gspawn-w32-fixup.patch \
         patches/glib-2.20.0/01-socket.patch \
         patches/glib-2.24.0/01-socket.patch \
+        patches/glib-2.34.3/01-socket.patch \
+        patches/glib-2.34.3/02-no-kill.patch \
         patches/libxml2-2.7.8/01-cve-2012-5134 \
        patches/gpgme/01-gpg2.patch \
        patches/gpgme-1.1.7/01-registry.patch \
index 37a3599..03f8d47 100644 (file)
@@ -80,7 +80,9 @@ server http://curl.haxx.se/download
 
 # checked: 2012-03-28 wk - updated
 #          2012-12-07 wk - add patch for CVE-2012-5135
+#          2013-04-29 wk - checked.
 server ftp://xmlsoft.org/libxml2
+
 file   libxml2-2.7.8.tar.gz
 chk    859dd535edbb851cc15b64740ee06551a7a17d40
 
@@ -158,25 +160,38 @@ server http://www.claws-mail.org/win32
 #
 server ftp://sources.redhat.com/pub
 
-# checked: 2012-03-28 wk
+# checked: 2013-04-29 wk - There is a 2.9.1 but the release notes
+#                          don't tell anything about security critical
+#                          bugs.  Thus we stay with 2.8.0 for now.
 file pthreads-win32/pthreads-w32-2-8-0-release.tar.gz
 chk  da8371cb20e8e238f96a1d0651212f154d84a9ac
 
 #
 # GLIB
 #
-server http://ftp.gnome.org/pub/gnome/sources/glib/2.32
+# The GTK boyz seem to think that sha256sum files on the server
+# magically get them a lot of additional security karma.
+#
+#   And it's plain to see
+#   You were meant for me
+#   Yeah I'm your .sig
+#   Your 21th Century sig
+#   21th Century sig, I wanna be your file
+#
+server http://ftp.gnome.org/pub/gnome/sources/glib/2.34
 
-file glib-2.32.0.tar.xz
-chk  c4f9b6feb76b1b2364d6132fc55599d928622f0a
+# checked: 2013-04-30 wk
+file glib-2.34.3.tar.xz
+chk  f2b94ca757191dddba686e54b32b3dfc5ad5d8fb
 
 #
 # GDK-PIXBUF
 #
 server http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.26/
 
-file gdk-pixbuf-2.26.0.tar.xz
-chk  68ed80de9404bb47a5a29526bf4a8127bb8ddbae
+# checked: 2013-04-29 wk
+file gdk-pixbuf-2.26.5.tar.xz
+chk  94f30c417441404dcbe23206dda91730074f9b7d
 
 
 #
@@ -184,15 +199,18 @@ chk  68ed80de9404bb47a5a29526bf4a8127bb8ddbae
 #
 server http://ftp.gnome.org/pub/gnome/sources/atk/1.32
 
+# checked: 2013-04-29 wk (1.32.0 still the latest in 1.32)
 file atk-1.32.0.tar.bz2
 chk  876e88e4259d07bb7905d66c085a50a47e37f9e4
 
 server http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.32
 
+# checked: 2013-04-29 wk
 name atk-1.32.0.zip
 file atk_1.32.0-2_win32.zip
 chk  3c31c9d6b19af840e2bd8ccbfef4072a6548dc4e
 
+# checked: 2013-04-29 wk
 name atk-dev-1.32.0.zip
 file atk-dev_1.32.0-2_win32.zip
 chk  d0b8c53e01e4541d3d3befc82e41fb5b84949030
@@ -202,6 +220,9 @@ chk  d0b8c53e01e4541d3d3befc82e41fb5b84949030
 #
 server http://ftp.gnome.org/pub/gnome/sources/pango/1.29
 
+# fixme: 2013-04-29 wk - There is a 1.29.5 but no 1.29.5 binaries
+#                        What shall we do:  Update to 1.32?  There are no
+#                        1.32 binaries either.
 file pango-1.29.4.tar.bz2
 chk  3b4dfe317b328061893cf0728afebe292bbcc05b
 
@@ -221,11 +242,13 @@ chk  49ae12458f2e29c27ed9d1390d95db18fd4a49ac
 #
 server http://cairographics.org/releases
 
+# checked: 2013-04-29 wk - 1.10.2 is the latest in the 1.10 series.
 file cairo-1.10.2.tar.gz
 chk  ccce5ae03f99c505db97c286a0c9a90a926d3c6e
 
 server http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies
 
+# checked: 2013-04-29 wk
 name cairo-1.10.2.zip
 file cairo_1.10.2-2_win32.zip
 chk  d44cd66a9f4d7d29a8f2c28d1c1c5f9b0525ba44
@@ -233,6 +256,7 @@ name cairo-dev-1.10.2.zip
 file cairo-dev_1.10.2-2_win32.zip
 chk  45cae1fac45a6c6f33498c37c0cdc47722614d92
 
+# checked: 2013-04-29 wk
 file freetype-2.4.2.tar.bz2
 chk  cc257ceda2950b8c80950d780ccf3ce665a815d1
 name freetype-2.4.2.zip
@@ -244,11 +268,13 @@ chk  00e877d7ec7c416e2b48a392324a5502019a20bf
 
 server http://www.fontconfig.org/release
 
+# checked: 2013-04-29 wk - 2.8.0 still the latest in 2.8
 file fontconfig-2.8.0.tar.gz
 chk  570fb55eb14f2c92a7b470b941e9d35dbfafa716
 
 server http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies
 
+# checked: 2013-04-29 wk
 name fontconfig-2.8.0.zip
 file fontconfig_2.8.0-2_win32.zip
 chk  37a3117ea6cc50c8a88fba9b6018f35a04fa71ce
@@ -256,13 +282,15 @@ name fontconfig-dev-2.8.0.zip
 file fontconfig-dev_2.8.0-2_win32.zip
 chk  0b772aaeb0a7a0d5de21afd901d6cf00753efa51
 
-
 server ftp://ftp.g10code.com/g10code/misc
+
+# checked: 2013-04-29 wk - 2.0.1 still the latest in 2.0
 file expat-2.0.1.tar.gz
 chk  663548c37b996082db1f2f2c32af060d7aa15c2d
 
 server http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies
 
+# checked: 2013-04-29 wk
 name expat-2.0.1.zip
 file expat_2.0.1-1_win32.zip
 chk  f47790b9e324cd8613acc9a17fd56bf2c14745fc
@@ -276,8 +304,9 @@ chk  2e9189c6c6d1dac847a47c537c7a5e9dffd91992
 #
 server http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24
 
-file gtk+-2.24.10.tar.xz
-chk  baf5c73e186352cad767392a6b55840be0326ddc
+# checked: 2013-04-29 wk - updated from 2.24.10
+file gtk+-2.24.17.tar.xz
+chk  1c539a1564fbcb0a9b60b03188dc808f7b678531
 
 #
 # GIMP stuff for W32
@@ -297,6 +326,7 @@ chk  d063e705812e1ee7feb8f35d51b3cad04ca13b0d
 # PNG
 
 # note: 2012-03-28 wk - Changed server from sf.net
+# checked: 2013-04-29 wk
 server ftp://ftp.simplesystems.org/pub/png/src
 
 file libpng-1.4.12.tar.bz2
@@ -307,8 +337,9 @@ chk  275cfa90c0558601f6216019317fc37a03ebee01
 #
 server ftp://sourceware.org/pub/libffi
 
-file libffi-3.0.10.tar.gz
-chk  97abf70e6a6d315d9259d58ac463663051d471e1
+# checked: 2013-04-29 wk - updated from 3.0.10.
+file libffi-3.0.13.tar.gz
+chk  f5230890dc0be42fb5c58fbf793da253155de106
 
 
 #
@@ -337,17 +368,17 @@ chk  02ee561282ffd4a893e87be82a4a85b0435bc470
 
 server ftp://ftp.g10code.com/g10code/w32pth
 
-# checked: 2012-03-28 wk - still sufficient
-#          2013-04-24 wk - updated to support w64-mingw32
+# checked: 2013-04-24 wk - updated to support w64-mingw32
 file w32pth-2.0.5.tar.bz2
 chk  d648b98ce215f81e901f3f982470d37c704433a6
 
 #
 # Stripped down version of BZIP2
+# (full source at http://bzip.org)
 #
 server ftp://ftp.g10code.com/g10code/bzip2
 
-# checked: 2012-03-28 wk
+# checked: 2013-04-29 wk
 file bzip2-1.0.6-g10.tar.gz
 chk  6e38be3377340a21a1f13ff84b5e6adce97cd1d4
 
diff --git a/patches/glib-2.34.3/01-socket.patch b/patches/glib-2.34.3/01-socket.patch
new file mode 100755 (executable)
index 0000000..c91c3cb
--- /dev/null
@@ -0,0 +1,93 @@
+#! /bin/sh
+patch -p1 -l -f $* < $0
+exit $?
+
+Fix a couple of buglets in the I/O channel implementation.
+
+
+diff -rup glib-2.20.0-orig/glib/giowin32.c glib-2.20.0/glib/giowin32.c
+--- glib-2.20.0-orig/glib/giowin32.c   2009-03-13 05:09:59.000000000 +0100
++++ glib-2.20.0/glib/giowin32.c        2009-04-08 15:24:59.000000000 +0200
+@@ -285,7 +285,7 @@ g_io_channel_win32_init (GIOWin32Channel
+
+   channel->event_mask = 0;
+   channel->last_events = 0;
+-  channel->event = NULL;
++  channel->event = WSA_INVALID_EVENT;
+   channel->write_would_have_blocked = FALSE;
+   channel->ever_writable = FALSE;
+ }
+@@ -1144,7 +1144,7 @@ g_io_win32_free (GIOChannel *channel)
+          g_free (emsg);
+        }
+
+-  if (win32_channel->event)
++  if (win32_channel->event != WSA_INVALID_EVENT)
+     if (!WSACloseEvent (win32_channel->event))
+       if (win32_channel->debug)
+        {
+@@ -1595,7 +1595,7 @@ g_io_win32_sock_create_watch (GIOChannel
+
+   watch->condition = condition;
+
+-  if (win32_channel->event == 0)
++  if (win32_channel->event == WSA_INVALID_EVENT)
+     win32_channel->event = WSACreateEvent ();
+
+   watch->pollfd.fd = (gintptr) win32_channel->event;
+@@ -2161,7 +2161,54 @@ g_io_channel_win32_make_pollfd (GIOChann
+       break;
+
+     case G_IO_WIN32_SOCKET:
+-      fd->fd = (gintptr) WSACreateEvent ();
++      if (win32_channel->event == WSA_INVALID_EVENT)
++      win32_channel->event = WSACreateEvent ();
++      fd->fd = (gintptr) win32_channel->event;
++
++      if (fd->fd == (gintptr) WSA_INVALID_EVENT)
++      {
++        gchar *emsg = g_win32_error_message (GetLastError ());
++
++        g_error ("Error creating event: %s", emsg);
++        g_free (emsg);
++      }
++      else
++      {
++        int event_mask = 0;
++
++        if (condition & G_IO_IN)
++          event_mask |= (FD_READ | FD_ACCEPT);
++        if (condition & G_IO_OUT)
++          event_mask |= (FD_WRITE | FD_CONNECT);
++        event_mask |= FD_CLOSE;
++
++        ResetEvent ((WSAEVENT) fd->fd);
++
++        if (win32_channel->debug)
++          g_print ("WSAEventSelect(%d,%p,{%s})",
++                   win32_channel->fd, (HANDLE) fd->fd,
++                   event_mask_to_string (event_mask));
++        if (WSAEventSelect (win32_channel->fd, (HANDLE) fd->fd,
++                            event_mask) == SOCKET_ERROR)
++          if (win32_channel->debug)
++            {
++              gchar *emsg = g_win32_error_message (WSAGetLastError ());
++
++              g_print (" failed: %s", emsg);
++              g_free (emsg);
++            }
++        if (win32_channel->debug)
++          g_print ("\n");
++
++        if ((event_mask & FD_WRITE) &&
++            win32_channel->ever_writable &&
++            !win32_channel->write_would_have_blocked)
++          {
++            if (win32_channel->debug)
++              g_print ("WSASetEvent(%p)\n", (WSAEVENT) fd->fd);
++            WSASetEvent ((WSAEVENT) fd->fd);
++          }
++      }
+       break;
+
+     case G_IO_WIN32_WINDOWS_MESSAGES:
diff --git a/patches/glib-2.34.3/02-no-kill.patch b/patches/glib-2.34.3/02-no-kill.patch
new file mode 100755 (executable)
index 0000000..029f42a
--- /dev/null
@@ -0,0 +1,69 @@
+#! /bin/sh
+patch -p0 -f $* < $0
+exit $?
+
+Replace kill() by TerminateProcess.  "interface" is a macro in Windows
+and thus we need to rename it too.
+
+
+--- gio/tests/gdbus-proxy.c~   2012-11-26 17:52:48.000000000 +0100
++++ gio/tests/gdbus-proxy.c    2013-04-30 09:56:34.301673374 +0200
+@@ -23,6 +23,9 @@
+ #include <gio/gio.h>
+ #include <unistd.h>
+ #include <string.h>
++#ifdef G_OS_WIN32
++# include <windows.h>
++#endif
+
+ #include "gdbus-tests.h"
+
+@@ -693,7 +696,7 @@ test_basic (GDBusProxy *proxy)
+   GDBusInterfaceInfo *info;
+   gchar *name;
+   gchar *path;
+-  gchar *interface;
++  gchar *iface;
+   gint timeout;
+
+   connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
+@@ -712,7 +715,7 @@ test_basic (GDBusProxy *proxy)
+                 "g-flags", &flags,
+                 "g-name", &name,
+                 "g-object-path", &path,
+-                "g-interface-name", &interface,
++                "g-interface-name", &iface,
+                 "g-default-timeout", &timeout,
+                 NULL);
+
+@@ -721,13 +724,13 @@ test_basic (GDBusProxy *proxy)
+   g_assert_cmpint (flags, ==, G_DBUS_PROXY_FLAGS_NONE);
+   g_assert_cmpstr (name, ==, "com.example.TestService");
+   g_assert_cmpstr (path, ==, "/com/example/TestObject");
+-  g_assert_cmpstr (interface, ==, "com.example.Frob");
++  g_assert_cmpstr (iface, ==, "com.example.Frob");
+   g_assert_cmpint (timeout, ==, -1);
+
+   g_object_unref (conn);
+   g_free (name);
+   g_free (path);
+-  g_free (interface);
++  g_free (iface);
+
+   g_object_unref (connection);
+ }
+@@ -753,7 +756,14 @@ kill_test_service (GDBusConnection *conn
+                                      &error);
+   g_variant_get (ret, "(u)", &pid);
+   g_variant_unref (ret);
++#ifdef G_OS_WIN32
++  {
++    HANDLE process = (HANDLE) pid;
++    TerminateProcess (process, 1);
++  }
++#else
+   kill (pid, SIGTERM);
++#endif
+ }
+
+ static void
index e7d133b..4018e0a 100644 (file)
@@ -117,6 +117,7 @@ gpg4win_spkgs = glib libffi gdk-pixbuf gtk+ \
 # We can use $(idir) here for the installation prefix.
 
 gpg4win_pkg_glib_configure = \
+  --disable-modular-tests \
   --with-lib-prefix=$(idir) --with-libiconv-prefix=$(idir) \
   CPPFLAGS=-I$(idir)/include LDFLAGS=-L$(idir)/lib CCC=$(host)-g++
 gpg4win_pkg_glib_extracflags = -march=i486
index 88c888b..59ba654 100644 (file)
@@ -31,6 +31,6 @@ Section "-libffi" SEC_libffi
 !ifdef SOURCES
   File ${gpg4win_pkg_libffi}
 !else
-  File ${prefix}/bin/libffi-5.dll
+  File ${prefix}/bin/libffi-6.dll
 !endif
 SectionEnd
index 2fc9187..b572090 100644 (file)
@@ -30,7 +30,10 @@ Section "-un.libffi"
   Call un.SourceDelete
 !else
 
+  Delete "$INSTDIR\libffi-6.dll"
+
+# Also delete any left-over old libffi version.
   Delete "$INSTDIR\libffi-5.dll"
-  RMDir "$INSTDIR"
+
 !endif
 SectionEnd