From 910feebbed4444237fb40d891d008beae0fedfe8 Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Tue, 18 Sep 2018 16:27:29 -0400 Subject: consul: update to use go.bbclass We don't want meta-cloud-services to have to rely on meta-overc for access to golang.bbclass (which predates go.bbclass in oe-core/yocto) so switch to make use of go.bbclass. This requires the definition of GO_IMPORT and the dropping of some custom handling of 'configure' and others. Since go.bbclass uses a slighly different directory structure than we used with golang.bbclass we have to adjust some paths accordingly, including those in patches. We also need to expand the list of LICENSES to cover licenses of all the GO packages included in consul. Signed-off-by: Mark Asselstine Signed-off-by: Bruce Ashfield --- recipes-connectivity/consul/consul_git.bb | 22 +++++++--------------- ...prepared_query-make-compatible-with-go1.5.patch | 8 ++++---- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/recipes-connectivity/consul/consul_git.bb b/recipes-connectivity/consul/consul_git.bb index 5f86597..a44e0b2 100644 --- a/recipes-connectivity/consul/consul_git.bb +++ b/recipes-connectivity/consul/consul_git.bb @@ -1,30 +1,22 @@ DESCRIPTION = "A tool for discovering and configuring services in your infrastructure" HOMEPAGE = "https://www.consul.io/" -LICENSE = "MPL-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b278a92d2c1509760384428817710378" +LICENSE = "MPL-2.0 & BSD & Apache-2.0 & BSD-2-Clause & MIT" +LIC_FILES_CHKSUM = "file://src/github.com/hashicorp/consul/LICENSE;md5=b278a92d2c1509760384428817710378" -PKG_NAME = "github.com/hashicorp/consul" -SRC_URI = "git://${PKG_NAME}.git \ +GO_IMPORT = "github.com/hashicorp/consul" +SRCREV = "f97afda8e15046b41d951bf3b4220372c45df7ab" +SRC_URI = "git://${GO_IMPORT}.git \ file://consul.service \ file://0001-prepared_query-make-compatible-with-go1.5.patch \ " -SRCREV = "f97afda8e15046b41d951bf3b4220372c45df7ab" - -CCACHE = "" -inherit systemd golang +S = "${WORKDIR}/git" -INSANE_SKIP_${PN} += "ldflags" +inherit systemd go SYSTEMD_SERVICE_${PN} = "consul.service" SYSTEMD_AUTO_ENABLE_${PN} = "enable" -export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" - -#Stops go from installing and testing the package -do_configure(){ -} - do_install_append() { install -d ${D}/${systemd_unitdir}/system cp ${WORKDIR}/consul.service ${D}/${systemd_unitdir}/system diff --git a/recipes-connectivity/consul/files/0001-prepared_query-make-compatible-with-go1.5.patch b/recipes-connectivity/consul/files/0001-prepared_query-make-compatible-with-go1.5.patch index a66e1dc..324530b 100644 --- a/recipes-connectivity/consul/files/0001-prepared_query-make-compatible-with-go1.5.patch +++ b/recipes-connectivity/consul/files/0001-prepared_query-make-compatible-with-go1.5.patch @@ -8,13 +8,13 @@ lock contention, so we drop the copy and use the regex directly. Signed-off-by: Bruce Ashfield --- - consul/prepared_query/template.go | 4 ++-- + src/github.com/hashicorp/consul/consul/prepared_query/template.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/consul/prepared_query/template.go b/consul/prepared_query/template.go +diff --git a/src/github.com/hashicorp/consul/consul/prepared_query/template.go b/src/github.com/hashicorp/consul/consul/prepared_query/template.go index 984f0bcf9cc6..1c61910c1526 100644 ---- a/consul/prepared_query/template.go -+++ b/consul/prepared_query/template.go +--- a/src/github.com/hashicorp/consul/consul/prepared_query/template.go ++++ b/src/github.com/hashicorp/consul/consul/prepared_query/template.go @@ -116,8 +116,8 @@ func (ct *CompiledTemplate) Render(name string) (*structs.PreparedQuery, error) // from multiple goroutines. var matches []string -- cgit v1.2.3-54-g00ecf