Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417129 - net-dns/bind-tools-9.8.1[ssl] hardcodes OpenSSL path checks which breaks cross-compiling/etc...
Summary: net-dns/bind-tools-9.8.1[ssl] hardcodes OpenSSL path checks which breaks cros...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Christian Ruppert (idl0r)
URL: https://gitlab.isc.org/isc-projects/b...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: cross-compile
  Show dependency tree
 
Reported: 2012-05-22 17:52 UTC by Bertrand Jacquin
Modified: 2020-02-23 12:26 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
bind-tools-9.8.1-BJA-SSL-path.diff (bind-tools-9.8.1-BJA-SSL-path.diff,384 bytes, patch)
2012-05-22 17:54 UTC, Bertrand Jacquin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2012-05-22 17:52:49 UTC
When building bind-tools 9.8.1 (current stable) with ssl USE flags, it does :

# ROOT=/data/tmp USE=ssl emerge -vat =bind-tools 9.8.1
...
configure:13743: checking for OpenSSL library
configure:13840: result: using OpenSSL from /usr/lib and /usr/include

This is wrong here, this is due to configure.in file that set default search dirs if configure is called without a prefix search define in --with-openssl :

AC_ARG_WITH(openssl,
[  --with-openssl[=PATH]     Build with OpenSSL [yes|no|path].
                          (Required for DNSSEC)],
    use_openssl="$withval", use_openssl="auto")

openssldirs="/usr /usr/local /usr/local/ssl /usr/pkg /usr/sfw"
if test "$use_openssl" = "auto"
then
        for d in $openssldirs
        do
                if test -f $d/include/openssl/opensslv.h
                then
                        use_openssl=$d
                        break
                fi
        done
fi

Here a fix for the ebuild to use a correct --with-openssl

Reproducible: Always
Comment 1 Bertrand Jacquin 2012-05-22 17:54:03 UTC
Created attachment 312711 [details, diff]
bind-tools-9.8.1-BJA-SSL-path.diff

the patch
Comment 2 Bertrand Jacquin 2012-05-22 17:55:57 UTC
This may be extend to xml USE flag, but don't have libxml2 for current target. This to change xml2-config binary PATH
Comment 3 SpanKY gentoo-dev 2013-02-08 06:12:18 UTC
openssl installs .pc files now which should be easy to use
Comment 4 SpanKY gentoo-dev 2015-05-26 01:56:20 UTC
Comment on attachment 312711 [details, diff]
bind-tools-9.8.1-BJA-SSL-path.diff

ROOT should not be used in src_* funcs
Comment 5 SpanKY gentoo-dev 2015-05-26 03:01:09 UTC
should be all set now in the tree; thanks for the report!

Commit message: Clean up openssl logic to fix cross-compiling
http://sources.gentoo.org/net-dns/bind-tools/bind-tools-9.10.2-r1.ebuild?rev=1.1
http://sources.gentoo.org/net-dns/bind-tools/files/bind-tools-9.10.2-openssl.patch?rev=1.1
Comment 6 Christian Ruppert (idl0r) gentoo-dev 2016-07-13 17:37:41 UTC
@vapier: Did you send your patch to upstream? It's at least not included in 9.10.4-P1 so I'd have to merge that by hand otherwise. Can you please forward your patch to the ISC guys?
It's also not included in net-dns/bind (ebuild).
Comment 7 Sergei Trofimovich gentoo-dev 2019-08-10 10:42:56 UTC
Upstream fixed it by unconditionally using libcrypto from pkg-config:
    https://gitlab.isc.org/isc-projects/bind9/commit/5d1e7be582a357256ee76fc31092a3236119268e

	
---	AX_CHECK_OPENSSL([:],[AC_MSG_FAILURE([OpenSSL/LibreSSL not found])])
+++	PKG_CHECK_MODULES([OPENSSL], [libcrypto], [],
+++			  [AX_CHECK_OPENSSL([:],[AC_MSG_FAILURE([OpenSSL/LibreSSL not found])])])