All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/3] go language enhancements
@ 2016-05-19 22:33 Geoff Levand
  2016-05-19 22:33 ` [Buildroot] [PATCH 1/3] package/go-bootstrap: Build host tools with host CC Geoff Levand
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Geoff Levand @ 2016-05-19 22:33 UTC (permalink / raw)
  To: buildroot

Patch 3 adds a new package etcd, which does not use cgo support and can be used
to test builds without BR2_TOOLCHAIN_HAS_THREADS.

-Geoff

The following changes since commit 3f3342a581970977f28620f17391d8aaf2204fec:

  Update for 2016.05-rc2 (2016-05-17 16:11:24 +0200)

are available in the git repository at:

  git at github.com:glevand/buildroot--buildroot.git for-merge-go-enhancements

for you to fetch changes up to 2693e1ba9409afcdea6b26f0d118c48cdfd0766e:

  etcd: new package (2016-05-19 15:20:13 -0700)

----------------------------------------------------------------
Geoff Levand (3):
      package/go-bootstrap: Build host tools with host CC
      package/go: Enable MIPS support
      etcd: new package

 package/Config.in                    |  1 +
 package/etcd/Config.in               |  9 +++++
 package/etcd/S80etcd2                | 33 ++++++++++++++++++
 package/etcd/etcd.hash               |  2 ++
 package/etcd/etcd.mk                 | 67 ++++++++++++++++++++++++++++++++++++
 package/etcd/etcd2.service           | 17 +++++++++
 package/etcd/etcd2_sysv.conf         | 13 +++++++
 package/etcd/etcd2_tmpfiles.conf     |  1 +
 package/go-bootstrap/go-bootstrap.mk |  3 ++
 package/go/Config.in.host            |  2 +-
 package/go/go.mk                     |  4 +++
 11 files changed, 151 insertions(+), 1 deletion(-)
 create mode 100644 package/etcd/Config.in
 create mode 100644 package/etcd/S80etcd2
 create mode 100644 package/etcd/etcd.hash
 create mode 100644 package/etcd/etcd.mk
 create mode 100644 package/etcd/etcd2.service
 create mode 100644 package/etcd/etcd2_sysv.conf
 create mode 100644 package/etcd/etcd2_tmpfiles.conf

-- 
2.5.0

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

* [Buildroot] [PATCH 1/3] package/go-bootstrap: Build host tools with host CC
  2016-05-19 22:33 [Buildroot] [PATCH 0/3] go language enhancements Geoff Levand
@ 2016-05-19 22:33 ` Geoff Levand
  2016-07-04  9:40   ` Romain Naour
  2016-05-19 22:33 ` [Buildroot] [PATCH 2/3] package/go: Enable MIPS support Geoff Levand
  2016-05-19 22:33 ` [Buildroot] [PATCH 3/3] etcd: new package Geoff Levand
  2 siblings, 1 reply; 8+ messages in thread
From: Geoff Levand @ 2016-05-19 22:33 UTC (permalink / raw)
  To: buildroot

Use the host compiler when building host tools.

The go build system is not compatable with ccache, so use HOSTCC_NOCCACHE
here.  See https://github.com/golang/go/issues/11685.

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 package/go-bootstrap/go-bootstrap.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/go-bootstrap/go-bootstrap.mk b/package/go-bootstrap/go-bootstrap.mk
index 47f5013..29f2b03 100644
--- a/package/go-bootstrap/go-bootstrap.mk
+++ b/package/go-bootstrap/go-bootstrap.mk
@@ -19,11 +19,14 @@ HOST_GO_BOOTSTRAP_DEPENDENCIES = toolchain
 
 HOST_GO_BOOTSTRAP_ROOT = $(HOST_DIR)/usr/lib/go-$(GO_BOOTSTRAP_VERSION)
 
+# The go build system is not compatable with ccache, so use HOSTCC_NOCCACHE
+# here.  See https://github.com/golang/go/issues/11685.
 HOST_GO_BOOTSTRAP_MAKE_ENV = \
 	GOOS=linux \
 	GOROOT_FINAL="$(HOST_GO_BOOTSTRAP_ROOT)" \
 	GOROOT="$(@D)" \
 	GOBIN="$(@D)/bin" \
+	CC=$(HOSTCC_NOCCACHE) \
 	CGO_ENABLED=0
 
 define HOST_GO_BOOTSTRAP_BUILD_CMDS
-- 
2.5.0

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

* [Buildroot] [PATCH 3/3] etcd: new package
  2016-05-19 22:33 [Buildroot] [PATCH 0/3] go language enhancements Geoff Levand
  2016-05-19 22:33 ` [Buildroot] [PATCH 1/3] package/go-bootstrap: Build host tools with host CC Geoff Levand
  2016-05-19 22:33 ` [Buildroot] [PATCH 2/3] package/go: Enable MIPS support Geoff Levand
@ 2016-05-19 22:33 ` Geoff Levand
  2016-07-04  9:28   ` Romain Naour
  2 siblings, 1 reply; 8+ messages in thread
From: Geoff Levand @ 2016-05-19 22:33 UTC (permalink / raw)
  To: buildroot

etcd is a distributed key value store that provides a reliable
way to store data across a cluster of machines.

https://coreos.com/etcd

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 package/Config.in                |  1 +
 package/etcd/Config.in           |  9 ++++++
 package/etcd/S80etcd2            | 33 ++++++++++++++++++++
 package/etcd/etcd.hash           |  2 ++
 package/etcd/etcd.mk             | 67 ++++++++++++++++++++++++++++++++++++++++
 package/etcd/etcd2.service       | 17 ++++++++++
 package/etcd/etcd2_sysv.conf     | 13 ++++++++
 package/etcd/etcd2_tmpfiles.conf |  1 +
 8 files changed, 143 insertions(+)
 create mode 100644 package/etcd/Config.in
 create mode 100644 package/etcd/S80etcd2
 create mode 100644 package/etcd/etcd.hash
 create mode 100644 package/etcd/etcd.mk
 create mode 100644 package/etcd/etcd2.service
 create mode 100644 package/etcd/etcd2_sysv.conf
 create mode 100644 package/etcd/etcd2_tmpfiles.conf

diff --git a/package/Config.in b/package/Config.in
index 9d668bf..1825b6d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1381,6 +1381,7 @@ endif
 	source "package/dnsmasq/Config.in"
 	source "package/drbd-utils/Config.in"
 	source "package/dropbear/Config.in"
+	source "package/etcd/Config.in"
 	source "package/ebtables/Config.in"
 	source "package/ejabberd/Config.in"
 	source "package/ethtool/Config.in"
diff --git a/package/etcd/Config.in b/package/etcd/Config.in
new file mode 100644
index 0000000..f7f19c0
--- /dev/null
+++ b/package/etcd/Config.in
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_ETCD
+	bool "etcd"
+	depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
+	depends on BR2_aarch64 || BR2_i386 || BR2_x86_64
+	help
+	  etcd is a distributed key value store that provides a reliable
+	  way to store data across a cluster of machines.
+
+	  https://coreos.com/etcd
diff --git a/package/etcd/S80etcd2 b/package/etcd/S80etcd2
new file mode 100644
index 0000000..f6727d8
--- /dev/null
+++ b/package/etcd/S80etcd2
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+DAEMON=/usr/bin/etcd2
+CONFIG=/etc/etcd2.conf
+
+[ -x $DAEMON ] || exit 0
+[ -f $CONFIG ] || exit 0
+
+source $CONFIG
+
+case "$1" in
+	start)
+		printf "Starting etcd daemon: "
+		[ -n $ETCD_DATA_DIR ] || [ -d $ETCD_DATA_DIR ] || mkdir -p $ETCD_DATA_DIR
+		start-stop-daemon -S -x $DAEMON
+		[ $? = 0 ] && echo "OK" || echo "FAIL"
+		;;
+	stop)
+		printf "Stopping etcd daemon: "
+		start-stop-daemon -K -x $DAEMON
+		[ $? = 0 ] && echo "OK" || echo "FAIL"
+		;;
+	restart|reload|force-reload)
+		$0 stop || true
+		sleep 1
+		$0 start
+		;;
+	*)
+		echo "Usage: $0 {start|stop|restart|reload|force-reload}"
+		exit 1
+esac
+
+exit 0
diff --git a/package/etcd/etcd.hash b/package/etcd/etcd.hash
new file mode 100644
index 0000000..0802793
--- /dev/null
+++ b/package/etcd/etcd.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256 c08f68c3d21929ed3683fe94acefcd871bb3c4339117e745033bf2fb990966a9  v2.3.4.tar.gz
diff --git a/package/etcd/etcd.mk b/package/etcd/etcd.mk
new file mode 100644
index 0000000..223745d
--- /dev/null
+++ b/package/etcd/etcd.mk
@@ -0,0 +1,67 @@
+################################################################################
+#
+# etcd
+#
+################################################################################
+ETCD_VERSION = v2.3.4
+ETCD_SITE = https://github.com/coreos/etcd/archive
+ETCD_SOURCE = $(ETCD_VERSION).tar.gz
+
+ETCD_LICENSE = Apache-2.0
+ETCD_LICENSE_FILES = LICENSE
+
+ETCD_DEPENDENCIES = host-go
+
+ETCD_MAKE_ENV = \
+	$(HOST_GO_TARGET_ENV) \
+	GOBIN="$(@D)/bin" \
+	GOPATH="$(@D)/gopath" \
+	CGO_ENABLED=0 \
+
+ETCD_REPO_PATH = github.com/coreos/etcd
+
+ETCD_GLDFLAGS = \
+	-X $(ETCD_REPO_PATH)/version.GitSHA=$(ETCD_VERSION) \
+	-extldflags '-static'
+
+define ETCD_CONFIGURE_CMDS
+	# Put sources at prescribed GOPATH location.
+	mkdir -p $(@D)/gopath/src/github.com/coreos
+	ln -s $(@D) $(@D)/gopath/src/$(ETCD_REPO_PATH)
+endef
+
+define ETCD_BUILD_CMDS
+	cd $(@D) && $(ETCD_MAKE_ENV) $(HOST_GO_ROOT)/bin/go \
+		build -v -x -ldflags "$(FLANNEL_GLDFLAGS)" \
+		-o $(@D)/bin/etcd $(ETCD_REPO_PATH)
+	cd $(@D) && $(ETCD_MAKE_ENV) $(HOST_GO_ROOT)/bin/go \
+		build -v -x -ldflags "$(FLANNEL_GLDFLAGS)" \
+		-o $(@D)/bin/etcdctl $(ETCD_REPO_PATH)/etcdctl
+endef
+
+define ETCD_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/bin/etcd $(TARGET_DIR)/usr/bin/etcd2
+	$(INSTALL) -D -m 0755 $(@D)/bin/etcdctl $(TARGET_DIR)/usr/bin/etcdctl
+endef
+
+define ETCD_INSTALL_INIT_SYSV
+	$(INSTALL) -m 0755 -D package/etcd/etcd2_sysv.conf \
+		$(TARGET_DIR)/etc/etcd2.conf
+	$(INSTALL) -m 0755 -D package/etcd/S80etcd2 \
+		$(TARGET_DIR)/etc/init.d/S80etcd2
+endef
+
+define ETCD_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 644 package/etcd/etcd2.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/etcd2.service
+
+	$(INSTALL) -D -m 644 package/etcd/etcd2_tmpfiles.conf \
+		$(TARGET_DIR)/usr/lib/tmpfiles.d/etcd2.config
+
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+
+	ln -sf /usr/lib/systemd/system/etcd2.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/etcd2.service
+endef
+
+$(eval $(generic-package))
diff --git a/package/etcd/etcd2.service b/package/etcd/etcd2.service
new file mode 100644
index 0000000..288a0db
--- /dev/null
+++ b/package/etcd/etcd2.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=etcd2
+Conflicts=etcd.service
+
+[Service]
+User=etcd
+Type=notify
+Environment=ETCD_DATA_DIR=/var/lib/etcd2
+Environment=ETCD_NAME=%m
+ExecStart=/usr/bin/etcd2
+Restart=always
+RestartSec=10s
+LimitNOFILE=40000
+TimeoutStartSec=0
+
+[Install]
+WantedBy=multi-user.target
diff --git a/package/etcd/etcd2_sysv.conf b/package/etcd/etcd2_sysv.conf
new file mode 100644
index 0000000..2e397e9
--- /dev/null
+++ b/package/etcd/etcd2_sysv.conf
@@ -0,0 +1,13 @@
+# See https://coreos.com/etcd/docs/latest/configuration.html
+
+ETCD_NAME=default
+#ETCD_DISCOVERY=""
+#ETCD_DEBUG="true"
+
+ETCD_DATA_DIR="/var/lib/etcd"
+
+ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379"
+ETCD_LISTEN_PEER_URLS="http://0.0.0.0:2380"
+
+ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379"
+ETCD_INITIAL_ADVERTISE_PEER_URLS="http://localhost:2380"
diff --git a/package/etcd/etcd2_tmpfiles.conf b/package/etcd/etcd2_tmpfiles.conf
new file mode 100644
index 0000000..d8bfc78
--- /dev/null
+++ b/package/etcd/etcd2_tmpfiles.conf
@@ -0,0 +1 @@
+d    /var/lib/etcd2 0755 etcd etcd - -
-- 
2.5.0

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

* [Buildroot] [PATCH 2/3] package/go: Enable MIPS support
  2016-05-19 22:33 [Buildroot] [PATCH 0/3] go language enhancements Geoff Levand
  2016-05-19 22:33 ` [Buildroot] [PATCH 1/3] package/go-bootstrap: Build host tools with host CC Geoff Levand
