diff mbox

package/erlang: build host erlang with ssl support to match target

Message ID 1407968827-12487-1-git-send-email-yann.morin.1998@free.fr
State Superseded
Headers show

Commit Message

Yann E. MORIN Aug. 13, 2014, 10:27 p.m. UTC
If the target erlang has SSL support, so shoud the host-erlang.

Suggested-by: Frank Hunleth <fhunleth@troodon-software.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Frank Hunleth <fhunleth@troodon-software.com>
Cc: Johan Oudinet <johan.oudinet@gmail.com>

---
Note: I am not sure whether this is the correct solution, to match the
host SSL support to the target SSL support. I'll let the erlang experts
enhance that patch if need be. ;-)
---
 package/erlang/erlang.mk | 3 +++
 1 file changed, 3 insertions(+)

Comments

Frank Hunleth Aug. 14, 2014, 2:43 p.m. UTC | #1
Yann,

On Wed, Aug 13, 2014 at 6:27 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> If the target erlang has SSL support, so shoud the host-erlang.

This patch makes sense to me. I tried it in my setup to make sure that
everything still works fine and that host-erlang is really using
host-openssl. It looks good, so.

Tested-by: Frank Hunleth <fhunleth@troodon-software.com>

Thanks,
Frank

>
> Suggested-by: Frank Hunleth <fhunleth@troodon-software.com>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Frank Hunleth <fhunleth@troodon-software.com>
> Cc: Johan Oudinet <johan.oudinet@gmail.com>
>
> ---
> Note: I am not sure whether this is the correct solution, to match the
> host SSL support to the target SSL support. I'll let the erlang experts
> enhance that patch if need be. ;-)
> ---
>  package/erlang/erlang.mk | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/package/erlang/erlang.mk b/package/erlang/erlang.mk
> index 1278682..b7ff9c1 100644
> --- a/package/erlang/erlang.mk
> +++ b/package/erlang/erlang.mk
> @@ -34,8 +34,11 @@ endif
>  ifeq ($(BR2_PACKAGE_OPENSSL),y)
>  ERLANG_CONF_OPT += --with-ssl
>  ERLANG_DEPENDENCIES += openssl
> +HOST_ERLANG_DEPENDENCIES += host-openssl
> +HOST_ERLANG_CONF_OPT += --with-ssl=$(HOST_DIR)/usr
>  else
>  ERLANG_CONF_OPT += --without-ssl
> +HOST_ERLANG_CONF_OPT += --without-ssl
>  endif
>
>  ifeq ($(BR2_PACKAGE_ZLIB),y)
> --
> 1.9.1
>
Thomas Petazzoni Aug. 15, 2014, 8:36 a.m. UTC | #2
Dear Yann E. MORIN,

On Thu, 14 Aug 2014 00:27:07 +0200, Yann E. MORIN wrote:

> If the target erlang has SSL support, so shoud the host-erlang.

Why?

Thomas
Frank Hunleth Aug. 15, 2014, 12:33 p.m. UTC | #3
Hi Thomas,

On Fri, Aug 15, 2014 at 4:36 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Yann E. MORIN,
>
> On Thu, 14 Aug 2014 00:27:07 +0200, Yann E. MORIN wrote:
>
>> If the target erlang has SSL support, so shoud the host-erlang.
>
> Why?

After more thought, I think that the reasoning should be that the
common Erlang build tools reference openssl. (openssl is used for
Erlang's crypto support, so the moment you run code that computes a
SHA1, you need it.) I'd be fine with host-erlang always having ssl
enabled since the error message you get when you don't have it enabled
is not obvious to anyone who doesn't use Erlang.

Frank
Yann E. MORIN Aug. 15, 2014, 3:43 p.m. UTC | #4
Frank, All,

On 2014-08-15 08:33 -0400, Frank Hunleth spake thusly:
> On Fri, Aug 15, 2014 at 4:36 AM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
> > Dear Yann E. MORIN,
> >
> > On Thu, 14 Aug 2014 00:27:07 +0200, Yann E. MORIN wrote:
> >
> >> If the target erlang has SSL support, so shoud the host-erlang.
> >
> > Why?
> 
> After more thought, I think that the reasoning should be that the
> common Erlang build tools reference openssl. (openssl is used for
> Erlang's crypto support, so the moment you run code that computes a
> SHA1, you need it.) I'd be fine with host-erlang always having ssl
> enabled since the error message you get when you don't have it enabled
> is not obvious to anyone who doesn't use Erlang.

Yes, after giving it more thought, and your input above, I believe we
should always build host-erlang with SSL support.

I'll update my patch accordingly.

Thanks! :-)

Regards,
Yann E. MORIN.
Thomas Petazzoni Aug. 15, 2014, 4:29 p.m. UTC | #5
Dear Yann E. MORIN,

On Fri, 15 Aug 2014 17:43:44 +0200, Yann E. MORIN wrote:

> > After more thought, I think that the reasoning should be that the
> > common Erlang build tools reference openssl. (openssl is used for
> > Erlang's crypto support, so the moment you run code that computes a
> > SHA1, you need it.) I'd be fine with host-erlang always having ssl
> > enabled since the error message you get when you don't have it enabled
> > is not obvious to anyone who doesn't use Erlang.
> 
> Yes, after giving it more thought, and your input above, I believe we
> should always build host-erlang with SSL support.
> 
> I'll update my patch accordingly.

Can you include in the commit log the rationale for this change?

Thanks,

Thomas
Yann E. MORIN Aug. 15, 2014, 4:44 p.m. UTC | #6
Thomas, All,

On 2014-08-15 18:29 +0200, Thomas Petazzoni spake thusly:
> On Fri, 15 Aug 2014 17:43:44 +0200, Yann E. MORIN wrote:
> 
> > > After more thought, I think that the reasoning should be that the
> > > common Erlang build tools reference openssl. (openssl is used for
> > > Erlang's crypto support, so the moment you run code that computes a
> > > SHA1, you need it.) I'd be fine with host-erlang always having ssl
> > > enabled since the error message you get when you don't have it enabled
> > > is not obvious to anyone who doesn't use Erlang.
> > 
> > Yes, after giving it more thought, and your input above, I believe we
> > should always build host-erlang with SSL support.
> > 
> > I'll update my patch accordingly.
> 
> Can you include in the commit log the rationale for this change?

Err.. I think I did, didn't I?
    http://patchwork.ozlabs.org/patch/380305/

;-)

Regards,
Yann E. MORIN.
diff mbox

Patch

diff --git a/package/erlang/erlang.mk b/package/erlang/erlang.mk
index 1278682..b7ff9c1 100644
--- a/package/erlang/erlang.mk
+++ b/package/erlang/erlang.mk
@@ -34,8 +34,11 @@  endif
 ifeq ($(BR2_PACKAGE_OPENSSL),y)
 ERLANG_CONF_OPT += --with-ssl
 ERLANG_DEPENDENCIES += openssl
+HOST_ERLANG_DEPENDENCIES += host-openssl
+HOST_ERLANG_CONF_OPT += --with-ssl=$(HOST_DIR)/usr
 else
 ERLANG_CONF_OPT += --without-ssl
+HOST_ERLANG_CONF_OPT += --without-ssl
 endif
 
 ifeq ($(BR2_PACKAGE_ZLIB),y)