All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [V2 1/3] libtommath: new package
@ 2016-04-01 15:36 Francois Perrad
  2016-04-01 15:36 ` [Buildroot] [V2 2/3] libtomcrypt: " Francois Perrad
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Francois Perrad @ 2016-04-01 15:36 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/Config.in                  |  1 +
 package/libtommath/Config.in       |  7 +++++++
 package/libtommath/libtommath.hash |  2 ++
 package/libtommath/libtommath.mk   | 22 ++++++++++++++++++++++
 4 files changed, 32 insertions(+)
 create mode 100644 package/libtommath/Config.in
 create mode 100644 package/libtommath/libtommath.hash
 create mode 100644 package/libtommath/libtommath.mk

diff --git a/package/Config.in b/package/Config.in
index 7b23519..84df812 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1233,6 +1233,7 @@ menu "Other"
 	source "package/libsigc/Config.in"
 	source "package/libsigsegv/Config.in"
 	source "package/libtasn1/Config.in"
+	source "package/libtommath/Config.in"
 	source "package/libtpl/Config.in"
 	source "package/libubox/Config.in"
 	source "package/libuci/Config.in"
diff --git a/package/libtommath/Config.in b/package/libtommath/Config.in
new file mode 100644
index 0000000..b2ffc72
--- /dev/null
+++ b/package/libtommath/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_LIBTOMMATH
+	bool "libtommath"
+	help
+	  LibTomMath is a free open source portable number theoretic
+	  multiple-precision integer library written entirely in C.
+
+	  http://www.libtom.net
diff --git a/package/libtommath/libtommath.hash b/package/libtommath/libtommath.hash
new file mode 100644
index 0000000..fcf2ddc
--- /dev/null
+++ b/package/libtommath/libtommath.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256  993a7df9ee091fca430cdde3263df57d88ef62af8103903214da49fc51bbb56c  ltm-1.0.tar.xz
diff --git a/package/libtommath/libtommath.mk b/package/libtommath/libtommath.mk
new file mode 100644
index 0000000..a377df1
--- /dev/null
+++ b/package/libtommath/libtommath.mk
@@ -0,0 +1,22 @@
+################################################################################
+#
+# libtommath
+#
+################################################################################
+
+LIBTOMMATH_VERSION = 1.0
+LIBTOMMATH_SITE = https://github.com/libtom/libtommath/releases/download/v$(LIBTOMMATH_VERSION)
+LIBTOMMATH_SOURCE = ltm-$(LIBTOMMATH_VERSION).tar.xz
+LIBTOMMATH_LICENSE = WTFPL
+LIBTOMMATH_LICENSE_FILES = LICENSE
+LIBTOMMATH_INSTALL_STAGING = YES
+
+define LIBTOMMATH_BUILD_CMDS
+	$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="-I./ $(TARGET_CFLAGS)"
+endef
+
+define LIBTOMMATH_INSTALL_STAGING_CMDS
+	$(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" install
+endef
+
+$(eval $(generic-package))
-- 
2.5.0

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

* [Buildroot] [V2 2/3] libtomcrypt: new package
  2016-04-01 15:36 [Buildroot] [V2 1/3] libtommath: new package Francois Perrad
@ 2016-04-01 15:36 ` Francois Perrad
  2016-04-01 15:54   ` Yegor Yefremov
  2016-04-02 14:58   ` Thomas Petazzoni
  2016-04-01 15:36 ` [Buildroot] [V2 3/3] dropbear: use libtomath & libtomcrypt Francois Perrad
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 8+ messages in thread
From: Francois Perrad @ 2016-04-01 15:36 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/Config.in                                  |  1 +
 .../0001-install-without-USER-and-GROUP.patch      | 61 ++++++++++++++++++++++
 package/libtomcrypt/Config.in                      | 11 ++++
 package/libtomcrypt/libtomcrypt.hash               |  2 +
 package/libtomcrypt/libtomcrypt.mk                 | 23 ++++++++
 5 files changed, 98 insertions(+)
 create mode 100644 package/libtomcrypt/0001-install-without-USER-and-GROUP.patch
 create mode 100644 package/libtomcrypt/Config.in
 create mode 100644 package/libtomcrypt/libtomcrypt.hash
 create mode 100644 package/libtomcrypt/libtomcrypt.mk

diff --git a/package/Config.in b/package/Config.in
index 84df812..b38b24b 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -839,6 +839,7 @@ menu "Crypto"
 	source "package/libsodium/Config.in"
 	source "package/libssh/Config.in"
 	source "package/libssh2/Config.in"
+	source "package/libtomcrypt/Config.in"
 	source "package/libuecc/Config.in"
 	source "package/mbedtls/Config.in"
 	source "package/nettle/Config.in"
diff --git a/package/libtomcrypt/0001-install-without-USER-and-GROUP.patch b/package/libtomcrypt/0001-install-without-USER-and-GROUP.patch
new file mode 100644
index 0000000..325d04b
--- /dev/null
+++ b/package/libtomcrypt/0001-install-without-USER-and-GROUP.patch
@@ -0,0 +1,61 @@
+install without USER and GROUP
+
+see https://github.com/libtom/libtomcrypt/pull/115
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+diff --git a/makefile b/makefile
+index f650ea1..b346bed 100644
+--- a/makefile
++++ b/makefile
+@@ -300,19 +300,19 @@ install: library docs
+ else
+ install: library
+ endif
+-	install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
+-	install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
+-	install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(DATAPATH)
+-	install -g $(GROUP) -o $(USER) $(LIBNAME) $(DESTDIR)$(LIBPATH)
+-	install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
++	install -d $(DESTDIR)$(LIBPATH)
++	install -d $(DESTDIR)$(INCPATH)
++	install -d $(DESTDIR)$(DATAPATH)
++	install -m 644 $(LIBNAME) $(DESTDIR)$(LIBPATH)
++	install -m 644 $(HEADERS) $(DESTDIR)$(INCPATH)
+ ifndef NODOCS
+-	install -g $(GROUP) -o $(USER) doc/crypt.pdf $(DESTDIR)$(DATAPATH)
++	install -m 644 doc/crypt.pdf $(DESTDIR)$(DATAPATH)
+ endif
+ 
+ install_test: testprof/$(LIBTEST)
+-	install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
+-	install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
+-	install -g $(GROUP) -o $(USER) testprof/$(LIBTEST) $(DESTDIR)$(LIBPATH)
++	install -d $(DESTDIR)$(LIBPATH)
++	install -d $(DESTDIR)$(INCPATH)
++	install -m 644 testprof/$(LIBTEST) $(DESTDIR)$(LIBPATH)
+ 
+ profile:
+ 	CFLAGS="$(CFLAGS) -fprofile-generate" $(MAKE) timing EXTRALIBS="$(EXTRALIBS) -lgcov"
+diff --git a/makefile.shared b/makefile.shared
+index dd575d9..c5e97af 100644
+--- a/makefile.shared
++++ b/makefile.shared
+@@ -252,11 +252,11 @@ $(LIBNAME): $(OBJECTS) testprof/$(LIBTEST)
+ 	libtool --silent --mode=link gcc $(CFLAGS) `find . -type f | grep "[.]lo" | grep "src/" | xargs` $(EXTRALIBS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
+ 
+ install: $(LIBNAME)
+-	install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
+-	cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) make -f makefile.shared install
++	install -d $(DESTDIR)$(LIBPATH)
++	cd testprof ; CFLAGS="$(CFLAGS)" VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) make -f makefile.shared install
+ 	libtool --silent --mode=install install -c libtomcrypt.la $(DESTDIR)$(LIBPATH)/libtomcrypt.la
+-	install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
+-	install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
++	install -d $(DESTDIR)$(INCPATH)
++	install -m 644 $(HEADERS) $(DESTDIR)$(INCPATH)
+ 
+ #This rule makes the hash program included with libtomcrypt
+ hashsum: library
+-- 
+
diff --git a/package/libtomcrypt/Config.in b/package/libtomcrypt/Config.in
new file mode 100644
index 0000000..6678b30
--- /dev/null
+++ b/package/libtomcrypt/Config.in
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_LIBTOMCRYPT
+	bool "libtomcrypt"
+	select BR2_PACKAGE_LIBTOMMATH
+	help
+	  LibTomCrypt is a fairly comprehensive, modular and portable
+	  cryptographic toolkit that provides developers with a vast array
+	  of well known published block ciphers, one-way hash functions,
+	  chaining modes, pseudo-random number generators, public key
+	  cryptography and a plethora of other routines.
+
+	  http://www.libtom.net
diff --git a/package/libtomcrypt/libtomcrypt.hash b/package/libtomcrypt/libtomcrypt.hash
new file mode 100644
index 0000000..562016d
--- /dev/null
+++ b/package/libtomcrypt/libtomcrypt.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256  e33b47d77a495091c8703175a25c8228aff043140b2554c08a3c3cd71f79d116  crypt-1.17.tar.bz2
diff --git a/package/libtomcrypt/libtomcrypt.mk b/package/libtomcrypt/libtomcrypt.mk
new file mode 100644
index 0000000..073d6e7
--- /dev/null
+++ b/package/libtomcrypt/libtomcrypt.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# libtomcrypt
+#
+################################################################################
+
+LIBTOMCRYPT_VERSION = 1.17
+LIBTOMCRYPT_SITE = https://github.com/libtom/libtomcrypt/releases/download/$(LIBTOMCRYPT_VERSION)
+LIBTOMCRYPT_SOURCE = crypt-$(LIBTOMCRYPT_VERSION).tar.bz2
+LIBTOMCRYPT_LICENSE = WTFPL
+LIBTOMCRYPT_LICENSE_FILES = LICENSE
+LIBTOMCRYPT_INSTALL_STAGING = YES
+LIBTOMCRYPT_DEPENDENCIES = libtommath
+
+define LIBTOMCRYPT_BUILD_CMDS
+	$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="-I./src/headers $(TARGET_CFLAGS) -DLTC_SOURCE -DLTM_DESC"
+endef
+
+define LIBTOMCRYPT_INSTALL_STAGING_CMDS
+	$(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" NODOCS=1 install
+endef
+
+$(eval $(generic-package))
-- 
2.5.0

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

* [Buildroot] [V2 3/3] dropbear: use libtomath & libtomcrypt
  2016-04-01 15:36 [Buildroot] [V2 1/3] libtommath: new package Francois Perrad
  2016-04-01 15:36 ` [Buildroot] [V2 2/3] libtomcrypt: " Francois Perrad
