aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/etcd
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2023-05-02 13:46:39 -0600
committerKhem Raj <raj.khem@gmail.com>2023-05-02 14:16:58 -0700
commit4cd2006c6b3cab9a2fd1dc409c4cda087a7a5860 (patch)
tree3c6d213be5172040e8a9ab2d364fd2f0be4597f5 /meta-oe/recipes-extended/etcd
parent078e867c9763f48e4a5425f698e43a8148bffd77 (diff)
downloadmeta-openembedded-contrib-4cd2006c6b3cab9a2fd1dc409c4cda087a7a5860.tar.gz
etcd: remove gobin requirement for build
This tool is installed as a part of the build process (build.sh sources test_lib.sh) This tool has been removed in the latest etcd main branch. Installing it as a part of the build process breaks bitbake (it doesn't allow downloading of packages once in the build steps). This tool is not needed to build etcd (it appears to be used for some optional test cases). The following upstream commit removes the use of gobin in the main branch, but it's not clear to me if the alternative of just running "go install" will fix this issue. Fundamentally etcd allows package install during build and bitbake does not: https://github.com/etcd-io/etcd/commit/900fc8dd7ea578fbf1944836a04e40e98a11f402 Upstream-Status: Inappropriate Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/etcd')
-rw-r--r--meta-oe/recipes-extended/etcd/etcd/0001-test_lib.sh-remove-gobin-requirement-during-build.patch49
-rw-r--r--meta-oe/recipes-extended/etcd/etcd_3.5.7.bb4
2 files changed, 51 insertions, 2 deletions
diff --git a/meta-oe/recipes-extended/etcd/etcd/0001-test_lib.sh-remove-gobin-requirement-during-build.patch b/meta-oe/recipes-extended/etcd/etcd/0001-test_lib.sh-remove-gobin-requirement-during-build.patch
new file mode 100644
index 0000000000..a6a31d2308
--- /dev/null
+++ b/meta-oe/recipes-extended/etcd/etcd/0001-test_lib.sh-remove-gobin-requirement-during-build.patch
@@ -0,0 +1,49 @@
+From a57d78a94e7cbc8cfa468b58c7d4e23668c05fec Mon Sep 17 00:00:00 2001
+From: Andrew Geissler <geissonator@yahoo.com>
+Date: Tue, 2 May 2023 13:36:36 -0600
+Subject: [PATCH] test_lib.sh: remove gobin requirement during build
+
+This tool is installed as a part of the build process (build.sh sources
+test_lib.sh)
+
+This tool has been removed in the latest etcd main branch. Installing it
+as a part of the build process breaks bitbake (it doesn't allow
+downloading of packages once in the build steps).
+
+This tool is not needed to build etcd (it appears to be used for some
+optional test cases).
+
+Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
+---
+ scripts/test_lib.sh | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/scripts/test_lib.sh b/scripts/test_lib.sh
+index 44b9d2895..da97a9c26 100644
+--- a/scripts/test_lib.sh
++++ b/scripts/test_lib.sh
+@@ -140,7 +140,7 @@ function run {
+ command=("${command[@]@Q}")
+ if [[ "${rpath}" != "." && "${rpath}" != "" ]]; then
+ repro="(cd ${rpath} && ${command[*]})"
+- else
++ else
+ repro="${command[*]}"
+ fi
+
+@@ -305,7 +305,11 @@ function tool_exists {
+
+ # Ensure gobin is available, as it runs majority of the tools
+ if ! command -v "gobin" >/dev/null; then
+- run env GO111MODULE=off go get github.com/myitcv/gobin || exit 1
++ # This script is run as a part of the build process. Installing packages
++ # during the build process is not allowed in bitbake.
++ # Gobin is deprecated and not needed when building in the bitbake env
++ echo "Not installing gobin in bitbake env"
++ # run env GO111MODULE=off go get github.com/myitcv/gobin || exit 1
+ fi
+
+ # tool_get_bin [tool] - returns absolute path to a tool binary (or returns error)
+--
+2.37.1 (Apple Git-137.1)
+
diff --git a/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb b/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb
index b2c20404a7..346b305f2c 100644
--- a/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb
+++ b/meta-oe/recipes-extended/etcd/etcd_3.5.7.bb
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://${S}/${GO_INSTALL}/LICENSE;md5=3b83ef96387f14655fc854
SRC_URI = " \
git://github.com/etcd-io/etcd;branch=release-3.5;protocol=https \
file://0001-xxhash-bump-to-v2.1.2.patch;patchdir=src/${GO_IMPORT} \
+ file://0001-test_lib.sh-remove-gobin-requirement-during-build.patch;patchdir=src/${GO_IMPORT} \
"
SRCREV = "215b53cf3b48ee761f4c40908b3874b2e5e95e9f"
@@ -39,14 +40,13 @@ go_do_compile:prepend() {
cd ${GO_INSTALL}
./build.sh
+
# Lots of discussion in go community about how it sets packages to
# read-only by default -> https://github.com/golang/go/issues/31481
# etcd is going to need some upstream work to support it.
# For now, set the packages which are read-only back to
# writeable so things like "bitbake -c cleanall etcd" will work.
- chmod u+w -R ${S}/src/github.com/myitcv/gobin
chmod u+w -R ${WORKDIR}/build/pkg/mod
-
}
do_install:append() {