* [Buildroot] [PATCH 1/4] host-go-glide: new package
2018-09-28 13:59 [Buildroot] [PATCH 0/4] Initial support to blockchain clients Fabio Urquiza
@ 2018-09-28 13:59 ` Fabio Urquiza
2019-08-03 14:33 ` Yann E. MORIN
2018-09-28 13:59 ` [Buildroot] [PATCH 2/4] bitcoin: " Fabio Urquiza
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Fabio Urquiza @ 2018-09-28 13:59 UTC (permalink / raw)
To: buildroot
From: Fabio Urquiza <flus@dmz.org.br>
A package management for Golang.
Signed-off-by: Fabio Urquiza <fabiorush@gmail.com>
---
package/Config.in.host | 1 +
package/go-glide/Config.in.host | 12 ++++++++++++
package/go-glide/go-glide.hash | 3 +++
package/go-glide/go-glide.mk | 14 ++++++++++++++
package/pkg-golang.mk | 36 ++++++++++++++++++++++++++++++++----
5 files changed, 62 insertions(+), 4 deletions(-)
create mode 100644 package/go-glide/Config.in.host
create mode 100644 package/go-glide/go-glide.hash
create mode 100644 package/go-glide/go-glide.mk
diff --git a/package/Config.in.host b/package/Config.in.host
index 3a3578c..e8b6019 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -24,6 +24,7 @@ menu "Host utilities"
source "package/gnupg/Config.in.host"
source "package/go/Config.in.host"
source "package/go-bootstrap/Config.in.host"
+ source "package/go-glide/Config.in.host"
source "package/google-breakpad/Config.in.host"
source "package/gptfdisk/Config.in.host"
source "package/imx-mkimage/Config.in.host"
diff --git a/package/go-glide/Config.in.host b/package/go-glide/Config.in.host
new file mode 100644
index 0000000..5d085f9
--- /dev/null
+++ b/package/go-glide/Config.in.host
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_HOST_GO_GLIDE
+ bool "host glide"
+ depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+ help
+ Glide is a tool for managing the _vendor_ directory within a Go
+ package. This feature, first introduced in Go 1.5, allows each
+ package to have a _vendor_ directory containing dependent
+ packages for the project. These vendor packages can be
+ installed by a tool (e.g. glide), similar to go get or they
+ can be vendored and distributed with the package.
+
+ https://github.com/Masterminds/glide
diff --git a/package/go-glide/go-glide.hash b/package/go-glide/go-glide.hash
new file mode 100644
index 0000000..856a0f7
--- /dev/null
+++ b/package/go-glide/go-glide.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 0886851af2437b161d47b279a32bef426577e7bec3f5acdadebe34549aae8270 go-glide-v0.13.2.tar.gz
+sha256 ff505b08691ce248f27dfe94d605419e6514c8b60912c7f4188a3e3168ad338f LICENSE
diff --git a/package/go-glide/go-glide.mk b/package/go-glide/go-glide.mk
new file mode 100644
index 0000000..f3eecc1
--- /dev/null
+++ b/package/go-glide/go-glide.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# glide
+#
+################################################################################
+
+GO_GLIDE_VERSION = v0.13.2
+GO_GLIDE_SITE = $(call github,Masterminds,glide,$(GO_GLIDE_VERSION))
+GO_GLIDE_LICENSE = Glide
+GO_GLIDE_LICENSE_FILES = LICENSE
+HOST_GO_GLIDE_BIN_NAME = glide
+HOST_GO_GLIDE_INSTALL_BINS = glide
+
+$(eval $(host-golang-package))
diff --git a/package/pkg-golang.mk b/package/pkg-golang.mk
index 6eacd14..6405edf 100644
--- a/package/pkg-golang.mk
+++ b/package/pkg-golang.mk
@@ -22,6 +22,7 @@
################################################################################
GO_BIN = $(HOST_DIR)/bin/go
+GLIDE_BIN = $(HOST_DIR)/bin/glide
# We pass an empty GOBIN, otherwise "go install: cannot install
# cross-compiled binaries when GOBIN is set"
@@ -31,6 +32,15 @@ GO_TARGET_ENV = \
GOBIN= \
CGO_ENABLED=$(HOST_GO_CGO_ENABLED)
+GO_HOST_ENV = \
+ GOROOT="$(HOST_GO_ROOT)" \
+ CC="$(HOSTCC_NOCCACHE)" \
+ CXX="$(HOSTCXX_NOCCACHE)" \
+ GOTOOLDIR="$(HOST_GO_TOOLDIR)" \
+ PATH=$(BR_PATH) \
+ GOBIN= \
+ CGO_ENABLED=$(HOST_GO_CGO_ENABLED)
+
################################################################################
# inner-golang-package -- defines how the configuration, compilation and
# installation of a Go package should be done, implements a few hooks to tune
@@ -43,8 +53,6 @@ GO_TARGET_ENV = \
# argument 3 is the uppercase package name, without the HOST_ prefix for host
# packages
# argument 4 is the type (target or host)
-#
-# NOTE Only type target is supported at the moment
################################################################################
define inner-golang-package
@@ -61,6 +69,14 @@ $(2)_BUILD_OPTS += -tags "$$($(2)_TAGS)"
# Target packages need the Go compiler on the host.
$(2)_DEPENDENCIES += host-go
+$(2)_GO_GET ?= NO
+$(2)_GO_GLIDE ?= NO
+
+ifeq ($($(2)_GO_GLIDE),YES)
+$(2)_DEPENDENCIES += host-go-glide
+endif
+
+
$(2)_BUILD_TARGETS ?= .
# If the build target is just ".", then we assume the binary to be
@@ -97,11 +113,14 @@ endif
# file.
ifndef $(2)_BUILD_CMDS
define $(2)_BUILD_CMDS
+ echo $$($(2)_DEPENDENCIES)
$$(foreach d,$$($(2)_BUILD_TARGETS),\
cd $$($(2)_SRC_PATH); \
- $$(GO_TARGET_ENV) \
+ export $(if $(findstring $(4),target),$$(GO_TARGET_ENV),$$(GO_HOST_ENV)) \
GOPATH="$$(@D)/$$($(2)_WORKSPACE)" \
- $$($(2)_GO_ENV) \
+ $$($(2)_GO_ENV) && \
+ $(if $(findstring $($(2)_GO_GLIDE),YES),$$(GLIDE_BIN) install &&) \
+ $(if $(findstring $($(2)_GO_GET),YES),$$(GO_BIN) get -d &&) \
$$(GO_BIN) build -v $$($(2)_BUILD_OPTS) \
-o $$(@D)/bin/$$(or $$($(2)_BIN_NAME),$$(notdir $$(d))) \
./$$(d)
@@ -119,6 +138,14 @@ define $(2)_INSTALL_TARGET_CMDS
endef
endif
+ifndef $(2)_INSTALL_CMDS
+define $(2)_INSTALL_CMDS
+ $$(foreach d,$$($(2)_INSTALL_BINS),\
+ $(INSTALL) -D -m 0755 $$(@D)/bin/$$(d) $(HOST_DIR)/usr/bin/$$(d)
+ )
+endef
+endif
+
# Call the generic package infrastructure to generate the necessary make
# targets
$(call inner-generic-package,$(1),$(2),$(3),$(4))
@@ -130,3 +157,4 @@ endef # inner-golang-package
################################################################################
golang-package = $(call inner-golang-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)
+host-golang-package = $(call inner-golang-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host)
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [Buildroot] [PATCH 2/4] bitcoin: new package
2018-09-28 13:59 [Buildroot] [PATCH 0/4] Initial support to blockchain clients Fabio Urquiza
2018-09-28 13:59 ` [Buildroot] [PATCH 1/4] host-go-glide: new package Fabio Urquiza
@ 2018-09-28 13:59 ` Fabio Urquiza
2019-08-03 17:19 ` Thomas Petazzoni
2018-09-28 13:59 ` [Buildroot] [PATCH 3/4] btcd: " Fabio Urquiza
2018-09-28 13:59 ` [Buildroot] [PATCH 4/4] neutrino: " Fabio Urquiza
3 siblings, 1 reply; 8+ messages in thread
From: Fabio Urquiza @ 2018-09-28 13:59 UTC (permalink / raw)
To: buildroot
Bitcoin Core is an open source project which maintains and releases Bitcoin
client software called ?Bitcoin Core?.
Signed-off-by: Fabio Urquiza <fabiorush@gmail.com>
---
package/Config.in | 4 ++++
package/bitcoin/Config.in | 26 ++++++++++++++++++++++++++
package/bitcoin/bitcoin.hash | 3 +++
package/bitcoin/bitcoin.mk | 17 +++++++++++++++++
4 files changed, 50 insertions(+)
create mode 100644 package/bitcoin/Config.in
create mode 100644 package/bitcoin/bitcoin.hash
create mode 100644 package/bitcoin/bitcoin.mk
diff --git a/package/Config.in b/package/Config.in
index 2810d04..796383a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1971,6 +1971,10 @@ endif
source "package/xtables-addons/Config.in"
source "package/znc/Config.in"
+menu "Blockchain Applications"
+ source "package/bitcoin/Config.in"
+endmenu
+
endmenu
menu "Package managers"
diff --git a/package/bitcoin/Config.in b/package/bitcoin/Config.in
new file mode 100644
index 0000000..cef0e73
--- /dev/null
+++ b/package/bitcoin/Config.in
@@ -0,0 +1,26 @@
+config BR2_PACKAGE_BITCOIN
+ bool "bitcoin"
+ select BR2_TOOLCHAIN_BUILDROOT_USE_SSP
+ select BR2_INSTALL_LIBSTDCPP
+ select BR2_PACKAGE_BOOST
+ select BR2_PACKAGE_BOOST_SYSTEM
+ select BR2_PACKAGE_BOOST_FILESYSTEM
+ select BR2_PACKAGE_BOOST_THREAD
+ select BR2_PACKAGE_BOOST_CHRONO
+ select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
+ select BR2_PACKAGE_OPENSSL
+ select BR2_PACKAGE_LIBEVENT
+ help
+ Bitcoin Core is an open source project which maintains and
+ releases Bitcoin client software called ?Bitcoin Core?.
+
+ It is a direct descendant of the original Bitcoin software
+ client released by Satoshi Nakamoto after he published the
+ famous Bitcoin whitepaper.
+
+ Bitcoin Core consists of both ?full-node? software for fully
+ validating the blockchain as well as a bitcoin wallet. The
+ project also currently maintains related software such as the
+ cryptography library libsecp256k1 and others located at GitHub.
+
+ https://bitcoincore.org
diff --git a/package/bitcoin/bitcoin.hash b/package/bitcoin/bitcoin.hash
new file mode 100644
index 0000000..96edd22
--- /dev/null
+++ b/package/bitcoin/bitcoin.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 c8557b6df5f5cdf67b3ddf6fe501cfc6e0be698f175f16927dd08d6040df7d9f bitcoin-v0.16.3.tar.gz
+sha256 70223369f70e8cb550e75aa74eb86bfa5220fb09c0ba0549d91c36587d15d1a0 COPYING
diff --git a/package/bitcoin/bitcoin.mk b/package/bitcoin/bitcoin.mk
new file mode 100644
index 0000000..58ed17b
--- /dev/null
+++ b/package/bitcoin/bitcoin.mk
@@ -0,0 +1,17 @@
+################################################################################
+#
+# bitcoin
+#
+################################################################################
+
+BITCOIN_VERSION = v0.16.3
+BITCOIN_SITE = $(call github,bitcoin,bitcoin,$(BITCOIN_VERSION))
+BITCOIN_AUTORECONF = YES
+BITCOIN_LICENSE = MIT
+BITCOIN_LICENSE_FILES = COPYING
+BITCOIN_CONF_OPTS = --disable-wallet --disable-tests
+BITCOIN_CONF_OPTS += --with-sysroot=$(STAGING_DIR)
+BITCOIN_CONF_OPTS += --with-boost-libdir=$(STAGING_DIR)/usr/lib/
+BITCOIN_DEPENDENCIES = boost openssl libevent
+
+$(eval $(autotools-package))
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 3/4] btcd: new package
2018-09-28 13:59 [Buildroot] [PATCH 0/4] Initial support to blockchain clients Fabio Urquiza
2018-09-28 13:59 ` [Buildroot] [PATCH 1/4] host-go-glide: new package Fabio Urquiza
2018-09-28 13:59 ` [Buildroot] [PATCH 2/4] bitcoin: " Fabio Urquiza
@ 2018-09-28 13:59 ` Fabio Urquiza
2018-10-12 16:09 ` Adam Duskett
2018-09-28 13:59 ` [Buildroot] [PATCH 4/4] neutrino: " Fabio Urquiza
3 siblings, 1 reply; 8+ messages in thread
From: Fabio Urquiza @ 2018-09-28 13:59 UTC (permalink / raw)
To: buildroot
An alternative full node bitcoin implementation written in Go (golang).
Signed-off-by: Fabio Urquiza <fabiorush@gmail.com>
---
package/Config.in | 1 +
package/btcd/Config.in | 10 ++++++++++
package/btcd/btcd.hash | 3 +++
package/btcd/btcd.mk | 15 +++++++++++++++
4 files changed, 29 insertions(+)
create mode 100644 package/btcd/Config.in
create mode 100644 package/btcd/btcd.hash
create mode 100644 package/btcd/btcd.mk
diff --git a/package/Config.in b/package/Config.in
index 796383a..6a74a80 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1973,6 +1973,7 @@ endif
menu "Blockchain Applications"
source "package/bitcoin/Config.in"
+ source "package/btcd/Config.in"
endmenu
endmenu
diff --git a/package/btcd/Config.in b/package/btcd/Config.in
new file mode 100644
index 0000000..566e8dd
--- /dev/null
+++ b/package/btcd/Config.in
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_BTCD
+ bool "btcd"
+ depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+ select BR2_PACKAGE_HOST_GO_GLIDE
+ help
+ btcd is an alternative full node bitcoin implementation
+ written in Go (golang).
+
+ https://github.com/btcsuite/btcd
+
diff --git a/package/btcd/btcd.hash b/package/btcd/btcd.hash
new file mode 100644
index 0000000..d0b76c5
--- /dev/null
+++ b/package/btcd/btcd.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 4afd800125ecd9ff22c63dfc00c512ae5892f98b0415ecc1a19cd64afdf86bbb btcd-2a560b2036bee5e3679ec2133eb6520b2f195213.tar.gz
+sha256 46021938caf87eeb92c841fd48777a3a7bf218341386611c4d080aa45812d1d2 LICENSE
diff --git a/package/btcd/btcd.mk b/package/btcd/btcd.mk
new file mode 100644
index 0000000..4a296a7
--- /dev/null
+++ b/package/btcd/btcd.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# btcd
+#
+################################################################################
+
+BTCD_VERSION = 2a560b2036bee5e3679ec2133eb6520b2f195213
+BTCD_SITE = $(call github,btcsuite,btcd,$(BTCD_VERSION))
+BTCD_LICENSE = ISC
+BTCD_LICENSE_FILES = LICENSE
+BTCD_GO_GLIDE = YES
+BTCD_GO_GET = YES
+
+$(eval $(golang-package))
+
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 4/4] neutrino: new package
2018-09-28 13:59 [Buildroot] [PATCH 0/4] Initial support to blockchain clients Fabio Urquiza
` (2 preceding siblings ...)
2018-09-28 13:59 ` [Buildroot] [PATCH 3/4] btcd: " Fabio Urquiza
@ 2018-09-28 13:59 ` Fabio Urquiza
3 siblings, 0 replies; 8+ messages in thread
From: Fabio Urquiza @ 2018-09-28 13:59 UTC (permalink / raw)
To: buildroot
A privacy-preserving Bitcoin light client
Signed-off-by: Fabio Urquiza <fabiorush@gmail.com>
---
package/Config.in | 1 +
package/neutrino/Config.in | 13 +++++++++++++
package/neutrino/neutrino.hash | 3 +++
package/neutrino/neutrino.mk | 14 ++++++++++++++
4 files changed, 31 insertions(+)
create mode 100644 package/neutrino/Config.in
create mode 100644 package/neutrino/neutrino.hash
create mode 100644 package/neutrino/neutrino.mk
diff --git a/package/Config.in b/package/Config.in
index 6a74a80..4e40d43 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1974,6 +1974,7 @@ endif
menu "Blockchain Applications"
source "package/bitcoin/Config.in"
source "package/btcd/Config.in"
+ source "package/neutrino/Config.in"
endmenu
endmenu
diff --git a/package/neutrino/Config.in b/package/neutrino/Config.in
new file mode 100644
index 0000000..e09f53a
--- /dev/null
+++ b/package/neutrino/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_NEUTRINO
+ bool "neutrino"
+ depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+ select BR2_PACKAGE_HOST_GO_GLIDE
+ help
+ Neutrino is an experimental Bitcoin light client written in Go
+ and designed with mobile Lightning Network clients in mind. It
+ uses a new proposal for compact block filters to minimize
+ bandwidth and storage use on the client side, while attempting
+ to preserve privacy and minimize processor load on full nodes
+ serving light clients.
+
+ https://github.com/lightninglabs/neutrino
diff --git a/package/neutrino/neutrino.hash b/package/neutrino/neutrino.hash
new file mode 100644
index 0000000..4e88053
--- /dev/null
+++ b/package/neutrino/neutrino.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 581bb625173252d006d6a1cb7962578829f0d7d26605cdcb2ac4e6191a294d8f neutrino-bee0ed11601a4ad0c3b23d462cd71089fc11f2cd.tar.gz
+sha256 86d02f0ba9cb90c5da357c931eec3d3d69667ea1cf83804f07cc1ed69494cf46 LICENSE
diff --git a/package/neutrino/neutrino.mk b/package/neutrino/neutrino.mk
new file mode 100644
index 0000000..4187936
--- /dev/null
+++ b/package/neutrino/neutrino.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# neutrino
+#
+################################################################################
+
+NEUTRINO_VERSION = bee0ed11601a4ad0c3b23d462cd71089fc11f2cd
+NEUTRINO_SITE = $(call github,lightninglabs,neutrino,$(NEUTRINO_VERSION))
+NEUTRINO_LICENSE = MIT
+NEUTRINO_LICENSE_FILES = LICENSE
+NEUTRINO_GO_GLIDE = YES
+
+$(eval $(golang-package))
+
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread