On 2009-08-08 Andreas Metzler <ametz...@downhill.at.eu.org> wrote:
[...]
> Upstream seems to have changed the code to require installation of
> both gcrypt and tasn versions that greater or equal version gnutls
> was built against.

> http://git.savannah.gnu.org/cgit/gnutls.git/commit/?h=gnutls_2_8_x&id=ce23654ab3b8097241c1639ebe3e853c4f67b6d7
> http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=35bd51b3b42dd437a9914a908af45d78fec76856
[...]
> (See http://bugs.debian.org/495473 for comparison.)

Hello,
The gnutls 2.8 series will absolutely fail to work if the currently
installed version of libtasn1 or libgcrypt is not greater or equal
than the version gnutls was built against. This is much too cautious
since the libtasn1 ABI has not changed at all since 1.6. A gnutls
binary built against libtasn1 2.3 will work perfectly fiine with e.g.
libtasn1 2.0.

It also makes our (Debian and probably other distributors) life
unnecessary difficult, without any benefit for us, we already track
ABI through dependencies.

Please undo these changes, proposed patch against GIT HEAD attached.
thanks, cu andreas

-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c
index f04e7e5..186e5e0 100644
--- a/lib/gnutls_global.c
+++ b/lib/gnutls_global.c
@@ -187,13 +187,13 @@ gnutls_global_init (void)
     {
       const char *p;
 
-      p = gcry_check_version (GCRYPT_VERSION);
+      p = gcry_check_version (GNUTLS_GCRYPT_VERSION);
 
       if (p == NULL)
 	{
 	  gnutls_assert ();
 	  _gnutls_debug_log ("Checking for libgcrypt failed: %s < %s\n",
-			     gcry_check_version (NULL), GCRYPT_VERSION);
+			     gcry_check_version (NULL), GNUTLS_GCRYPT_VERSION);
 	  return GNUTLS_E_INCOMPATIBLE_GCRYPT_LIBRARY;
 	}
 
@@ -207,7 +207,7 @@ gnutls_global_init (void)
    * This should not deal with files in the final
    * version.
    */
-  if (asn1_check_version (ASN1_VERSION) == NULL)
+  if (asn1_check_version (GNUTLS_LIBTASN1_VERSION) == NULL)
     {
       gnutls_assert ();
       return GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY;
diff --git a/lib/m4/hooks.m4 b/lib/m4/hooks.m4
index 7ee3e50..16b7de4 100644
--- a/lib/m4/hooks.m4
+++ b/lib/m4/hooks.m4
@@ -34,6 +34,10 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
   DLL_VERSION=`expr ${LT_CURRENT} - ${LT_AGE}`
   AC_SUBST(DLL_VERSION)
 
+  GNUTLS_GCRYPT_VERSION=1.2.4
+  AC_DEFINE_UNQUOTED(GNUTLS_GCRYPT_VERSION, "$GNUTLS_GCRYPT_VERSION",
+    [Required version of gcrypt])
+
   AC_LIB_HAVE_LINKFLAGS(gcrypt,, [#include <gcrypt.h>],
     [enum gcry_cipher_algos i = GCRY_CIPHER_CAMELLIA128])
   if test "$ac_cv_libgcrypt" != yes; then
@@ -45,6 +49,9 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
     ]])
   fi
 
+  GNUTLS_LIBTASN1_VERSION=0.3.4
+  AC_DEFINE_UNQUOTED(GNUTLS_LIBTASN1_VERSION, "$GNUTLS_LIBTASN1_VERSION",
+    [Required version of libtasn1])
   AC_ARG_WITH(included-libtasn1,
     AS_HELP_STRING([--with-included-libtasn1], [use the included libtasn1]),
       included_libtasn1=$withval,

Reply via email to