All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/2] libsodium: new package
@ 2015-05-18 13:19 Frank Hunleth
  2015-05-18 13:19 ` [Buildroot] [PATCH v2 2/2] zeromq: depend on libsodium if available Frank Hunleth
  2015-05-18 15:31 ` [Buildroot] [PATCH v2 1/2] libsodium: new package Baruch Siach
  0 siblings, 2 replies; 6+ messages in thread
From: Frank Hunleth @ 2015-05-18 13:19 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
---
Changes v1 -> v2:
  - fix curly braces on variables (thanks to Thomas for noticing)
  - added patch for zeromq (in separate patch) to address libsodium
    dependency in that library (thanks to Romain for this). I didn't
    find any other packages with a similar dependency, but it's not
    that easy to do that search.

 package/Config.in                |  1 +
 package/libsodium/Config.in      |  6 ++++++
 package/libsodium/libsodium.hash |  2 ++
 package/libsodium/libsodium.mk   | 14 ++++++++++++++
 4 files changed, 23 insertions(+)
 create mode 100644 package/libsodium/Config.in
 create mode 100644 package/libsodium/libsodium.hash
 create mode 100644 package/libsodium/libsodium.mk

diff --git a/package/Config.in b/package/Config.in
index e0c2e2a..5b99639 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -723,6 +723,7 @@ menu "Crypto"
 	source "package/libnss/Config.in"
 	source "package/libsecret/Config.in"
 	source "package/libsha1/Config.in"
+	source "package/libsodium/Config.in"
 	source "package/libssh2/Config.in"
 	source "package/nettle/Config.in"
 	source "package/openssl/Config.in"
diff --git a/package/libsodium/Config.in b/package/libsodium/Config.in
new file mode 100644
index 0000000..47b9bb3
--- /dev/null
+++ b/package/libsodium/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_LIBSODIUM
+	bool "libsodium"
+	help
+	  A modern and easy-to-use crypto library.
+
+	  http://libsodium.org/
diff --git a/package/libsodium/libsodium.hash b/package/libsodium/libsodium.hash
new file mode 100644
index 0000000..089dc03
--- /dev/null
+++ b/package/libsodium/libsodium.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256	cbcfc63cc90c05d18a20f229a62c7e7054a73731d0aa858c0517152c549b1288	libsodium-1.0.3.tar.gz
diff --git a/package/libsodium/libsodium.mk b/package/libsodium/libsodium.mk
new file mode 100644
index 0000000..f58c324
--- /dev/null
+++ b/package/libsodium/libsodium.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# libsodium
+#
+################################################################################
+
+LIBSODIUM_VERSION = 1.0.3
+LIBSODIUM_SITE = https://github.com/jedisct1/libsodium/releases/download/$(LIBSODIUM_VERSION)
+LIBSODIUM_LICENSE = ISC
+LIBSODIUM_LICENSE_FILES = LICENSE
+LIBSODIUM_INSTALL_STAGING = YES
+
+$(eval $(autotools-package))
+$(eval $(host-autotools-package))
--
2.1.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2 2/2] zeromq: depend on libsodium if available
  2015-05-18 13:19 [Buildroot] [PATCH v2 1/2] libsodium: new package Frank Hunleth
@ 2015-05-18 13:19 ` Frank Hunleth
  2015-05-18 15:31 ` [Buildroot] [PATCH v2 1/2] libsodium: new package Baruch Siach
  1 sibling, 0 replies; 6+ messages in thread
From: Frank Hunleth @ 2015-05-18 13:19 UTC (permalink / raw)
  To: buildroot

ZeroMQ doesn't require libsodium, but will enable CURVE security if it's
available. This patch adds the optional dependency.

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
---
 package/zeromq/zeromq.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/zeromq/zeromq.mk b/package/zeromq/zeromq.mk
index 7e9ed19..a876d5e 100644
--- a/package/zeromq/zeromq.mk
+++ b/package/zeromq/zeromq.mk
@@ -34,4 +34,10 @@ ZEROMQ_DEPENDENCIES += host-pkgconf openpgm
 ZEROMQ_CONF_OPTS += --with-system-pgm
 endif
 