@ 2016-05-19 22:33 ` Geoff Levand
  2016-06-01 21:41   ` Thomas Petazzoni
  2016-05-19 22:33 ` [Buildroot] [PATCH 3/3] etcd: new package Geoff Levand
  2 siblings, 1 reply; 8+ messages in thread
From: Geoff Levand @ 2016-05-19 22:33 UTC (permalink / raw)
  To: buildroot

Enable go language support for mips64 and mips64el (mips64le), which
were added in go-1.6.2.

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 package/go/Config.in.host | 2 +-
 package/go/go.mk          | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/go/Config.in.host b/package/go/Config.in.host
index b570803..446e505 100644
--- a/package/go/Config.in.host
+++ b/package/go/Config.in.host
@@ -1,5 +1,5 @@
 config BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
 	bool
 	default y
-	depends on BR2_arm || BR2_aarch64 || BR2_i386 || BR2_x86_64 || BR2_powerpc64 || BR2_powerpc64le
+	depends on BR2_arm || BR2_aarch64 || BR2_i386 || BR2_x86_64 || BR2_powerpc64 || BR2_powerpc64le || BR2_mips64 || BR2_mips64el
 	depends on !BR2_ARM_CPU_ARMV4
diff --git a/package/go/go.mk b/package/go/go.mk
index a9e16dd..00b1d21 100644
--- a/package/go/go.mk
+++ b/package/go/go.mk
@@ -30,6 +30,10 @@ else ifeq ($(BR2_powerpc64),y)
 GO_GOARCH = ppc64
 else ifeq ($(BR2_powerpc64le),y)
 GO_GOARCH = ppc64le
+else ifeq ($(BR2_mips64),y)
+GO_GOARCH = mips64
+else ifeq ($(BR2_mips64el),y)
+GO_GOARCH = mips64le
 endif
 
 HOST_GO_DEPENDENCIES = host-go-bootstrap
-- 
2.5.0

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

* [Buildroot] [PATCH 2/3] package/go: Enable MIPS support
  2016-05-19 22:33 ` [Buildroot] [PATCH 2/3] package/go: Enable MIPS support Geoff Levand