@ 2016-04-01 15:36 ` Francois Perrad
  2016-04-02 15:09   ` Thomas Petazzoni
  2016-04-01 15:55 ` [Buildroot] [V2 1/3] libtommath: new package Yegor Yefremov
  2016-04-02 14:57 ` Thomas Petazzoni
  3 siblings, 1 reply; 8+ messages in thread
From: Francois Perrad @ 2016-04-01 15:36 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 package/dropbear/0001-fix-linking.patch | 36 +++++++++++++++++++++++++++++++++
 package/dropbear/dropbear.mk            |  7 +++++++
 2 files changed, 43 insertions(+)
 create mode 100644 package/dropbear/0001-fix-linking.patch

diff --git a/package/dropbear/0001-fix-linking.patch b/package/dropbear/0001-fix-linking.patch
new file mode 100644
index 0000000..93925eb
--- /dev/null
+++ b/package/dropbear/0001-fix-linking.patch
@@ -0,0 +1,36 @@
+fix linking
+
+see https://github.com/mkj/dropbear/pull/28
+
+Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
+
+diff --git a/Makefile.in b/Makefile.in
+index d9bfdfa..0356b0f 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -16,12 +16,12 @@ endif
+ STATIC_LTC=libtomcrypt/libtomcrypt.a
+ STATIC_LTM=libtommath/libtommath.a
+ 
+-LIBTOM_LIBS=@LIBTOM_LIBS@
++LIBTOM_LIBS=-ltomcrypt -ltommath
+ 
+ ifeq (@BUNDLED_LIBTOM@, 1)
+ LIBTOM_DEPS=$(STATIC_LTC) $(STATIC_LTM) 
+ CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/
+-LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM) 
++LDFLAGS+=-L ./libtomcrypt -L ./libtommath
+ endif
+ 
+ COMMONOBJS=dbutil.o buffer.o dbhelpers.o \
+@@ -84,7 +84,7 @@ INSTALL=@INSTALL@
+ CPPFLAGS=@CPPFLAGS@
+ CFLAGS+=-I. -I$(srcdir) $(CPPFLAGS) @CFLAGS@
+ LIBS+=@LIBS@
+-LDFLAGS=@LDFLAGS@
++LDFLAGS+=@LDFLAGS@
+ 
+ EXEEXT=@EXEEXT@
+ 
+-- 
+
diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk
index 32e2167..f664c8d 100644
--- a/package/dropbear/dropbear.mk
+++ b/package/dropbear/dropbear.mk
@@ -12,6 +12,13 @@ DROPBEAR_LICENSE_FILES = LICENSE
 DROPBEAR_TARGET_BINS = dropbearkey dropbearconvert scp
 DROPBEAR_PROGRAMS = dropbear $(DROPBEAR_TARGET_BINS)
 
