summaryrefslogtreecommitdiffstats
path: root/recipes-containers/cri-o/cri-o_git.bb
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2019-04-11 22:20:05 -0400
committerBruce Ashfield <bruce.ashfield@gmail.com>2019-04-12 10:51:17 -0400
commit5b92dace1df5909623e011cb9117c931a2f171b2 (patch)
treeb8deb83704676afc6469de44faf339434fef3e8b /recipes-containers/cri-o/cri-o_git.bb
parentdfceafea9fa1291de4a9f3fb748e7be5b423d370 (diff)
downloadmeta-virtualization-5b92dace1df5909623e011cb9117c931a2f171b2.tar.gz
cri-o: build crio-config natively to generate conmon/config.h
Part of building cri-o is the generation of the 'conmon/config.h' file. The content of this file is dynamic in that it has buffer sizes and a socket path which will depend on constants that are set in other parts of the code. For example the socket path can be setup for Windows or for Linux. To generate 'conmon/config.h' a small GO application is built and run called crio-config. This isn't really suitable for a -native package but we do have to run crio-config on the build host so we don't want to cross compile it. We therefor use the native GO to build this. This change allows things to work when the build host arch and the target arch don't match. A small update to the Makefile avoids mixing build host arch and target arch GO packages. Finally, We drop the crio-config binary from the install as it is only used to create the conmon/config.h as part of the build. This is consistent with the Makefile's install rule which does not install this binary as it has no use on the target. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/cri-o/cri-o_git.bb')
-rw-r--r--recipes-containers/cri-o/cri-o_git.bb8
1 files changed, 7 insertions, 1 deletions
diff --git a/recipes-containers/cri-o/cri-o_git.bb b/recipes-containers/cri-o/cri-o_git.bb
index cac55368..bc211f12 100644
--- a/recipes-containers/cri-o/cri-o_git.bb
+++ b/recipes-containers/cri-o/cri-o_git.bb
@@ -18,6 +18,7 @@ SRCREV_cri-o = "b986e6a8d2af34451363492479d2671a68fd20a3"
18SRC_URI = "\ 18SRC_URI = "\
19 git://github.com/kubernetes-sigs/cri-o.git;branch=release-1.13;name=cri-o \ 19 git://github.com/kubernetes-sigs/cri-o.git;branch=release-1.13;name=cri-o \
20 file://0001-Makefile-force-symlinks.patch \ 20 file://0001-Makefile-force-symlinks.patch \
21 file://Makefile-skip-install-when-generating-the-config.h.patch \
21 file://crio.conf \ 22 file://crio.conf \
22 " 23 "
23 24
@@ -74,6 +75,12 @@ do_compile() {
74 75
75 cd ${S}/src/import 76 cd ${S}/src/import
76 77
78 # Build conmon/config.h, requires native versions of
79 # cmd/crio-config/config.go and oci/oci.go
80 (CGO_ENABLED=0 GO=go GOARCH=${BUILD_GOARCH} GOOS=${BUILD_GOOS} oe_runmake conmon/config.h)
81 rm -f bin/crio-config
82 rm -rf vendor/pkg
83
77 oe_runmake binaries 84 oe_runmake binaries
78} 85}
79 86
@@ -96,7 +103,6 @@ do_install() {
96 install -m 755 -D ${S}/src/import/test/testdata/* ${D}/${sysconfdir}/crio/config/ 103 install -m 755 -D ${S}/src/import/test/testdata/* ${D}/${sysconfdir}/crio/config/
97 104
98 install ${S}/src/import/bin/crio ${D}/${localbindir} 105 install ${S}/src/import/bin/crio ${D}/${localbindir}
99 install ${S}/src/import/bin/crio-config ${D}/${localbindir}
100 106
101 install ${S}/src/import/bin/conmon ${D}/${localbindir}/crio 107 install ${S}/src/import/bin/conmon ${D}/${localbindir}/crio
102 install ${S}/src/import/bin/pause ${D}/${localbindir}/crio 108 install ${S}/src/import/bin/pause ${D}/${localbindir}/crio