[arch-commits] Commit in glib-networking/repos (4 files)

Ionut Biru ibiru at archlinux.org
Fri Sep 16 18:27:00 UTC 2011


    Date: Friday, September 16, 2011 @ 14:27:00
  Author: ibiru
Revision: 138109

improve compatibility with gnutls 3.0. it fixes evolution google calendar. FS#25733

Added:
  glib-networking/repos/extra-i686/fix_G_TLS_ERROR_EOF_handling.patch
  glib-networking/repos/extra-x86_64/fix_G_TLS_ERROR_EOF_handling.patch
Modified:
  glib-networking/repos/extra-i686/PKGBUILD
  glib-networking/repos/extra-x86_64/PKGBUILD

-------------------------------------------------+
 extra-i686/PKGBUILD                             |    9 +-
 extra-i686/fix_G_TLS_ERROR_EOF_handling.patch   |   73 ++++++++++++++++++++++
 extra-x86_64/PKGBUILD                           |    9 +-
 extra-x86_64/fix_G_TLS_ERROR_EOF_handling.patch |   73 ++++++++++++++++++++++
 4 files changed, 158 insertions(+), 6 deletions(-)

Modified: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD	2011-09-16 17:04:14 UTC (rev 138108)
+++ extra-i686/PKGBUILD	2011-09-16 18:27:00 UTC (rev 138109)
@@ -2,7 +2,7 @@
 # Maintainer: Jan "heftig" Steffens <jan.steffens at gmail.com>
 pkgname=glib-networking
 pkgver=2.28.7
-pkgrel=4
+pkgrel=5
 pkgdesc="Network-related giomodules for glib"
 arch=('i686' 'x86_64')
 url="http://www.gtk.org/"
@@ -12,13 +12,16 @@
 options=('!libtool')
 install=glib-networking.install
 source=(http://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-${pkgver}.tar.bz2
-        glib-networking-2.29.9-port-gnutls3-API.patch)
+        glib-networking-2.29.9-port-gnutls3-API.patch
+        fix_G_TLS_ERROR_EOF_handling.patch)
 sha256sums=('98bedfbd530c4b1b53c91025fe82290bafd289d249e4eb549c3b90d23a76021c'
-            '101daf107773f84d08d7ab55a354875e2e021c3b5dd3cdc259fb544f94a8beee')
+            '101daf107773f84d08d7ab55a354875e2e021c3b5dd3cdc259fb544f94a8beee'
+            '286d64a121cb987866b51af70f55d47bafc5bf60e813aa1412dce51e426cc553')
 
 build() {
   cd "$srcdir/$pkgname-$pkgver"
   patch -Np0 -i "$srcdir/glib-networking-2.29.9-port-gnutls3-API.patch"
+  patch -Np1 -i "$srcdir/fix_G_TLS_ERROR_EOF_handling.patch"
   ./configure \
     --prefix=/usr --sysconfdir=/etc \
     --libexecdir=/usr/lib/glib-networking --disable-static

Added: extra-i686/fix_G_TLS_ERROR_EOF_handling.patch
===================================================================
--- extra-i686/fix_G_TLS_ERROR_EOF_handling.patch	                        (rev 0)
+++ extra-i686/fix_G_TLS_ERROR_EOF_handling.patch	2011-09-16 18:27:00 UTC (rev 138109)
@@ -0,0 +1,73 @@
+From 9e2aaacafb45d51cff57dc033f4b5ad5bc1a1762 Mon Sep 17 00:00:00 2001
+From: Dan Winship <danw at gnome.org>
+Date: Fri, 16 Sep 2011 15:29:29 +0000
+Subject: gnutls: fix G_TLS_ERROR_EOF handling with gnutls 3.0
+
+gnutls 3.0 has a new error code for "peer closed connection without
+sending a Close packet", so add some #ifdefs to do the right thing
+with either 2.x or 3.x.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=659233
+---
+diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
+index c1ede79..0f792bb 100644
+--- a/tls/gnutls/gtlsconnection-gnutls.c
++++ b/tls/gnutls/gtlsconnection-gnutls.c
+@@ -132,7 +132,10 @@ struct _GTlsConnectionGnutlsPrivate
+ 
+   GError *error;
+   GCancellable *cancellable;
+-  gboolean blocking, eof;
++  gboolean blocking;
++#ifndef GNUTLS_E_PREMATURE_TERMINATION
++  gboolean eof;
++#endif
+   GIOCondition internal_direction;
+ };
+ 
+@@ -548,19 +551,22 @@ end_gnutls_io (GTlsConnectionGnutls  *gnutls,
+       gnutls->priv->need_handshake = TRUE;
+       return status;
+     }
+-  else if (status == GNUTLS_E_UNEXPECTED_PACKET_LENGTH)
++  else if (
++#ifdef GNUTLS_E_PREMATURE_TERMINATION
++	   status == GNUTLS_E_PREMATURE_TERMINATION
++#else
++	   status == GNUTLS_E_UNEXPECTED_PACKET_LENGTH && gnutls->priv->eof
++#endif
++	   )
+     {
+-      if (gnutls->priv->eof)
++      if (gnutls->priv->require_close_notify)
+ 	{
+-	  if (gnutls->priv->require_close_notify)
+-	    {
+-	      g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_EOF,
+-				   _("TLS connection closed unexpectedly"));
+-	      return status;
+-	    }
+-	  else
+-	    return 0;
++	  g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_EOF,
++			       _("TLS connection closed unexpectedly"));
++	  return status;
+ 	}
++      else
++	return 0;
+     }
+ 
+   return status;
+@@ -795,8 +801,10 @@ g_tls_connection_gnutls_pull_func (gnutls_transport_ptr_t  transport_data,
+ 
+   if (ret < 0)
+     set_gnutls_error (gnutls, G_IO_IN);
++#ifndef GNUTLS_E_PREMATURE_TERMINATION
+   else if (ret == 0)
+     gnutls->priv->eof = TRUE;
++#endif
+ 
+   return ret;
+ }
+--
+cgit v0.9.0.2