@ 2016-06-01 21:41   ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2016-06-01 21:41 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 19 May 2016 22:33:25 +0000, Geoff Levand wrote:
> Enable go language support for mips64 and mips64el (mips64le), which
> were added in go-1.6.2.
> 
> Signed-off-by: Geoff Levand <geoff@infradead.org>
> ---
>  package/go/Config.in.host | 2 +-
>  package/go/go.mk          | 4 ++++
>  2 files changed, 5 insertions(+), 1 deletion(-)

Applied to master, 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] [PATCH 3/3] etcd: new package
  2016-05-19 22:33 ` [Buildroot] [PATCH 3/3] etcd: new package Geoff Levand
@ 2016-07-04  9:28   ` Romain Naour
  0 siblings, 0 replies; 8+ messages in thread
From: Romain Naour @ 2016-07-04  9:28 UTC (permalink / raw)
  To: buildroot

Hi Geoff,

Le 20/05/2016 ? 00:33, Geoff Levand a ?crit :
> etcd is a distributed key value store that provides a reliable
> way to store data across a cluster of machines.
> 
> https://coreos.com/etcd
> 
> Signed-off-by: Geoff Levand <geoff@infradead.org>
> ---
>  package/Config.in                |  1 +
>  package/etcd/Config.in           |  9 ++++++
>  package/etcd/S80etcd2            | 33 ++++++++++++++++++++
>  package/etcd/etcd.hash           |  2 ++
>  package/etcd/etcd.mk             | 67 ++++++++++++++++++++++++++++++++++++++++
>  package/etcd/etcd2.service       | 17 ++++++++++
>  package/etcd/etcd2_sysv.conf     | 13 ++++++++
>  package/etcd/etcd2_tmpfiles.conf |  1 +
>  8 files changed, 143 insertions(+)
>  create mode 100644 package/etcd/Config.in
>  create mode 100644 package/etcd/S80etcd2
>  create mode 100644 package/etcd/etcd.hash
>  create mode 100644 package/etcd/etcd.mk
>  create mode 100644 package/etcd/etcd2.service
>  create mode 100644 package/etcd/etcd2_sysv.conf
>  create mode 100644 package/etcd/etcd2_tmpfiles.conf
> 
> diff --git a/package/Config.in b/package/Config.in
> index 9d668bf..1825b6d 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1381,6 +1381,7 @@ endif
>  	source "package/dnsmasq/Config.in"
>  	source "package/drbd-utils/Config.in"
>  	source "package/dropbear/Config.in"
> +	source "package/etcd/Config.in"

