diff options
-rw-r--r-- | meta-oe/recipes-extended/etcd/etcd/0001-test_lib.sh-remove-gobin-requirement-during-build.patch | 49 | ||||
-rw-r--r-- | meta-oe/recipes-extended/etcd/etcd_3.5.7.bb | 4 |
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 @@ | |||
1 | From a57d78a94e7cbc8cfa468b58c7d4e23668c05fec Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrew Geissler <geissonator@yahoo.com> | ||
3 | Date: Tue, 2 May 2023 13:36:36 -0600 | ||
4 | Subject: [PATCH] test_lib.sh: remove gobin requirement during build | ||
5 | |||
6 | This tool is installed as a part of the build process (build.sh sources | ||
7 | test_lib.sh) | ||
8 | |||
9 | This tool has been removed in the latest etcd main branch. Installing it | ||
10 | as a part of the build process breaks bitbake (it doesn't allow | ||
11 | downloading of packages once in the build steps). | ||
12 | |||
13 | This tool is not needed to build etcd (it appears to be used for some | ||
14 | optional test cases). | ||
15 | |||
16 | Signed-off-by: Andrew Geissler <geissonator@yahoo.com> | ||
17 | --- | ||
18 | scripts/test_lib.sh | 8 ++++++-- | ||
19 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
20 | |||
21 | diff --git a/scripts/test_lib.sh b/scripts/test_lib.sh | ||
22 | index 44b9d2895..da97a9c26 100644 | ||
23 | --- a/scripts/test_lib.sh | ||
24 | +++ b/scripts/test_lib.sh | ||
25 | @@ -140,7 +140,7 @@ function run { | ||
26 | command=("${command[@]@Q}") | ||
27 | if [[ "${rpath}" != "." && "${rpath}" != "" ]]; then | ||
28 | repro="(cd ${rpath} && ${command[*]})" | ||
29 | - else | ||
30 | + else | ||
31 | repro="${command[*]}" | ||
32 | fi | ||
33 | |||
34 | @@ -305,7 +305,11 @@ function tool_exists { | ||
35 | |||
36 | # Ensure gobin is available, as it runs majority of the tools | ||
37 | if ! command -v "gobin" >/dev/null; then | ||
38 | - run env GO111MODULE=off go get github.com/myitcv/gobin || exit 1 | ||
39 | + # This script is run as a part of the build process. Installing packages | ||
40 | + # during the build process is not allowed in bitbake. | ||
41 | + # Gobin is deprecated and not needed when building in the bitbake env | ||
42 | + echo "Not installing gobin in bitbake env" | ||
43 | + # run env GO111MODULE=off go get github.com/myitcv/gobin || exit 1 | ||
44 | fi | ||
45 | |||
46 | # tool_get_bin [tool] - returns absolute path to a tool binary (or returns error) | ||
47 | -- | ||
48 | 2.37.1 (Apple Git-137.1) | ||
49 | |||
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 | |||
7 | SRC_URI = " \ | 7 | SRC_URI = " \ |
8 | git://github.com/etcd-io/etcd;branch=release-3.5;protocol=https \ | 8 | git://github.com/etcd-io/etcd;branch=release-3.5;protocol=https \ |
9 | file://0001-xxhash-bump-to-v2.1.2.patch;patchdir=src/${GO_IMPORT} \ | 9 | file://0001-xxhash-bump-to-v2.1.2.patch;patchdir=src/${GO_IMPORT} \ |
10 | file://0001-test_lib.sh-remove-gobin-requirement-during-build.patch;patchdir=src/${GO_IMPORT} \ | ||
10 | " | 11 | " |
11 | 12 | ||
12 | SRCREV = "215b53cf3b48ee761f4c40908b3874b2e5e95e9f" | 13 | SRCREV = "215b53cf3b48ee761f4c40908b3874b2e5e95e9f" |
@@ -39,14 +40,13 @@ go_do_compile:prepend() { | |||
39 | cd ${GO_INSTALL} | 40 | cd ${GO_INSTALL} |
40 | ./build.sh | 41 | ./build.sh |
41 | 42 | ||
43 | |||
42 | # Lots of discussion in go community about how it sets packages to | 44 | # Lots of discussion in go community about how it sets packages to |
43 | # read-only by default -> https://github.com/golang/go/issues/31481 | 45 | # read-only by default -> https://github.com/golang/go/issues/31481 |
44 | # etcd is going to need some upstream work to support it. | 46 | # etcd is going to need some upstream work to support it. |
45 | # For now, set the packages which are read-only back to | 47 | # For now, set the packages which are read-only back to |
46 | # writeable so things like "bitbake -c cleanall etcd" will work. | 48 | # writeable so things like "bitbake -c cleanall etcd" will work. |
47 | chmod u+w -R ${S}/src/github.com/myitcv/gobin | ||
48 | chmod u+w -R ${WORKDIR}/build/pkg/mod | 49 | chmod u+w -R ${WORKDIR}/build/pkg/mod |
49 | |||
50 | } | 50 | } |
51 | 51 | ||
52 | do_install:append() { | 52 | do_install:append() { |