diff options
| -rw-r--r-- | meta-oe/recipes-extended/etcd/etcd_3.5.7.bb | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb b/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb new file mode 100644 index 0000000000..0635da942b --- /dev/null +++ b/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | DESCRIPTION = "etcd is a distributed key-value store for distributed systems" | ||
| 2 | HOMEPAGE = "https://etcd.io/" | ||
| 3 | |||
| 4 | LICENSE = "Apache-2.0" | ||
| 5 | LIC_FILES_CHKSUM = "file://${S}/${GO_INSTALL}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
| 6 | |||
| 7 | SRC_URI = "git://github.com/etcd-io/etcd;branch=release-3.5;protocol=https" | ||
| 8 | SRCREV = "215b53cf3b48ee761f4c40908b3874b2e5e95e9f" | ||
| 9 | UPSTREAM_CHECK_COMMITS = "1" | ||
| 10 | |||
| 11 | GO_IMPORT = "go.etcd.io/etcd/v3" | ||
| 12 | GO_INSTALL = "src/${GO_IMPORT}/" | ||
| 13 | |||
| 14 | RDEPENDS:${PN}-dev = " \ | ||
| 15 | bash \ | ||
| 16 | " | ||
| 17 | |||
| 18 | export GO111MODULE="on" | ||
| 19 | |||
| 20 | inherit go | ||
| 21 | |||
| 22 | # Go based binaries do not handle being stripped | ||
| 23 | INHIBIT_PACKAGE_STRIP = "1" | ||
| 24 | INHIBIT_SYSROOT_STRIP = "1" | ||
| 25 | |||
| 26 | # network is required by go to get dependent packages | ||
| 27 | do_compile[network] = "1" | ||
| 28 | |||
| 29 | # Need to build etcd out of where it is extracted to | ||
| 30 | # Need to directly call build script vs. "make build" | ||
| 31 | # because "make build" executes the generated binaries | ||
| 32 | # at the end of the build which do not run correctly | ||
| 33 | # when cross compiling for another machine | ||
| 34 | go_do_compile:prepend() { | ||
| 35 | cd ${GO_INSTALL} | ||
| 36 | ./build.sh | ||
| 37 | |||
| 38 | # Lots of discussion in go community about how it sets packages to | ||
| 39 | # read-only by default -> https://github.com/golang/go/issues/31481 | ||
| 40 | # etcd is going to need some upstream work to support it. | ||
| 41 | # For now, set the packages which are read-only back to | ||
| 42 | # writeable so things like "bitbake -c cleanall etcd" will work. | ||
| 43 | chmod u+w -R ${S}/src/github.com/myitcv/gobin | ||
| 44 | chmod u+w -R ${WORKDIR}/build/pkg/mod | ||
| 45 | |||
| 46 | } | ||
| 47 | |||
| 48 | do_install:append() { | ||
| 49 | install -d ${D}${bindir}/ | ||
| 50 | install -m 0755 ${D}/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcd ${D}${bindir} | ||
| 51 | install -m 0755 ${D}/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcdctl ${D}${bindir} | ||
| 52 | install -m 0755 ${D}/usr/lib/go/src/go.etcd.io/etcd/v3/bin/etcdutl ${D}${bindir} | ||
| 53 | } | ||
| 54 | |||
