diff options
-rw-r--r-- | recipes-containers/podman/podman/0001-Rename-BUILDFLAGS-to-GOBUILDFLAGS.patch | 109 | ||||
-rw-r--r-- | recipes-containers/podman/podman_git.bb | 4 |
2 files changed, 3 insertions, 110 deletions
diff --git a/recipes-containers/podman/podman/0001-Rename-BUILDFLAGS-to-GOBUILDFLAGS.patch b/recipes-containers/podman/podman/0001-Rename-BUILDFLAGS-to-GOBUILDFLAGS.patch deleted file mode 100644 index 14b2714f..00000000 --- a/recipes-containers/podman/podman/0001-Rename-BUILDFLAGS-to-GOBUILDFLAGS.patch +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | From 3e18f3a4db638a3df48f49aa0a539f8bb048afc9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrei Gherzan <andrei.gherzan@huawei.com> | ||
3 | Date: Tue, 5 Jul 2022 11:51:56 +0200 | ||
4 | Subject: [PATCH] Rename BUILDFLAGS to GOBUILDFLAGS | ||
5 | |||
6 | Yocto uses GOBUILDFLAGS to pass the right build flags while the Makefile | ||
7 | uses BUILDFLAGS. Align them accordingly. | ||
8 | |||
9 | See go.bbclass for more information. | ||
10 | |||
11 | Upstream-Status: Inappropriate [OE specific] | ||
12 | Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com> | ||
13 | --- | ||
14 | Makefile | 24 ++++++++++++------------ | ||
15 | 1 file changed, 12 insertions(+), 12 deletions(-) | ||
16 | |||
17 | Index: import/Makefile | ||
18 | =================================================================== | ||
19 | --- import.orig/Makefile | ||
20 | +++ import/Makefile | ||
21 | @@ -242,7 +242,7 @@ | ||
22 | |||
23 | .PHONY: test/checkseccomp/checkseccomp | ||
24 | test/checkseccomp/checkseccomp: $(wildcard test/checkseccomp/*.go) | ||
25 | - $(GOCMD) build $(BUILDFLAGS) $(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' -tags "$(BUILDTAGS)" -o $@ ./test/checkseccomp | ||
26 | + $(GOCMD) build $(GOBUILDFLAGS) $(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' -tags "$(BUILDTAGS)" -o $@ ./test/checkseccomp | ||
27 | |||
28 | .PHONY: test/testvol/testvol | ||
29 | test/testvol/testvol: $(wildcard test/testvol/*.go) | ||
30 | @@ -254,7 +254,7 @@ | ||
31 | |||
32 | .PHONY: test/goecho/goecho | ||
33 | test/goecho/goecho: $(wildcard test/goecho/*.go) | ||
34 | - $(GOCMD) build $(BUILDFLAGS) $(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' -o $@ ./test/goecho | ||
35 | + $(GOCMD) build $(GOBUILDFLAGS) $(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' -o $@ ./test/goecho | ||
36 | |||
37 | test/version/version: version/version.go | ||
38 | $(GO) build -o $@ ./test/version/ | ||
39 | @@ -296,7 +296,7 @@ | ||
40 | distro for journald support." | ||
41 | endif | ||
42 | $(GOCMD) build \ | ||
43 | - $(BUILDFLAGS) \ | ||
44 | + $(GOBUILDFLAGS) \ | ||
45 | $(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' \ | ||
46 | -tags "$(BUILDTAGS)" \ | ||
47 | -o $@ ./cmd/podman | ||
48 | @@ -308,7 +308,7 @@ | ||
49 | # '|' is to ignore SRCBINDIR mtime; see: info make 'Types of Prerequisites' | ||
50 | $(SRCBINDIR)/podman$(BINSFX): $(SOURCES) go.mod go.sum | $(SRCBINDIR) | ||
51 | $(GOCMD) build \ | ||
52 | - $(BUILDFLAGS) \ | ||
53 | + $(GOBUILDFLAGS) \ | ||
54 | $(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' \ | ||
55 | -tags "${REMOTETAGS}" \ | ||
56 | -o $@ ./cmd/podman | ||
57 | @@ -318,7 +318,7 @@ | ||
58 | GOOS=linux \ | ||
59 | GOARCH=$(GOARCH) \ | ||
60 | $(GO) build \ | ||
61 | - $(BUILDFLAGS) \ | ||
62 | + $(GOBUILDFLAGS) \ | ||
63 | $(GO_LDFLAGS) '$(LDFLAGS_PODMAN_STATIC)' \ | ||
64 | -tags "${REMOTETAGS}" \ | ||
65 | -o $@ ./cmd/podman | ||
66 | @@ -338,7 +338,7 @@ | ||
67 | CGO_ENABLED=0 \ | ||
68 | GOOS=windows \ | ||
69 | $(GO) build \ | ||
70 | - $(BUILDFLAGS) \ | ||
71 | + $(GOBUILDFLAGS) \ | ||
72 | -ldflags -H=windowsgui \ | ||
73 | -o bin/windows/winpath.exe \ | ||
74 | ./cmd/winpath | ||
75 | @@ -349,14 +349,14 @@ | ||
76 | GOOS=darwin \ | ||
77 | GOARCH=$(GOARCH) \ | ||
78 | $(GO) build \ | ||
79 | - $(BUILDFLAGS) \ | ||
80 | + $(GOBUILDFLAGS) \ | ||
81 | -o bin/darwin/podman-mac-helper \ | ||
82 | ./cmd/podman-mac-helper | ||
83 | |||
84 | bin/rootlessport: $(SOURCES) go.mod go.sum | ||
85 | CGO_ENABLED=$(CGO_ENABLED) \ | ||
86 | $(GO) build \ | ||
87 | - $(BUILDFLAGS) \ | ||
88 | + $(GOBUILDFLAGS) \ | ||
89 | -o $@ ./cmd/rootlessport | ||
90 | |||
91 | .PHONY: rootlessport | ||
92 | @@ -379,7 +379,7 @@ | ||
93 | GOARCH="$${TARGET##*.}"; \ | ||
94 | CGO_ENABLED=0 \ | ||
95 | $(GO) build \ | ||
96 | - $(BUILDFLAGS) \ | ||
97 | + $(GOBUILDFLAGS) \ | ||
98 | $(GO_LDFLAGS) '$(LDFLAGS_PODMAN)' \ | ||
99 | -tags '$(BUILDTAGS_CROSS)' \ | ||
100 | -o "$@" ./cmd/podman | ||
101 | @@ -830,7 +830,7 @@ | ||
102 | |||
103 | .PHONY: .install.ginkgo | ||
104 | .install.ginkgo: | ||
105 | - $(GO) install $(BUILDFLAGS) ./vendor/github.com/onsi/ginkgo/ginkgo | ||
106 | + $(GO) install $(GOBUILDFLAGS) ./vendor/github.com/onsi/ginkgo/ginkgo | ||
107 | |||
108 | .PHONY: .install.golangci-lint | ||
109 | .install.golangci-lint: | ||
diff --git a/recipes-containers/podman/podman_git.bb b/recipes-containers/podman/podman_git.bb index 355e0e09..c2f4e506 100644 --- a/recipes-containers/podman/podman_git.bb +++ b/recipes-containers/podman/podman_git.bb | |||
@@ -20,7 +20,6 @@ DEPENDS = " \ | |||
20 | SRCREV = "754ec89a8a185d308ca5ed08afaf34d6cbda08da" | 20 | SRCREV = "754ec89a8a185d308ca5ed08afaf34d6cbda08da" |
21 | SRC_URI = " \ | 21 | SRC_URI = " \ |
22 | git://github.com/containers/libpod.git;branch=v4.2;protocol=https \ | 22 | git://github.com/containers/libpod.git;branch=v4.2;protocol=https \ |
23 | file://0001-Rename-BUILDFLAGS-to-GOBUILDFLAGS.patch;patchdir=src/import \ | ||
24 | ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'file://50-podman-rootless.conf', '', d)} \ | 23 | ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'file://50-podman-rootless.conf', '', d)} \ |
25 | " | 24 | " |
26 | 25 | ||
@@ -46,6 +45,9 @@ export LDFLAGS="" | |||
46 | # https://github.com/llvm/llvm-project/issues/53999 | 45 | # https://github.com/llvm/llvm-project/issues/53999 |
47 | TOOLCHAIN = "gcc" | 46 | TOOLCHAIN = "gcc" |
48 | 47 | ||
48 | # podmans Makefile expects BUILDFLAGS to be set but go.bbclass defines them in GOBUILDFLAGS | ||
49 | export BUILDFLAGS="${GOBUILDFLAGS}" | ||
50 | |||
49 | inherit go goarch | 51 | inherit go goarch |
50 | inherit systemd pkgconfig | 52 | inherit systemd pkgconfig |
51 | 53 | ||