From 7497407db37fc6e3b8deaebcf4ecc894e1052e07 Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Wed, 28 Sep 2022 14:09:29 -0500 Subject: [PATCH] etcd: add recipe Investigating the potential use of etcd within an OpenBMC distribution to manage data sharing and leader election in a multi-BMC system. Start off with a basic recipe to build the package. Signed-off-by: Andrew Geissler --- meta-oe/recipes-extended/etcd/etcd_3.5.5.bb | 38 +++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 meta-oe/recipes-extended/etcd/etcd_3.5.5.bb diff --git a/meta-oe/recipes-extended/etcd/etcd_3.5.5.bb b/meta-oe/recipes-extended/etcd/etcd_3.5.5.bb new file mode 100644 index 00000000000..0bcb14fb837 --- /dev/null +++ b/meta-oe/recipes-extended/etcd/etcd_3.5.5.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "etcd is a distributed key-value store for distributed systems" +HOMEPAGE = "https://etcd.io/" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${S}/${GO_INSTALL}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI = "git://github.com/etcd-io/etcd;branch=release-3.5;protocol=https" +SRCREV = "19002cfc689fba2b8f56605e5797bf79f8b61fdd" +UPSTREAM_CHECK_COMMITS = "1" + +GO_IMPORT = "go.etcd.io/etcd/v3" +GO_INSTALL = "src/${GO_IMPORT}/" + +RDEPENDS:${PN}-dev = " \ + bash \ +" + +export GO111MODULE="on" + +inherit go + +# Need to build etcd out of where it is extracted to +# Need to directly call build script vs. "make build" +# because "make build" executes the generated binaries +# at the end of the build which do not run correctly +# when cross compiling for another machine +go_do_compile:prepend() { + cd ${GO_INSTALL} + ./build.sh +} + +do_install:append() { + install -d ${D}${bindir}/ + install -m 0755 ${D}/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcd ${D}${bindir} + install -m 0755 ${D}/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcdctl ${D}${bindir} + install -m 0755 ${D}/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcdutl ${D}${bindir} +} +