+ifeq ($(BR2_PACKAGE_LIBTOMMATH)$(BR2_PACKAGE_LIBTOMCRYPT),yy)
+DROPBEAR_DEPENDENCIES += libtommath libtomcrypt
+DROPBEAR_CONF_OPTS += --disable-bundled-libtom
+else
+DROPBEAR_CONF_OPTS += --enable-bundled-libtom
+endif
+
 ifeq ($(BR2_PACKAGE_DROPBEAR_CLIENT),y)
 # Build dbclient, and create a convenience symlink named ssh
 DROPBEAR_PROGRAMS += dbclient
-- 
2.5.0

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

* [Buildroot] [V2 2/3] libtomcrypt: new package
  2016-04-01 15:36 ` [Buildroot] [V2 2/3] libtomcrypt: " Francois Perrad
@ 2016-04-01 15:54   ` Yegor Yefremov
  2016-04-02 14:58   ` Thomas Petazzoni
  1 sibling, 0 replies; 8+ messages in thread
From: Yegor Yefremov @ 2016-04-01 15:54 UTC (permalink / raw)
  To: buildroot

On Fri, Apr 1, 2016 at 5:36 PM, Francois Perrad <fperrad@gmail.com> wrote:
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>

Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>

> ---
>  package/Config.in                                  |  1 +
>  .../0001-install-without-USER-and-GROUP.patch      | 61 ++++++++++++++++++++++
>  package/libtomcrypt/Config.in                      | 11 ++++
>  package/libtomcrypt/libtomcrypt.hash               |  2 +
>  package/libtomcrypt/libtomcrypt.mk                 | 23 ++++++++
>  5 files changed, 98 insertions(+)
>  create mode 100644 package/libtomcrypt/0001-install-without-USER-and-GROUP.patch
>  create mode 100644 package/libtomcrypt/Config.in
>  create mode 100644 package/libtomcrypt/libtomcrypt.hash
>  create mode 100644 package/libtomcrypt/libtomcrypt.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 84df812..b38b24b 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -839,6 +839,7 @@ menu "Crypto"
>         source "package/libsodium/Config.in"
>         source "package/libssh/Config.in"
>         source "package/libssh2/Config.in"
> +       source "package/libtomcrypt/Config.in"
>         source "package/libuecc/Config.in"
>         source "package/mbedtls/Config.in"
>         source "package/nettle/Config.in"
> diff --git a/package/libtomcrypt/0001-install-without-USER-and-GROUP.patch b/package/libtomcrypt/0001-install-without-USER-and-GROUP.patch
> new file mode 100644
> index 0000000..325d04b
> --- /dev/null
> +++ b/package/libtomcrypt/0001-install-without-USER-and-GROUP.patch
> @@ -0,0 +1,61 @@
> +install without USER and GROUP
> +
> +see https://github.com/libtom/libtomcrypt/pull/115
> +
> +Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> +
> +diff --git a/makefile b/makefile
> +index f650ea1..b346bed 100644
> +--- a/makefile
> ++++ b/makefile
> +@@ -300,19 +300,19 @@ install: library docs
> + else
> + install: library
> + endif
> +-      install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
> +-      install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
> +-      install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(DATAPATH)
> +-      install -g $(GROUP) -o $(USER) $(LIBNAME) $(DESTDIR)$(LIBPATH)
> +-      install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
> ++      install -d $(DESTDIR)$(LIBPATH)
> ++      install -d $(DESTDIR)$(INCPATH)
> ++      install -d $(DESTDIR)$(DATAPATH)
> ++      install -m 644 $(LIBNAME) $(DESTDIR)$(LIBPATH)
> ++      install -m 644 $(HEADERS) $(DESTDIR)$(INCPATH)
> + ifndef NODOCS
> +-      install -g $(GROUP) -o $(USER) doc/crypt.pdf $(DESTDIR)$(DATAPATH)
> ++      install -m 644 doc/crypt.pdf $(DESTDIR)$(DATAPATH)
> + endif
> +
> + install_test: testprof/$(LIBTEST)
> +-      install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
> +-      install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
> +-      install -g $(GROUP) -o $(USER) testprof/$(LIBTEST) $(DESTDIR)$(LIBPATH)
> ++      install -d $(DESTDIR)$(LIBPATH)
> ++      install -d $(DESTDIR)$(INCPATH)
> ++      install -m 644 testprof/$(LIBTEST) $(DESTDIR)$(LIBPATH)
> +
> + profile:
> +       CFLAGS="$(CFLAGS) -fprofile-generate" $(MAKE) timing EXTRALIBS="$(EXTRALIBS) -lgcov"
> +diff --git a/makefile.shared b/makefile.shared
> +index dd575d9..c5e97af 100644
> +--- a/makefile.shared
> ++++ b/makefile.shared
> +@@ -252,11 +252,11 @@ $(LIBNAME): $(OBJECTS) testprof/$(LIBTEST)
> +       libtool --silent --mode=link gcc $(CFLAGS) `find . -type f | grep "[.]lo" | grep "src/" | xargs` $(EXTRALIBS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
> +
> + install: $(LIBNAME)
> +-      install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
> +-      cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) make -f makefile.shared install
> ++      install -d $(DESTDIR)$(LIBPATH)
> ++      cd testprof ; CFLAGS="$(CFLAGS)" VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) make -f makefile.shared install
> +       libtool --silent --mode=install install -c libtomcrypt.la $(DESTDIR)$(LIBPATH)/libtomcrypt.la
> +-      install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
> +-      install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
> ++      install -d $(DESTDIR)$(INCPATH)
> ++      install -m 644 $(HEADERS) $(DESTDIR)$(INCPATH)
> +
> + #This rule makes the hash program included with libtomcrypt
> + hashsum: library
> +--
> +
> diff --git a/package/libtomcrypt/Config.in b/package/libtomcrypt/Config.in
> new file mode 100644
> index 0000000..6678b30
> --- /dev/null
> +++ b/package/libtomcrypt/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_LIBTOMCRYPT
> +       bool "libtomcrypt"
> +       select BR2_PACKAGE_LIBTOMMATH
> +       help
> +         LibTomCrypt is a fairly comprehensive, modular and portable
> +         cryptographic toolkit that provides developers with a vast array
> +         of well known published block ciphers, one-way hash functions,
> +         chaining modes, pseudo-random number generators, public key
> +         cryptography and a plethora of other routines.
> +
> +         http://www.libtom.net
> diff --git a/package/libtomcrypt/libtomcrypt.hash b/package/libtomcrypt/libtomcrypt.hash
> new file mode 100644
> index 0000000..562016d
> --- /dev/null
> +++ b/package/libtomcrypt/libtomcrypt.hash
> @@ -0,0 +1,2 @@
> +# Locally computed
> +sha256  e33b47d77a495091c8703175a25c8228aff043140b2554c08a3c3cd71f79d116  crypt-1.17.tar.bz2
> diff --git a/package/libtomcrypt/libtomcrypt.mk b/package/libtomcrypt/libtomcrypt.mk
> new file mode 100644
> index 0000000..073d6e7
> --- /dev/null
> +++ b/package/libtomcrypt/libtomcrypt.mk
> @@ -0,0 +1,23 @@
> +################################################################################
> +#
> +# libtomcrypt
> +#
> +################################################################################
> +
> +LIBTOMCRYPT_VERSION = 1.17
> +LIBTOMCRYPT_SITE = https://github.com/libtom/libtomcrypt/releases/download/$(LIBTOMCRYPT_VERSION)
> +LIBTOMCRYPT_SOURCE = crypt-$(LIBTOMCRYPT_VERSION).tar.bz2
> +LIBTOMCRYPT_LICENSE = WTFPL
> +LIBTOMCRYPT_LICENSE_FILES = LICENSE
> +LIBTOMCRYPT_INSTALL_STAGING = YES
> +LIBTOMCRYPT_DEPENDENCIES = libtommath
> +
> +define LIBTOMCRYPT_BUILD_CMDS
> +       $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="-I./src/headers $(TARGET_CFLAGS) -DLTC_SOURCE -DLTM_DESC"
> +endef
> +
> +define LIBTOMCRYPT_INSTALL_STAGING_CMDS
> +       $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" NODOCS=1 install
> +endef
> +
> +$(eval $(generic-package))
> --
> 2.5.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [V2 1/3] libtommath: new package
  2016-04-01 15:36 [Buildroot] [V2 1/3] libtommath: new package Francois Perrad
  2016-04-01 15:36 ` [Buildroot] [V2 2/3] libtomcrypt: " Francois Perrad
  2016-04-01 15:36 ` [Buildroot] [V2 3/3] dropbear: use libtomath & libtomcrypt Francois Perrad
@ 2016-04-01 15:55 ` Yegor Yefremov
  2016-04-02 14:57 ` Thomas Petazzoni
  3 siblings, 0 replies; 8+ messages in thread
From: Yegor Yefremov @ 2016-04-01 15:55 UTC (permalink / raw)
  To: buildroot

On Fri, Apr 1, 2016 at 5:36 PM, Francois Perrad <fperrad@gmail.com> wrote:
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>

Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com>

> ---
>  package/Config.in                  |  1 +
>  package/libtommath/Config.in       |  7 +++++++
>  package/libtommath/libtommath.hash |  2 ++
>  package/libtommath/libtommath.mk   | 22 ++++++++++++++++++++++
>  4 files changed, 32 insertions(+)
>  create mode 100644 package/libtommath/Config.in
>  create mode 100644 package/libtommath/libtommath.hash
>  create mode 100644 package/libtommath/libtommath.mk
>
> diff --git a/package/Config.in b/package/Config.in
> index 7b23519..84df812 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1233,6 +1233,7 @@ menu "Other"
>         source "package/libsigc/Config.in"
>         source "package/libsigsegv/Config.in"
>         source "package/libtasn1/Config.in"
> +       source "package/libtommath/Config.in"
>         source "package/libtpl/Config.in"
>         source "package/libubox/Config.in"
>         source "package/libuci/Config.in"
> diff --git a/package/libtommath/Config.in b/package/libtommath/Config.in
> new file mode 100644
> index 0000000..b2ffc72
> --- /dev/null
> +++ b/package/libtommath/Config.in
> @@ -0,0 +1,7 @@
> +config BR2_PACKAGE_LIBTOMMATH
> +       bool "libtommath"
> +       help
> +         LibTomMath is a free open source portable number theoretic
> +         multiple-precision integer library written entirely in C.
> +
> +         http://www.libtom.net
> diff --git a/package/libtommath/libtommath.hash b/package/libtommath/libtommath.hash
> new file mode 100644
> index 0000000..fcf2ddc
> --- /dev/null
> +++ b/package/libtommath/libtommath.hash
> @@ -0,0 +1,2 @@
> +# Locally computed
> +sha256  993a7df9ee091fca430cdde3263df57d88ef62af8103903214da49fc51bbb56c  ltm-1.0.tar.xz
> diff --git a/package/libtommath/libtommath.mk b/package/libtommath/libtommath.mk
> new file mode 100644
> index 0000000..a377df1
> --- /dev/null
> +++ b/package/libtommath/libtommath.mk
> @@ -0,0 +1,22 @@
> +################################################################################
> +#
> +# libtommath
> +#
> +################################################################################
> +
> +LIBTOMMATH_VERSION = 1.0
> +LIBTOMMATH_SITE = https://github.com/libtom/libtommath/releases/download/v$(LIBTOMMATH_VERSION)
> +LIBTOMMATH_SOURCE = ltm-$(LIBTOMMATH_VERSION).tar.xz
> +LIBTOMMATH_LICENSE = WTFPL
> +LIBTOMMATH_LICENSE_FILES = LICENSE
> +LIBTOMMATH_INSTALL_STAGING = YES
> +
> +define LIBTOMMATH_BUILD_CMDS
> +       $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="-I./ $(TARGET_CFLAGS)"
> +endef
> +
> +define LIBTOMMATH_INSTALL_STAGING_CMDS
> +       $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" install
> +endef
> +
> +$(eval $(generic-package))
> --
> 2.5.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [V2 1/3] libtommath: new package
  2016-04-01 15:36 [Buildroot] [V2 1/3] libtommath: new package Francois Perrad
                   ` (2 preceding siblings ...)
  2016-04-01 15:55 ` [Buildroot] [V2 1/3] libtommath: new package Yegor Yefremov
@ 2016-04-02 14:57 ` Thomas Petazzoni
  3 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2016-04-02 14:57 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri,  1 Apr 2016 17:36:11 +0200, Francois Perrad wrote:

