mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [RFC PATCH 1/2] nettle: add explicit support for libhogweed
Date: Thu, 9 Mar 2017 16:19:29 +0100	[thread overview]
Message-ID: <20170309151929.cjddctmtqxtbismz@pengutronix.de> (raw)
In-Reply-To: <1489052227-15936-2-git-send-email-niebelm@tqsc.de>

On Thu, Mar 09, 2017 at 10:37:06AM +0100, Markus Niebel wrote:
> From: Markus Niebel <Markus.Niebel@tq-group.com>
> 
> the libhogweed part requires libgmp. Let's make it configurable.
> 

This seems wrong. My understanding is, that the --enable-mini-gmp options
exists to avoid the libgmp dependency by providing a minimalistic version
of libgmp.
If we want to use the 'real' libgmp (Are there any compelling reasons to do
so?) then the --enable-mini-gmp must be _disabled_ if libhogweed is
installed not the other way around.

Also, the '--with-nettle-mini' of gnutls must be changed to 'without'. And
all other nettle users must be reviewed to check if they need libhogweed.

Michael

> Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
> 
> Conflicts:
> 	rules/nettle.in
> ---
>  rules/nettle.in   | 14 +++++++++++++-
>  rules/nettle.make | 11 ++++++++++-
>  2 files changed, 23 insertions(+), 2 deletions(-)
> 
> diff --git a/rules/nettle.in b/rules/nettle.in
> index fcacb96..f931994 100644
> --- a/rules/nettle.in
> +++ b/rules/nettle.in
> @@ -1,8 +1,20 @@
>  ## SECTION=networking
>  
> -config NETTLE
> +menuconfig NETTLE
>  	tristate
>  	prompt "nettle"
> +	select LIBGMP if NETTLE_LIBHOGWEED
>  	help
>  	  Nettle is a cryptographic library.
>  
> +if NETTLE
> +
> +config NETTLE_LIBHOGWEED
> +	bool
> +	prompt "Build libhogweed"
> +	help
> +	  The libhogweed library contains those functions of Nettle that
> +	  uses bignum operations, and depends on the GMP library
> +
> +endif
> +
> diff --git a/rules/nettle.make b/rules/nettle.make
> index 59df66e..23d6cb8 100644
> --- a/rules/nettle.make
> +++ b/rules/nettle.make
> @@ -48,8 +48,15 @@ NETTLE_CONF_OPT		:= \
>  	--disable-documentation \
>  	--disable-fat \
>  	--$(call ptx/endis,PTXCONF_ARCH_ARM_NEON)-arm-neon \
> -	--disable-x86-aesni \
> +	--disable-x86-aesni
> +
> +ifdef PTXCONF_NETTLE_LIBHOGWEED
> +NETTLE_CONF_OPT		+= \
>  	--enable-mini-gmp
> +else
> +NETTLE_CONF_OPT		+= \
> +	--disable-mini-gmp
> +endif
>  
>  # ----------------------------------------------------------------------------
>  # Target-Install
> @@ -65,7 +72,9 @@ $(STATEDIR)/nettle.targetinstall:
>  	@$(call install_fixup, nettle,DESCRIPTION,missing)
>  
>  	@$(call install_lib, nettle, 0, 0, 0644, libnettle)
> +ifdef PTXCONF_NETTLE_LIBHOGWEED
>  	@$(call install_lib, nettle, 0, 0, 0644, libhogweed)
> +endif
>  	@$(call install_copy, nettle, 0, 0, 0755, -, /usr/bin/nettle-hash)
>  	@$(call install_copy, nettle, 0, 0, 0755, -, /usr/bin/sexp-conv)
>  	@$(call install_copy, nettle, 0, 0, 0755, -, /usr/bin/nettle-lfib-stream)
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2017-03-09 15:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09  9:37 [ptxdist] [RFC PATCH 0/2] fix indirect gnutls dependency Markus Niebel
2017-03-09  9:37 ` [ptxdist] [RFC PATCH 1/2] nettle: add explicit support for libhogweed Markus Niebel
2017-03-09 15:19   ` Michael Olbrich [this message]
2017-03-09 16:41     ` Markus Niebel
2017-03-09 17:25       ` Michael Olbrich
2017-03-09 17:32         ` Markus Niebel
2017-03-09 17:27       ` Clemens Gruber
2017-03-09  9:37 ` [ptxdist] [RFC PATCH 2/2] gnutls: needs libhogweed from nettle Markus Niebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170309151929.cjddctmtqxtbismz@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox