Subject: pkg/34792: cyrus-saslauthd build fails without system OpenSSL
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Ben Collver <collver@peak.org>
List: pkgsrc-bugs
Date: 10/12/2006 03:35:00
>Number:         34792
>Category:       pkg
>Synopsis:       cyrus-saslauthd build fails without system OpenSSL
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 12 03:35:00 +0000 2006
>Originator:     Ben Collver
>Release:        Linux 2.6.17 i386
>Organization:
>Environment:


System: Linux sanctum.terrorpin.net 2.6.17-1.2187_FC5 #1 Mon Sep 11 01:17:06 EDT 2006 i686 i686 i386 GNU/Linux


>Description:


cyrus-saslauthd includes md5.h, which sometimes exists in /usr/include.  When it does not exist, the build fails, even though openssl is provided by buildlink.


>How-To-Repeat:


if gcc -DHAVE_CONFIG_H -DSASLAUTHD_CONF_FILE_DEFAULT=\"/pkg/etc/saslauthd.conf\" -I. -I. -I.. -I. -I. -I. -I./include -I./include -I./../include   -I/pkg/include -I/usr/include -I/pkg/include -I/pkg/include  -O2 -I/pkg/include -I/usr/include -MT md5.o -MD -MP -MF ".deps/md5.Tpo"  -c -o md5.o `test -f 'md5.c' || echo './'`md5.c;  then mv ".deps/md5.Tpo" ".deps/md5.Po";  else rm -f ".deps/md5.Tpo"; exit 1;  fi
md5.c:33:17: error: md5.h: No such file or directory
In file included from md5.c:35:./../include/hmac-md5.h:11: error: expected specifier-qualifier-list before 'MD5_CTX'


>Fix:


When using pkgsrc openssl, buildlink places it in openssl/md5.h, but its MD5_CTX structure is incompatible with cyrus-saslauthd.

When not using built-in openssl, include saslauthd_md5.h, which is compatible.

Also, convert a post-build sed step to use the SUBST framework.

Note that I include ../../security/openssl/builtin.mk.  If I omit this, then make errors because IS_BUILTIN.openssl is undefined, even though ../../security/openssl/buildlink3.mk is included.  For this reason, I ignored the error thrown by pkglint.

The above changes can be viewed at

http://terrorpin.net/~ben/docs/comp/os/linux/pkgsrc/cyrus-saslauthd.diff