+# ZeroMQ uses libsodium if it's available.
+ifeq ($(BR2_PACKAGE_LIBSODIUM), y)
+ZEROMQ_DEPENDENCIES += libsodium
+ZEROMQ_CONF_OPTS += --with-libsodium="$(STAGING_DIR)/usr"
+endif
+
 $(eval $(autotools-package))
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2 1/2] libsodium: new package
  2015-05-18 13:19 [Buildroot] [PATCH v2 1/2] libsodium: new package Frank Hunleth
  2015-05-18 13:19 ` [Buildroot] [PATCH v2 2/2] zeromq: depend on libsodium if available Frank Hunleth
@ 2015-05-18 15:31 ` Baruch Siach
  2015-05-18 16:07   ` Frank Hunleth
  1 sibling, 1 reply; 6+ messages in thread
From: Baruch Siach @ 2015-05-18 15:31 UTC (permalink / raw)
  To: buildroot

Hi Frank,

On Mon, May 18, 2015 at 09:19:03AM -0400, Frank Hunleth wrote:
> diff --git a/package/libsodium/libsodium.mk b/package/libsodium/libsodium.mk
> new file mode 100644
> index 0000000..f58c324
> --- /dev/null
> +++ b/package/libsodium/libsodium.mk
> @@ -0,0 +1,14 @@
> +################################################################################
> +#
> +# libsodium
> +#
> +################################################################################
> +
> +LIBSODIUM_VERSION = 1.0.3
> +LIBSODIUM_SITE = https://github.com/jedisct1/libsodium/releases/download/$(LIBSODIUM_VERSION)
> +LIBSODIUM_LICENSE = ISC
> +LIBSODIUM_LICENSE_FILES = LICENSE
> +LIBSODIUM_INSTALL_STAGING = YES
> +
> +$(eval $(autotools-package))
> +$(eval $(host-autotools-package))

The host package is still here. Please remove.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2 1/2] libsodium: new package
  2015-05-18 15:31 ` [Buildroot] [PATCH v2 1/2] libsodium: new package Baruch Siach
@ 2015-05-18 16:07   ` Frank Hunleth
  2015-05-18 19:53     ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Frank Hunleth @ 2015-05-18 16:07 UTC (permalink / raw)
  To: buildroot

On Mon, May 18, 2015 at 11:31 AM, Baruch Siach <baruch@tkos.co.il> wrote:
> Hi Frank,
>
> On Mon, May 18, 2015 at 09:19:03AM -0400, Frank Hunleth wrote:
>> diff --git a/package/libsodium/libsodium.mk b/package/libsodium/libsodium.mk
>> new file mode 100644
>> index 0000000..f58c324
>> --- /dev/null
>> +++ b/package/libsodium/libsodium.mk
>> @@ -0,0 +1,14 @@
>> +################################################################################
>> +#
>> +# libsodium
>> +#
>> +################################################################################
>> +
>> +LIBSODIUM_VERSION = 1.0.3
>> +LIBSODIUM_SITE = https://github.com/jedisct1/libsodium/releases/download/$(LIBSODIUM_VERSION)
>> +LIBSODIUM_LICENSE = ISC
>> +LIBSODIUM_LICENSE_FILES = LICENSE
>> +LIBSODIUM_INSTALL_STAGING = YES
>> +
>> +$(eval $(autotools-package))
>> +$(eval $(host-autotools-package))
>
> The host package is still here. Please remove.

As I said in a previous email, I use the host package and asked for
guidance for including host packages or not. I didn't see a response.
While I certainly don't mind removing it, it would be nice to know why
host packages are such a problem. For me, it is very convenient that
Buildroot requires so little of the host Linux environment to work.
Libsodium, in particular, is annoying since you can't apt-get install
it in Ubuntu 12.04. I know that's old, but it's around. Anyway, that's
my 2 cents. It will be gone for v3...

Frank

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2 1/2] libsodium: new package
  2015-05-18 16:07   ` Frank Hunleth
@ 2015-05-18 19:53     ` Thomas Petazzoni
  2015-05-19 12:05       ` Frank Hunleth
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-05-18 19:53 UTC (permalink / raw)
  To: buildroot