Please, keep packages sorted alphabetically

>  	source "package/ebtables/Config.in"
>  	source "package/ejabberd/Config.in"
>  	source "package/ethtool/Config.in"
> diff --git a/package/etcd/Config.in b/package/etcd/Config.in
> new file mode 100644
> index 0000000..f7f19c0
> --- /dev/null
> +++ b/package/etcd/Config.in
> @@ -0,0 +1,9 @@
> +config BR2_PACKAGE_ETCD
> +	bool "etcd"
> +	depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
> +	depends on BR2_aarch64 || BR2_i386 || BR2_x86_64
> +	help
> +	  etcd is a distributed key value store that provides a reliable
> +	  way to store data across a cluster of machines.
> +
> +	  https://coreos.com/etcd
> diff --git a/package/etcd/S80etcd2 b/package/etcd/S80etcd2
> new file mode 100644
> index 0000000..f6727d8
> --- /dev/null
> +++ b/package/etcd/S80etcd2
> @@ -0,0 +1,33 @@
> +#!/bin/sh
> +
> +DAEMON=/usr/bin/etcd2
> +CONFIG=/etc/etcd2.conf
> +
> +[ -x $DAEMON ] || exit 0
> +[ -f $CONFIG ] || exit 0
> +
> +source $CONFIG
> +
> +case "$1" in
> +	start)
> +		printf "Starting etcd daemon: "
> +		[ -n $ETCD_DATA_DIR ] || [ -d $ETCD_DATA_DIR ] || mkdir -p $ETCD_DATA_DIR
> +		start-stop-daemon -S -x $DAEMON
> +		[ $? = 0 ] && echo "OK" || echo "FAIL"
> +		;;
> +	stop)
> +		printf "Stopping etcd daemon: "
> +		start-stop-daemon -K -x $DAEMON
> +		[ $? = 0 ] && echo "OK" || echo "FAIL"
> +		;;
> +	restart|reload|force-reload)
> +		$0 stop || true
> +		sleep 1
> +		$0 start
> +		;;
> +	*)
> +		echo "Usage: $0 {start|stop|restart|reload|force-reload}"
> +		exit 1
> +esac
> +
> +exit 0
> diff --git a/package/etcd/etcd.hash b/package/etcd/etcd.hash
> new file mode 100644
> index 0000000..0802793
> --- /dev/null
> +++ b/package/etcd/etcd.hash
> @@ -0,0 +1,2 @@
> +# Locally computed:
> +sha256 c08f68c3d21929ed3683fe94acefcd871bb3c4339117e745033bf2fb990966a9  v2.3.4.tar.gz
> diff --git a/package/etcd/etcd.mk b/package/etcd/etcd.mk
> new file mode 100644
> index 0000000..223745d
> --- /dev/null
> +++ b/package/etcd/etcd.mk
> @@ -0,0 +1,67 @@
> +################################################################################
> +#
> +# etcd
> +#
> +################################################################################
> +ETCD_VERSION = v2.3.4
> +ETCD_SITE = https://github.com/coreos/etcd/archive
> +ETCD_SOURCE = $(ETCD_VERSION).tar.gz

