ports/64389: net/ctorrent: CTorrent 1.3.2 bogusly depends on OpenSSH header
Marius Strobl
marius at alchemy.franken.de
Wed Mar 17 22:20:01 UTC 2004
>Number: 64389
>Category: ports
>Synopsis: net/ctorrent: CTorrent 1.3.2 bogusly depends on OpenSSH header
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Mar 17 14:20:00 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Marius Strobl
>Release: FreeBSD 5.2-CURRENT sparc64
>Organization:
>Environment:
>Description:
The configure script of CTorrent 1.3.2 checks for SHA1_Init(3) in
libssl, libcrypt and libmd (in that order) but then checks for the
presence of <openssl/sha.h> regardless if SHA1_Init(3) was found in
libssl or one of the other libraries. Moreover, the CTorrent sources
only use <openssl/sha.h> instead of <sha.h> for libcrypt/libmd.
These causes two problems:
- On FreeBSD, libssl doesn't contain SHA1_Init(3) (it's in libmd),
from configure, run on FreeBSD 5.2-current _with_ OpenSSL in the
base:
checking for SHA1_Init in -lssl... no
checking for SHA1_Init in -lcrypt... no
checking for SHA1_Init in -lmd... yes
<...>
checking openssl/sha.h usability... yes
checking openssl/sha.h presence... yes
checking for openssl/sha.h... yes
The consecence here is that <openssl/sha.h> is used instead of the
correct <sha.h>, however this is rather harmless.
- On a FreeBSD _without_ OpenSSL in the base (port version of OpenSSL
doesn't work either), CTorrent doesn't build because it can't find
<openssl/sha.h>, without really needing it:
checking for SHA1_Init in -lssl... no
checking for SHA1_Init in -lcrypt... no
checking for SHA1_Init in -lmd... yes
<...>
checking openssl/sha.h usability... no
checking openssl/sha.h presence... no
checking for openssl/sha.h... no
configure: error: Error, OpenSSL header file sha.h not found.
The patch below fixes this, a proper version for configure.in was sent
to the author.
Other changes are to add SIZE info and quiet this one:
configure: WARNING: you should use --build, --host, --target
>How-To-Repeat:
Try to build CTorrent 1.3.2 on a FreeBSD without OpenSSL in the base.
>Fix:
Index: Makefile
===================================================================
RCS file: /usr/data/bsd/cvs/fbsd/ports/net/ctorrent/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile 2 Feb 2004 17:57:40 -0000 1.4
+++ Makefile 13 Feb 2004 02:13:57 -0000
@@ -17,5 +18,6 @@
GNU_CONFIGURE= yes
PLIST_FILES= bin/ctorrent
+CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /usr/data/bsd/cvs/fbsd/ports/net/ctorrent/distinfo,v
retrieving revision 1.3
diff -u -r1.3 distinfo
--- distinfo 1 Feb 2004 19:43:37 -0000 1.3
+++ distinfo 17 Mar 2004 21:01:13 -0000
@@ -1 +1,2 @@
MD5 (ctorrent-1.3.2.tar.gz) = 1bc787df91285a9cec8509617c3152d6
+SIZE (ctorrent-1.3.2.tar.gz) = 87195
Index: files/patch-btcontent.cpp
===================================================================
RCS file: files/patch-btcontent.cpp
diff -N files/patch-btcontent.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-btcontent.cpp 13 Feb 2004 02:10:03 -0000
@@ -0,0 +1,14 @@
+--- btcontent.cpp.orig Sun Feb 1 06:18:07 2004
++++ btcontent.cpp Fri Feb 13 03:09:22 2004
+@@ -8,7 +8,11 @@
+ #else
+ #include <unistd.h>
+ #include <sys/param.h>
++#if defined(HAVE_LIBCRYPT) || defined(HAVE_LIBMD)
++#include <sha.h>
++#elif defined(HAVE_LIBSSL)
+ #include <openssl/sha.h>
++#endif
+ #endif
+
+ #include <time.h>
Index: files/patch-btfiles.cpp
===================================================================
RCS file: files/patch-btfiles.cpp
diff -N files/patch-btfiles.cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-btfiles.cpp 13 Feb 2004 02:11:16 -0000
@@ -0,0 +1,14 @@
+--- btfiles.cpp.orig Sun Feb 1 06:33:16 2004
++++ btfiles.cpp Fri Feb 13 03:10:57 2004
+@@ -8,7 +8,11 @@
+ #include <unistd.h>
+ #include <dirent.h>
+ #include <sys/param.h>
++#if defined(HAVE_LIBCRYPT) || defined(HAVE_LIBMD)
++#include <sha.h>
++#elif defined(HAVE_LIBSSL)
+ #include <openssl/sha.h>
++#endif
+ #endif
+
+ #include <time.h>
Index: files/patch-configure
===================================================================
RCS file: files/patch-configure
diff -N files/patch-configure
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-configure 13 Feb 2004 02:05:33 -0000
@@ -0,0 +1,41 @@
+--- configure.orig Sun Feb 1 07:15:43 2004
++++ configure Fri Feb 13 03:04:21 2004
+@@ -2851,7 +2851,7 @@
+ int
+ main ()
+ {
+-SHA1_Init ();
++XXXSHA1_Init ();
+ ;
+ return 0;
+ }
+@@ -2915,7 +2915,7 @@
+ int
+ main ()
+ {
+-SHA1_Init ();
++XXXSHA1_Init ();
+ ;
+ return 0;
+ }
+@@ -3814,13 +3814,13 @@
+ echo "${ECHO_T}$ac_cv_header_openssl_sha_h" >&6
+
+ fi
+-if test $ac_cv_header_openssl_sha_h = yes; then
+- :
+-else
+- { { echo "$as_me:$LINENO: error: Error, OpenSSL header file sha.h not found." >&5
+-echo "$as_me: error: Error, OpenSSL header file sha.h not found." >&2;}
+- { (exit 1); exit 1; }; }
+-fi
++#if test $ac_cv_header_openssl_sha_h = yes; then
++# :
++#else
++# { { echo "$as_me:$LINENO: error: Error, OpenSSL header file sha.h not found." >&5
++#echo "$as_me: error: Error, OpenSSL header file sha.h not found." >&2;}
++# { (exit 1); exit 1; }; }
++#fi
+
+
+
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list