diff options
Diffstat (limited to 'recipes-containers/docker/files')
3 files changed, 62 insertions, 71 deletions
diff --git a/recipes-containers/docker/files/0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch b/recipes-containers/docker/files/0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch new file mode 100644 index 00000000..30b1a7d8 --- /dev/null +++ b/recipes-containers/docker/files/0001-check-config-make-CONFIG_MEMCG_SWAP-conditional.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From 28c115da3c6c2e6edda08c30a779f1ffaab2fbc7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Fri, 18 Oct 2024 18:27:16 +0000 | ||
4 | Subject: [PATCH] check-config: make CONFIG_MEMCG_SWAP conditional | ||
5 | |||
6 | Kernel's equal to or greater than 6.1 no longer have this | ||
7 | option. See this kernel commit: | ||
8 | |||
9 | commit e55b9f96860f6c6026cff97966a740576285e07b | ||
10 | Author: Johannes Weiner <hannes@cmpxchg.org> | ||
11 | Date: Mon Sep 26 09:57:04 2022 -0400 | ||
12 | |||
13 | mm: memcontrol: drop dead CONFIG_MEMCG_SWAP config symbol | ||
14 | |||
15 | Since 2d1c498072de ("mm: memcontrol: make swap tracking an integral part | ||
16 | of memory control"), CONFIG_MEMCG_SWAP hasn't been a user-visible config | ||
17 | option anymore, it just means CONFIG_MEMCG && CONFIG_SWAP. | ||
18 | |||
19 | Update the sites accordingly and drop the symbol. | ||
20 | |||
21 | [ While touching the docs, remove two references to CONFIG_MEMCG_KMEM, | ||
22 | which hasn't been a user-visible symbol for over half a decade. ] | ||
23 | |||
24 | Link: https://lkml.kernel.org/r/20220926135704.400818-5-hannes@cmpxchg.org | ||
25 | Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> | ||
26 | Acked-by: Shakeel Butt <shakeelb@google.com> | ||
27 | Cc: Hugh Dickins <hughd@google.com> | ||
28 | Cc: Michal Hocko <mhocko@suse.com> | ||
29 | Cc: Roman Gushchin <roman.gushchin@linux.dev> | ||
30 | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | ||
31 | |||
32 | Upstream-Status: Inappropriate [embedded specific] | ||
33 | |||
34 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
35 | --- | ||
36 | contrib/check-config.sh | 4 +++- | ||
37 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
38 | |||
39 | diff --git a/contrib/check-config.sh b/contrib/check-config.sh | ||
40 | index b9cc6bf87d..3124548d99 100755 | ||
41 | --- a/contrib/check-config.sh | ||
42 | +++ b/contrib/check-config.sh | ||
43 | @@ -266,7 +266,9 @@ echo 'Optional Features:' | ||
44 | check_flags CGROUP_PIDS | ||
45 | } | ||
46 | { | ||
47 | - check_flags MEMCG_SWAP | ||
48 | + if [ "$kernelMajor" -lt 6 ] || [ "$kernelMajor" -eq 6 -a "$kernelMinor" -le 1 ]; then | ||
49 | + check_flags MEMCG_SWAP | ||
50 | + fi | ||
51 | # Kernel v5.8+ removes MEMCG_SWAP_ENABLED. | ||
52 | if [ "$kernelMajor" -lt 5 ] || [ "$kernelMajor" -eq 5 -a "$kernelMinor" -le 8 ]; then | ||
53 | CODE=${EXITCODE} | ||
54 | -- | ||
55 | 2.39.2 | ||
56 | |||
diff --git a/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch b/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch index 160a3bca..9079d81e 100644 --- a/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch +++ b/recipes-containers/docker/files/0001-dynbinary-use-go-cross-compiler.patch | |||
@@ -48,7 +48,7 @@ Index: import/hack/make/.binary | |||
48 | echo -n '.exe' | 48 | echo -n '.exe' |
49 | fi | 49 | fi |
50 | } | 50 | } |
51 | @@ -16,33 +16,12 @@ | 51 | @@ -16,31 +16,10 @@ |
52 | ( | 52 | ( |
53 | export GOGC=${DOCKER_BUILD_GOGC:-1000} | 53 | export GOGC=${DOCKER_BUILD_GOGC:-1000} |
54 | 54 | ||
@@ -73,17 +73,15 @@ Index: import/hack/make/.binary | |||
73 | - fi | 73 | - fi |
74 | - fi | 74 | - fi |
75 | - | 75 | - |
76 | # -buildmode=pie is not supported on Windows arm64 and Linux mips*, ppc64be | ||
77 | # https://github.com/golang/go/blob/go1.19.4/src/cmd/internal/sys/supported.go#L125-L132 | ||
78 | if ! [ "$DOCKER_STATIC" = "1" ]; then | 76 | if ! [ "$DOCKER_STATIC" = "1" ]; then |
79 | # -buildmode=pie not supported when -race is enabled | 77 | # -buildmode=pie not supported when -race is enabled |
80 | if [[ " $BUILDFLAGS " != *" -race "* ]]; then | 78 | if [[ " $BUILDFLAGS " != *" -race "* ]]; then |
81 | - case "$(go env GOOS)/$(go env GOARCH)" in | 79 | - case "$(go env GOOS)/$(go env GOARCH)" in |
82 | + case "$(${GO} env GOOS)/$(${GO} env GOARCH)" in | 80 | + case "$(${GO} env GOOS)/$(${GO} env GOARCH)" in |
83 | windows/arm64 | linux/mips* | linux/ppc64) ;; | 81 | linux/mips* | linux/ppc64) |
84 | *) | 82 | # -buildmode=pie is not supported on Linux mips*, ppc64be |
85 | BUILDFLAGS+=("-buildmode=pie") | 83 | # https://github.com/golang/go/blob/go1.23.0/src/internal/platform/supported.go#L189-L197 |
86 | @@ -66,11 +45,11 @@ | 84 | @@ -67,11 +46,11 @@ |
87 | # only necessary for non-sandboxed invocation where TARGETPLATFORM is empty | 85 | # only necessary for non-sandboxed invocation where TARGETPLATFORM is empty |
88 | PLATFORM_NAME=$TARGETPLATFORM | 86 | PLATFORM_NAME=$TARGETPLATFORM |
89 | if [ -z "$PLATFORM_NAME" ]; then | 87 | if [ -z "$PLATFORM_NAME" ]; then |
@@ -100,7 +98,7 @@ Index: import/hack/make/.binary | |||
100 | fi | 98 | fi |
101 | fi | 99 | fi |
102 | 100 | ||
103 | @@ -82,7 +61,7 @@ | 101 | @@ -95,7 +74,7 @@ |
104 | if [ -n "$DOCKER_DEBUG" ]; then | 102 | if [ -n "$DOCKER_DEBUG" ]; then |
105 | set -x | 103 | set -x |
106 | fi | 104 | fi |
diff --git a/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch b/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch deleted file mode 100644 index f94f73e4..00000000 --- a/recipes-containers/docker/files/0001-libnetwork-use-GO-instead-of-go.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From 04c07804930faad708218a3134c81de06a9c742a Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
3 | Date: Fri, 6 Apr 2018 23:58:22 -0400 | ||
4 | Subject: [PATCH] libnetwork: use $(GO) instead of go | ||
5 | |||
6 | Ensure that the libnetwork makefile uses the go cross flags and | ||
7 | utilities. | ||
8 | |||
9 | Upstream-Status: Inappropriate [embedded specific] | ||
10 | |||
11 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
12 | --- | ||
13 | Makefile | 14 +++++++------- | ||
14 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
15 | |||
16 | Index: git/libnetwork/Makefile | ||
17 | =================================================================== | ||
18 | --- git.orig/libnetwork/Makefile | ||
19 | +++ git/libnetwork/Makefile | ||
20 | @@ -45,10 +45,10 @@ | ||
21 | build-local: | ||
22 | @echo "🐳 $@" | ||
23 | @mkdir -p "bin" | ||
24 | - GO111MODULE=off go build -tags experimental -o "bin/dnet" ./cmd/dnet | ||
25 | - GO111MODULE=off go build -o "bin/docker-proxy" ./cmd/proxy | ||
26 | - CGO_ENABLED=0 go build -o "bin/diagnosticClient" ./cmd/diagnostic | ||
27 | - CGO_ENABLED=0 go build -o "bin/testMain" ./cmd/networkdb-test/testMain.go | ||
28 | + GO111MODULE=off $(GO) build -trimpath -tags experimental -o "bin/dnet" ./cmd/dnet | ||
29 | + GO111MODULE=off $(GO) build -trimpath -o "bin/docker-proxy" ./cmd/proxy | ||
30 | + CGO_ENABLED=0 $(GO) build -trimpath -o "bin/diagnosticClient" ./cmd/diagnostic | ||
31 | + CGO_ENABLED=0 $(GO) build -trimpath -o "bin/testMain" ./cmd/networkdb-test/testMain.go | ||
32 | |||
33 | build-images: | ||
34 | @echo "🐳 $@" | ||
35 | @@ -82,8 +82,8 @@ | ||
36 | |||
37 | cross-local: | ||
38 | @echo "🐳 $@" | ||
39 | - GO111MODULE=off go build -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet | ||
40 | - GO111MODULE=off go build -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy | ||
41 | + GO111MODULE=off $(GO) build -trimpath $(GO_LINKSHARED) $(GOBUILDFLAGS) -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet | ||
42 | + GO111MODULE=off $(GO) build -trimpath $(GO_LINKSHARED) $(GOBUILDFLAGS) -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy | ||
43 | |||
44 | # Rebuild protocol buffers. | ||
45 | # These may need to be rebuilt after vendoring updates, so .proto files are declared .PHONY so they are always rebuilt. | ||
46 | @@ -130,7 +130,7 @@ | ||
47 | if ls $$dir/*.go &> /dev/null; then \ | ||
48 | pushd . &> /dev/null ; \ | ||
49 | cd $$dir ; \ | ||
50 | - go test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \ | ||
51 | + $(GO) test ${INSIDECONTAINER} -test.parallel 5 -test.v -covermode=count -coverprofile=./profile.tmp ; \ | ||
52 | ret=$$? ;\ | ||
53 | if [ $$ret -ne 0 ]; then exit $$ret; fi ;\ | ||
54 | popd &> /dev/null; \ | ||
55 | @@ -145,7 +145,7 @@ | ||
56 | # Depends on binaries because vet will silently fail if it can not load compiled imports | ||
57 | vet: ## run go vet | ||
58 | @echo "🐳 $@" | ||
59 | - @test -z "$$(go vet ${PACKAGES} 2>&1 | grep -v 'constant [0-9]* not a string in call to Errorf' | egrep -v '(timestamp_test.go|duration_test.go|exit status 1)' | tee /dev/stderr)" | ||
60 | + @test -z "$$($(GO) vet ${PACKAGES} 2>&1 | grep -v 'constant [0-9]* not a string in call to Errorf' | egrep -v '(timestamp_test.go|duration_test.go|exit status 1)' | tee /dev/stderr)" | ||
61 | |||
62 | misspell: | ||
63 | @echo "🐳 $@" | ||