Can you try with the github helper:
http://nightly.buildroot.org/manual.html#github-download-url

> +
> +ETCD_LICENSE = Apache-2.0
> +ETCD_LICENSE_FILES = LICENSE
> +
> +ETCD_DEPENDENCIES = host-go
> +
> +ETCD_MAKE_ENV = \
> +	$(HOST_GO_TARGET_ENV) \
> +	GOBIN="$(@D)/bin" \
> +	GOPATH="$(@D)/gopath" \
> +	CGO_ENABLED=0 \
> +
> +ETCD_REPO_PATH = github.com/coreos/etcd
> +
> +ETCD_GLDFLAGS = \
> +	-X $(ETCD_REPO_PATH)/version.GitSHA=$(ETCD_VERSION) \
> +	-extldflags '-static'
> +
> +define ETCD_CONFIGURE_CMDS
> +	# Put sources at prescribed GOPATH location.
> +	mkdir -p $(@D)/gopath/src/github.com/coreos
> +	ln -s $(@D) $(@D)/gopath/src/$(ETCD_REPO_PATH)
> +endef
> +
> +define ETCD_BUILD_CMDS
> +	cd $(@D) && $(ETCD_MAKE_ENV) $(HOST_GO_ROOT)/bin/go \
> +		build -v -x -ldflags "$(FLANNEL_GLDFLAGS)" \
                                        ^