Modified: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2011-09-16 17:04:14 UTC (rev 138108)
+++ extra-x86_64/PKGBUILD	2011-09-16 18:27:00 UTC (rev 138109)
@@ -2,7 +2,7 @@
 # Maintainer: Jan "heftig" Steffens <jan.steffens at gmail.com>
 pkgname=glib-networking
 pkgver=2.28.7
-pkgrel=4
+pkgrel=5
 pkgdesc="Network-related giomodules for glib"
 arch=('i686' 'x86_64')
 url="http://www.gtk.org/"
@@ -12,13 +12,16 @@
 options=('!libtool')
 install=glib-networking.install
 source=(http://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-${pkgver}.tar.bz2
-        glib-networking-2.29.9-port-gnutls3-API.patch)
+        glib-networking-2.29.9-port-gnutls3-API.patch
+        fix_G_TLS_ERROR_EOF_handling.patch)
 sha256sums=('98bedfbd530c4b1b53c91025fe82290bafd289d249e4eb549c3b90d23a76021c'
-            '101daf107773f84d08d7ab55a354875e2e021c3b5dd3cdc259fb544f94a8beee')
+            '101daf107773f84d08d7ab55a354875e2e021c3b5dd3cdc259fb544f94a8beee'
+            '286d64a121cb987866b51af70f55d47bafc5bf60e813aa1412dce51e426cc553')
 
 build() {
   cd "$srcdir/$pkgname-$pkgver"
   patch -Np0 -i "$srcdir/glib-networking-2.29.9-port-gnutls3-API.patch"
+  patch -Np1 -i "$srcdir/fix_G_TLS_ERROR_EOF_handling.patch"
   ./configure \
     --prefix=/usr --sysconfdir=/etc \
     --libexecdir=/usr/lib/glib-networking --disable-static

Added: extra-x86_64/fix_G_TLS_ERROR_EOF_handling.patch
===================================================================
--- extra-x86_64/fix_G_TLS_ERROR_EOF_handling.patch	                        (rev 0)
+++ extra-x86_64/fix_G_TLS_ERROR_EOF_handling.patch	2011-09-16 18:27:00 UTC (rev 138109)
@@ -0,0 +1,73 @@
+From 9e2aaacafb45d51cff57dc033f4b5ad5bc1a1762 Mon Sep 17 00:00:00 2001
+From: Dan Winship <danw at gnome.org>
+Date: Fri, 16 Sep 2011 15:29:29 +0000
+Subject: gnutls: fix G_TLS_ERROR_EOF handling with gnutls 3.0
+
+gnutls 3.0 has a new error code for "peer closed connection without
+sending a Close packet", so add some #ifdefs to do the right thing
+with either 2.x or 3.x.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=659233
+---
+diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
+index c1ede79..0f792bb 100644
+--- a/tls/gnutls/gtlsconnection-gnutls.c
++++ b/tls/gnutls/gtlsconnection-gnutls.c
+@@ -132,7 +132,10 @@ struct _GTlsConnectionGnutlsPrivate
+ 
+   GError *error;
+   GCancellable *cancellable;
+-  gboolean blocking, eof;
++  gboolean blocking;
++#ifndef GNUTLS_E_PREMATURE_TERMINATION
++  gboolean eof;
++#endif
+   GIOCondition internal_direction;
+ };
+ 
+@@ -548,19 +551,22 @@ end_gnutls_io (GTlsConnectionGnutls  *gnutls,
+       gnutls->priv->need_handshake = TRUE;
+       return status;
+     }
+-  else if (status == GNUTLS_E_UNEXPECTED_PACKET_LENGTH)
++  else if (
++#ifdef GNUTLS_E_PREMATURE_TERMINATION
++	   status == GNUTLS_E_PREMATURE_TERMINATION
++#else
++	   status == GNUTLS_E_UNEXPECTED_PACKET_LENGTH && gnutls->priv->eof
++#endif
++	   )
+     {
+-      if (gnutls->priv->eof)
++      if (gnutls->priv->require_close_notify)
+ 	{
+-	  if (gnutls->priv->require_close_notify)
+-	    {
+-	      g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_EOF,
+-				   _("TLS connection closed unexpectedly"));
+-	      return status;
+-	    }
+-	  else
+-	    return 0;
++	  g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_EOF,
++			       _("TLS connection closed unexpectedly"));
++	  return status;
+ 	}
++      else
++	return 0;
+     }
+ 
+   return status;
+@@ -795,8 +801,10 @@ g_tls_connection_gnutls_pull_func (gnutls_transport_ptr_t  transport_data,
+ 
+   if (ret < 0)
+     set_gnutls_error (gnutls, G_IO_IN);
++#ifndef GNUTLS_E_PREMATURE_TERMINATION
+   else if (ret == 0)
+     gnutls->priv->eof = TRUE;
++#endif
+ 
+   return ret;
+ }
+--
+cgit v0.9.0.2




More information about the arch-commits mailing list