Bug 43992

Summary: configure should check for libgcrypt
Product: Wocky Reporter: Vincent Untz <vuntz>
Component: GeneralAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: git master   
Hardware: Other   
OS: All   
URL: http://cgit.freedesktop.org/~smcv/wocky/log/?h=gcryptless-43992
Whiteboard: review+
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 45275    
Attachments: Use g_getenv and g_strtoull instead of getenv and atoi
Remove <gcrypt.h> and other remnants of gcrypt

Description Vincent Untz 2011-12-20 14:49:56 UTC
wocky-tls.c is including <gcrypt.h>. Unless this is a mistake, the configure script should check for libgcrypt.

(I had a build failure here because of that)
Comment 1 Simon McVittie 2012-01-26 07:06:29 UTC
This is, in fact, a mistake. gcrypt used to be pulled in "accidentally" by GNUTLS, but you're presumably using GNUTLS 3, which no longer uses gcrypt.

We don't actually appear to use any gcrypt functionality, except that we use getenv() and atoi() without including stdlib.h - which gets included by gcrypt.h. We should have been using GLib functions for those anyway.
Comment 2 Simon McVittie 2012-01-26 08:00:59 UTC
Created attachment 56189 [details] [review]
Use g_getenv and g_strtoull instead of getenv and atoi

We don't include stdlib.h (except accidentally, via gcrypt.h), which we
should if we're going to use its functions. In both cases GLib has a
portable version, and our coding style is generally to prefer the GLib
versions of things, so let's use those.
Comment 3 Simon McVittie 2012-01-26 08:01:21 UTC
Created attachment 56190 [details] [review]
Remove <gcrypt.h> and other remnants of gcrypt

This doesn't seem to be used for anything, and creates an artificial 
dependency on gcrypt, which GNUTLS 3 no longer uses.

Verified to pass tests on Debian's gnutls26 2.12.16-1 package, but
insufficient to make tests pass on gnutls28 3.0.12-1.
 
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=43992
Bug-Debian: http://bugs.debian.org/638420
Comment 4 Simon McVittie 2012-01-26 08:22:32 UTC
(In reply to comment #3)
> Verified to pass tests on Debian's gnutls26 2.12.16-1 package, but
> insufficient to make tests pass on gnutls28 3.0.12-1.

That's Bug #45275.
Comment 5 Simon McVittie 2012-01-27 04:30:28 UTC
Also in branch:

ssh://people.freedesktop.org/~smcv/wocky.git gcryptless-43992

cgit doesn't show it yet, but should soon.
Comment 6 Will Thompson 2012-01-31 02:33:58 UTC
looks fine.
Comment 7 Nicolas Dufresne 2012-04-05 08:19:20 UTC
I see that this has been merged already.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.