Source: gnome-vfs
Severity: normal
Version: 1:2.24.4-4
Tags: patch
User: [email protected]
Usertags: gnutls3

Dear Maintainer,

Please consider switching to gnutls28 to use more up to date
implementation. Previous licensing concerns (GPLv2-only incompatibility)
of gnutls28 have now been resolved.

Furthermore, with new gnutls gcrypt dependency is no longer required as
gnutls can perform thread locking itself. [1]

Please consider applying following patch:

diff -Nru gnome-vfs-2.24.4/debian/changelog gnome-vfs-2.24.4/debian/changelog
--- gnome-vfs-2.24.4/debian/changelog	2013-11-06 21:34:03.000000000 +0000
+++ gnome-vfs-2.24.4/debian/changelog	2014-05-08 22:42:31.000000000 +0100
@@ -1,3 +1,10 @@
+gnome-vfs (1:2.24.4-5) UNRELEASED; urgency=medium
+
+  * Switch to gnutls28.
+  * Drop gcrypt library dependency, gnutls can do thread locking.
+
+ -- Dimitri John Ledkov <[email protected]>  Thu, 08 May 2014 22:03:21 +0100
+
 gnome-vfs (1:2.24.4-4) unstable; urgency=low
 
   * Switch to multiarch.
diff -Nru gnome-vfs-2.24.4/debian/control gnome-vfs-2.24.4/debian/control
--- gnome-vfs-2.24.4/debian/control	2013-11-06 21:34:17.000000000 +0000
+++ gnome-vfs-2.24.4/debian/control	2014-05-08 22:42:40.000000000 +0100
@@ -2,12 +2,11 @@
 # 
 # Modifications should be made to debian/control.in instead.
 # This file is regenerated automatically in the clean target.
-
 Source: gnome-vfs
 Section: oldlibs
 Priority: optional
 Maintainer: Josselin Mouette <[email protected]>
-Uploaders: Debian GNOME Maintainers <[email protected]>, Emilio Pozuelo Monfort <[email protected]>, Michael Biebl <[email protected]>, Otavio Salvador <[email protected]>, Sebastian Dröge <[email protected]>
+Uploaders: Debian GNOME Maintainers <[email protected]>, Emilio Pozuelo Monfort <[email protected]>, Michael Biebl <[email protected]>, Sebastian Dröge <[email protected]>
 Build-Depends: cdbs,
                dh-autoreconf,
                gtk-doc-tools (>= 1.0),
@@ -20,8 +19,7 @@
                zlib1g-dev,
                intltool (>= 0.35.0),
                gnome-mime-data,
-               libgnutls-dev (>= 1.0.4-3),
-               libgcrypt11-dev,
+               libgnutls28-dev (>= 1.0.4-3),
                gnome-pkg-tools (>= 0.11.3),
                dpkg-dev (>= 1.13.19),
                libdbus-glib-1-dev (>= 0.70),
diff -Nru gnome-vfs-2.24.4/debian/control.in gnome-vfs-2.24.4/debian/control.in
--- gnome-vfs-2.24.4/debian/control.in	2013-11-06 21:29:56.000000000 +0000
+++ gnome-vfs-2.24.4/debian/control.in	2014-05-08 22:04:10.000000000 +0100
@@ -15,8 +15,7 @@
                zlib1g-dev,
                intltool (>= 0.35.0),
                gnome-mime-data,
-               libgnutls-dev (>= 1.0.4-3),
-               libgcrypt11-dev,
+               libgnutls28-dev (>= 1.0.4-3),
                gnome-pkg-tools (>= 0.11.3),
                dpkg-dev (>= 1.13.19),
                libdbus-glib-1-dev (>= 0.70),