Dear Frank Hunleth,

On Mon, 18 May 2015 12:07:24 -0400, Frank Hunleth wrote:

> As I said in a previous email, I use the host package and asked for
> guidance for including host packages or not. I didn't see a response.
> While I certainly don't mind removing it, it would be nice to know why
> host packages are such a problem. For me, it is very convenient that
> Buildroot requires so little of the host Linux environment to work.
> Libsodium, in particular, is annoying since you can't apt-get install
> it in Ubuntu 12.04. I know that's old, but it's around. Anyway, that's
> my 2 cents. It will be gone for v3...

The thing is that we generally don't like to have "dangling" packages,
that are not used by anything in Buildroot.

Normally, host packages fall into one of the two following categories:

 * Used as a dependency to build a target package. In this case, the
   host package is listed as host-<foo> in the <pkg>_DEPENDENCIES of
   another package. So it is actually used by something in Buildroot.

 * Used as a tool (for flashing, creating images, debugging, etc.) and
   in this case, it's listed in the "Host utilities" menu in
   menuconfig. In this case, it is directly visible to the user.

But what you propose here does not fall into any of these two cases. We
don't put host libraries in the "Host utilities" menu, and your host
package is not used by any other package in Buildroot, hence Baruch's
reaction.

I think we may have made a couple of exceptions in the past, but I'm
not sure how many. And they still have the major drawback that such
packages will never be tested, because they cannot be reached by
autobuilder testing.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2 1/2] libsodium: new package
  2015-05-18 19:53     ` Thomas Petazzoni
@ 2015-05-19 12:05       ` Frank Hunleth
  0 siblings, 0 replies; 6+ messages in thread
From: Frank Hunleth @ 2015-05-19 12:05 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Mon, May 18, 2015 at 3:53 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Frank Hunleth,
>
> On Mon, 18 May 2015 12:07:24 -0400, Frank Hunleth wrote:
>
>> As I said in a previous email, I use the host package and asked for
>> guidance for including host packages or not. I didn't see a response.
>> While I certainly don't mind removing it, it would be nice to know why
>> host packages are such a problem. For me, it is very convenient that
>> Buildroot requires so little of the host Linux environment to work.
>> Libsodium, in particular, is annoying since you can't apt-get install
>> it in Ubuntu 12.04. I know that's old, but it's around. Anyway, that's
>> my 2 cents. It will be gone for v3...
>
> The thing is that we generally don't like to have "dangling" packages,
> that are not used by anything in Buildroot.
>
> Normally, host packages fall into one of the two following categories:
>
>  * Used as a dependency to build a target package. In this case, the
>    host package is listed as host-<foo> in the <pkg>_DEPENDENCIES of
>    another package. So it is actually used by something in Buildroot.
>
>  * Used as a tool (for flashing, creating images, debugging, etc.) and
>    in this case, it's listed in the "Host utilities" menu in
>    menuconfig. In this case, it is directly visible to the user.
>
> But what you propose here does not fall into any of these two cases. We
> don't put host libraries in the "Host utilities" menu, and your host
> package is not used by any other package in Buildroot, hence Baruch's
> reaction.
>
> I think we may have made a couple of exceptions in the past, but I'm
> not sure how many. And they still have the major drawback that such
> packages will never be tested, because they cannot be reached by
> autobuilder testing.

Thanks for the explanation. That encourages me to get the host utility
that uses libsodium submitted. :)

A follow-up patch for libsodium is coming shortly. Hopefully this one
passes muster.

Thanks,
Frank

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-19 12:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-18 13:19 [Buildroot] [PATCH v2 1/2] libsodium: new package Frank Hunleth
2015-05-18 13:19 ` [Buildroot] [PATCH v2 2/2] zeromq: depend on libsodium if available Frank Hunleth
2015-05-18 15:31 ` [Buildroot] [PATCH v2 1/2] libsodium: new package Baruch Siach
2015-05-18 16:07   ` Frank Hunleth
2015-05-18 19:53     ` Thomas Petazzoni
2015-05-19 12:05       ` Frank Hunleth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.