should be ETCD_GLDFLAGS

> +		-o $(@D)/bin/etcd $(ETCD_REPO_PATH)
> +	cd $(@D) && $(ETCD_MAKE_ENV) $(HOST_GO_ROOT)/bin/go \
> +		build -v -x -ldflags "$(FLANNEL_GLDFLAGS)" \
                                        ^
same here

> +		-o $(@D)/bin/etcdctl $(ETCD_REPO_PATH)/etcdctl
> +endef
> +
> +define ETCD_INSTALL_TARGET_CMDS
> +	$(INSTALL) -D -m 0755 $(@D)/bin/etcd $(TARGET_DIR)/usr/bin/etcd2

Why did you rename etcd to etcd2 ?

> +	$(INSTALL) -D -m 0755 $(@D)/bin/etcdctl $(TARGET_DIR)/usr/bin/etcdctl
> +endef
> +
> +define ETCD_INSTALL_INIT_SYSV
> +	$(INSTALL) -m 0755 -D package/etcd/etcd2_sysv.conf \
> +		$(TARGET_DIR)/etc/etcd2.conf
> +	$(INSTALL) -m 0755 -D package/etcd/S80etcd2 \
> +		$(TARGET_DIR)/etc/init.d/S80etcd2
> +endef
> +
> +define ETCD_INSTALL_INIT_SYSTEMD
> +	$(INSTALL) -D -m 644 package/etcd/etcd2.service \
> +		$(TARGET_DIR)/usr/lib/systemd/system/etcd2.service
> +
> +	$(INSTALL) -D -m 644 package/etcd/etcd2_tmpfiles.conf \
> +		$(TARGET_DIR)/usr/lib/tmpfiles.d/etcd2.config
> +
> +	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
> +
> +	ln -sf /usr/lib/systemd/system/etcd2.service \
> +		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/etcd2.service
> +endef
> +
> +$(eval $(generic-package))
> diff --git a/package/etcd/etcd2.service b/package/etcd/etcd2.service
> new file mode 100644
> index 0000000..288a0db
> --- /dev/null
> +++ b/package/etcd/etcd2.service
> @@ -0,0 +1,17 @@
> +[Unit]
> +Description=etcd2
> +Conflicts=etcd.service
> +
> +[Service]
> +User=etcd
> +Type=notify
> +Environment=ETCD_DATA_DIR=/var/lib/etcd2
> +Environment=ETCD_NAME=%m
> +ExecStart=/usr/bin/etcd2
> +Restart=always
> +RestartSec=10s
> +LimitNOFILE=40000
> +TimeoutStartSec=0
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/package/etcd/etcd2_sysv.conf b/package/etcd/etcd2_sysv.conf
> new file mode 100644
> index 0000000..2e397e9
> --- /dev/null
> +++ b/package/etcd/etcd2_sysv.conf
> @@ -0,0 +1,13 @@
> +# See https://coreos.com/etcd/docs/latest/configuration.html
> +
> +ETCD_NAME=default
> +#ETCD_DISCOVERY=""
> +#ETCD_DEBUG="true"

Please, remove commented line.

Otherwise look good.

Best regards,
Romain