diff -Nru gnome-vfs-2.24.4/debian/patches/gnutls3.patch gnome-vfs-2.24.4/debian/patches/gnutls3.patch
--- gnome-vfs-2.24.4/debian/patches/gnutls3.patch	1970-01-01 01:00:00.000000000 +0100
+++ gnome-vfs-2.24.4/debian/patches/gnutls3.patch	2014-05-08 22:42:02.000000000 +0100
@@ -0,0 +1,60 @@
+Description: Switch to gnutls28.
+Author: Dimitri John Ledkov <[email protected]>
+
+--- a/configure.in
++++ b/configure.in
+@@ -671,10 +671,6 @@
+   if test "x${OPENSSL_LIBS}" != "x"; then
+     AC_MSG_ERROR([*** Can't use both openssl and gnutls at the same time. Please pick one only. ***])
+   else
+-    AM_PATH_LIBGCRYPT
+-    if test "x${LIBGCRYPT_LIBS}" = "x"; then
+-      AC_MSG_ERROR([Unable to find LIBGRYPT])
+-    fi
+     PKG_CHECK_MODULES(LIBGNUTLS, gnutls >= 1.0.0, [AC_DEFINE(HAVE_GNUTLS, 1, [Define to 1 if GnuTLS is available])
+     				 	   	  have_ssl=true])
+     if test "x${LIBGNUTLS_LIBS}" = "x"; then
+@@ -1048,8 +1044,8 @@
+ dnl ==============================================================================
+ 
+ PKG_CHECK_MODULES(LIBGNOMEVFS, glib-2.0 >= $GLIB_REQUIRED gmodule-no-export-2.0 >= $GLIB_REQUIRED gthread-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libxml-2.0 >= $XML_REQUIRED gnome-mime-data-2.0 $dbus_requirement)
+-LIBGNOMEVFS_CFLAGS="$LIBGNOMEVFS_CFLAGS $OPENSSL_CFLAGS $LIBGNUTLS_CFLAGS $LIBGCRYPT_CFLAGS $HOWL_CFLAGS $AVAHI_CFLAGS"
+-LIBGNOMEVFS_LIBS="$LIBGNOMEVFS_LIBS $OPENSSL_LIBS $LIBGNUTLS_LIBS $LIBGCRYPT_LIBS $HOWL_LIBS $AVAHI_LIBS $RESOLVER_LIBS"
++LIBGNOMEVFS_CFLAGS="$LIBGNOMEVFS_CFLAGS $OPENSSL_CFLAGS $LIBGNUTLS_CFLAGS $HOWL_CFLAGS $AVAHI_CFLAGS"
++LIBGNOMEVFS_LIBS="$LIBGNOMEVFS_LIBS $OPENSSL_LIBS $LIBGNUTLS_LIBS $HOWL_LIBS $AVAHI_LIBS $RESOLVER_LIBS"
+ AC_SUBST(LIBGNOMEVFS_CFLAGS)
+ AC_SUBST(LIBGNOMEVFS_LIBS)
+ 
+--- a/libgnomevfs/gnome-vfs-ssl.c
++++ b/libgnomevfs/gnome-vfs-ssl.c
+@@ -42,8 +42,10 @@
+ #include <openssl/x509.h>
+ #include <openssl/err.h>
+ #elif defined HAVE_GNUTLS
+-#include <gcrypt.h>
+ #include <gnutls/gnutls.h>
++#if GNUTLS_VERSION_NUMBER <= 0x020b00
++#include <gcrypt.h>
++#endif
+ #endif
+ #if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS)
+ #include <sys/time.h>
+@@ -82,7 +84,7 @@
+ 	GnomeVFSSSLPrivate *private;
+ };
+ 
+-#ifdef HAVE_GNUTLS
++#if defined(HAVE_GNUTLS) && GNUTLS_VERSION_NUMBER <= 0x020b00
+ static int gcry_gthread_mutex_init (void **priv)			      
+ {									      
+ 	GMutex* lock = g_mutex_new();
+@@ -127,7 +129,9 @@
+ #ifdef HAVE_OPENSSL
+ 	SSL_library_init ();
+ #elif defined HAVE_GNUTLS
++#if GNUTLS_VERSION_NUMBER <= 0x020b00
+ 	gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_gthread);
++#endif
+ 	gnutls_global_init();
+ #endif
+ 	return NULL;
diff -Nru gnome-vfs-2.24.4/debian/patches/series gnome-vfs-2.24.4/debian/patches/series
--- gnome-vfs-2.24.4/debian/patches/series	2013-11-06 21:10:47.000000000 +0000
+++ gnome-vfs-2.24.4/debian/patches/series	2014-05-08 22:40:19.000000000 +0100
@@ -23,3 +23,4 @@
 31_link_tests_and_programs_against_required_libs.patch
 40_disable_deprecated.patch
 41_test_srcdir.patch
+gnutls3.patch
Regards,

Dimitri.

[1] gnutls 2.12 release announcement:
** libgnutls: Added gnutls_global_set_mutex() to allow setting
alternative locking procedures. By default the system available
locking is used. In *NIX pthreads are used and in windows the
critical section API. This follows a different approach than the
previous versions that depended on libgcrypt initialization. The
locks are now set by default in systems that support it. Programs
that used gcry_control() to set thread locks should insert it into
a block of
#if GNUTLS_VERSION_NUMBER <= 0x020b00
        gcry_control(...)
#endif

Reply via email to