> diff --git a/package/libtommath/libtommath.mk b/package/libtommath/libtommath.mk
> new file mode 100644
> index 0000000..a377df1
> --- /dev/null
> +++ b/package/libtommath/libtommath.mk
> @@ -0,0 +1,22 @@
> +################################################################################
> +#
> +# libtommath
> +#
> +################################################################################
> +
> +LIBTOMMATH_VERSION = 1.0
> +LIBTOMMATH_SITE = https://github.com/libtom/libtommath/releases/download/v$(LIBTOMMATH_VERSION)
> +LIBTOMMATH_SOURCE = ltm-$(LIBTOMMATH_VERSION).tar.xz
> +LIBTOMMATH_LICENSE = WTFPL
> +LIBTOMMATH_LICENSE_FILES = LICENSE
> +LIBTOMMATH_INSTALL_STAGING = YES
> +
> +define LIBTOMMATH_BUILD_CMDS
> +	$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="-I./ $(TARGET_CFLAGS)"
> +endef
> +
> +define LIBTOMMATH_INSTALL_STAGING_CMDS
> +	$(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" install
> +endef
> +
> +$(eval $(generic-package))

I guess if there is no INSTALL_TARGET_CMDS, it's because this library
only installs a static variant, right? If that's the case, then doing
LIBTOMMATH_INSTALL_TARGET = NO is a good idea, with a comment above it
that explains why.

Thanks!

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

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

* [Buildroot] [V2 2/3] libtomcrypt: new package
  2016-04-01 15:36 ` [Buildroot] [V2 2/3] libtomcrypt: " Francois Perrad
  2016-04-01 15:54   ` Yegor Yefremov
@ 2016-04-02 14:58   ` Thomas Petazzoni
  1 sibling, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2016-04-02 14:58 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri,  1 Apr 2016 17:36:12 +0200, Francois Perrad wrote:
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  package/Config.in                                  |  1 +
>  .../0001-install-without-USER-and-GROUP.patch      | 61 ++++++++++++++++++++++

Instead of this patch, can you try passing:

	USER=$(id -u) GROUP=$(id -g)

in the make options ?

> new file mode 100644
> index 0000000..073d6e7
> --- /dev/null
> +++ b/package/libtomcrypt/libtomcrypt.mk
> @@ -0,0 +1,23 @@
> +################################################################################
> +#
> +# libtomcrypt
> +#
> +################################################################################
> +
> +LIBTOMCRYPT_VERSION = 1.17
> +LIBTOMCRYPT_SITE = https://github.com/libtom/libtomcrypt/releases/download/$(LIBTOMCRYPT_VERSION)
> +LIBTOMCRYPT_SOURCE = crypt-$(LIBTOMCRYPT_VERSION).tar.bz2
> +LIBTOMCRYPT_LICENSE = WTFPL
> +LIBTOMCRYPT_LICENSE_FILES = LICENSE
> +LIBTOMCRYPT_INSTALL_STAGING = YES
> +LIBTOMCRYPT_DEPENDENCIES = libtommath
> +
> +define LIBTOMCRYPT_BUILD_CMDS
> +	$(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="-I./src/headers $(TARGET_CFLAGS) -DLTC_SOURCE -DLTM_DESC"
> +endef
> +
> +define LIBTOMCRYPT_INSTALL_STAGING_CMDS
> +	$(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" NODOCS=1 install
> +endef

Same comment as libtommath regarding staging/target installation.

Best regards,

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

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

* [Buildroot] [V2 3/3] dropbear: use libtomath & libtomcrypt
  2016-04-01 15:36 ` [Buildroot] [V2 3/3] dropbear: use libtomath & libtomcrypt Francois Perrad
@ 2016-04-02 15:09   ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2016-04-02 15:09 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri,  1 Apr 2016 17:36:13 +0200, Francois Perrad wrote:

> +ifeq ($(BR2_PACKAGE_LIBTOMMATH)$(BR2_PACKAGE_LIBTOMCRYPT),yy)
> +DROPBEAR_DEPENDENCIES += libtommath libtomcrypt
> +DROPBEAR_CONF_OPTS += --disable-bundled-libtom
> +else
> +DROPBEAR_CONF_OPTS += --enable-bundled-libtom
> +endif

Our principle is to avoid bundled libraries when possible. So should we
make Dropnbear always select libtommath/libtomcrypt ?

We could make an exception for Dropbear, as its main point is to be
small and fast to build, and unbundling will necessarily mean a
slightly longer build.

With bundled libraries (i.e original, building dropbear only) :

real	0m19.178s
user	0m35.240s
sys	0m5.308s

With unbundled libraries (i.e with libtommath/libtomcrypt built
separately) :

real	0m23.593s
user	0m50.500s
sys	0m6.000s

Not super significant change. So I think I'm in favor of unbundling.

Other opinions?

Best regards,

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

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

end of thread, other threads:[~2016-04-02 15:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-01 15:36 [Buildroot] [V2 1/3] libtommath: new package Francois Perrad
2016-04-01 15:36 ` [Buildroot] [V2 2/3] libtomcrypt: " Francois Perrad
2016-04-01 15:54   ` Yegor Yefremov
2016-04-02 14:58   ` Thomas Petazzoni
2016-04-01 15:36 ` [Buildroot] [V2 3/3] dropbear: use libtomath & libtomcrypt Francois Perrad
2016-04-02 15:09   ` Thomas Petazzoni
2016-04-01 15:55 ` [Buildroot] [V2 1/3] libtommath: new package Yegor Yefremov
2016-04-02 14:57 ` Thomas Petazzoni

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.