> +
> +ETCD_DATA_DIR="/var/lib/etcd"
> +
> +ETCD_LISTEN_CLIENT_URLS="http://0.0.0.0:2379"
> +ETCD_LISTEN_PEER_URLS="http://0.0.0.0:2380"
> +
> +ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379"
> +ETCD_INITIAL_ADVERTISE_PEER_URLS="http://localhost:2380"
> diff --git a/package/etcd/etcd2_tmpfiles.conf b/package/etcd/etcd2_tmpfiles.conf
> new file mode 100644
> index 0000000..d8bfc78
> --- /dev/null
> +++ b/package/etcd/etcd2_tmpfiles.conf
> @@ -0,0 +1 @@
> +d    /var/lib/etcd2 0755 etcd etcd - -
> 

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

* [Buildroot] [PATCH 1/3] package/go-bootstrap: Build host tools with host CC
  2016-05-19 22:33 ` [Buildroot] [PATCH 1/3] package/go-bootstrap: Build host tools with host CC Geoff Levand
@ 2016-07-04  9:40   ` Romain Naour
  2016-07-04 13:08     ` Peter Korsgaard
  0 siblings, 1 reply; 8+ messages in thread
From: Romain Naour @ 2016-07-04  9:40 UTC (permalink / raw)
  To: buildroot

Hi Geoff,

Le 20/05/2016 ? 00:33, Geoff Levand a ?crit :
> Use the host compiler when building host tools.
> 
> The go build system is not compatable with ccache, so use HOSTCC_NOCCACHE
> here.  See https://github.com/golang/go/issues/11685.
> 
> Signed-off-by: Geoff Levand <geoff@infradead.org>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain


> ---
>  package/go-bootstrap/go-bootstrap.mk | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/package/go-bootstrap/go-bootstrap.mk b/package/go-bootstrap/go-bootstrap.mk
> index 47f5013..29f2b03 100644
> --- a/package/go-bootstrap/go-bootstrap.mk
> +++ b/package/go-bootstrap/go-bootstrap.mk
> @@ -19,11 +19,14 @@ HOST_GO_BOOTSTRAP_DEPENDENCIES = toolchain
>  
>  HOST_GO_BOOTSTRAP_ROOT = $(HOST_DIR)/usr/lib/go-$(GO_BOOTSTRAP_VERSION)
>  
> +# The go build system is not compatable with ccache, so use HOSTCC_NOCCACHE
> +# here.  See https://github.com/golang/go/issues/11685.
>  HOST_GO_BOOTSTRAP_MAKE_ENV = \
>  	GOOS=linux \
>  	GOROOT_FINAL="$(HOST_GO_BOOTSTRAP_ROOT)" \
>  	GOROOT="$(@D)" \
>  	GOBIN="$(@D)/bin" \
> +	CC=$(HOSTCC_NOCCACHE) \
>  	CGO_ENABLED=0
>  
>  define HOST_GO_BOOTSTRAP_BUILD_CMDS
> 

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

* [Buildroot] [PATCH 1/3] package/go-bootstrap: Build host tools with host CC
  2016-07-04  9:40   ` Romain Naour
@ 2016-07-04 13:08     ` Peter Korsgaard
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2016-07-04 13:08 UTC (permalink / raw)
  To: buildroot

>>>>> "Romain" == Romain Naour <romain.naour@gmail.com> writes:

 > Hi Geoff,
 > Le 20/05/2016 ? 00:33, Geoff Levand a ?crit :
 >> Use the host compiler when building host tools.
 >> 
 >> The go build system is not compatable with ccache, so use HOSTCC_NOCCACHE
 >> here.  See https://github.com/golang/go/issues/11685.
 >> 
 >> Signed-off-by: Geoff Levand <geoff@infradead.org>

 > Reviewed-by: Romain Naour <romain.naour@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2016-07-04 13:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-19 22:33 [Buildroot] [PATCH 0/3] go language enhancements Geoff Levand
2016-05-19 22:33 ` [Buildroot] [PATCH 1/3] package/go-bootstrap: Build host tools with host CC Geoff Levand
2016-07-04  9:40   ` Romain Naour
2016-07-04 13:08     ` Peter Korsgaard
2016-05-19 22:33 ` [Buildroot] [PATCH 2/3] package/go: Enable MIPS support Geoff Levand
2016-06-01 21:41   ` Thomas Petazzoni
2016-05-19 22:33 ` [Buildroot] [PATCH 3/3] etcd: new package Geoff Levand
2016-07-04  9:28   ` Romain Naour

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.