diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-07-08 15:50:45 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2019-07-12 14:50:34 +0000 |
commit | 7525f301947821a82db3f6497bff0f3fc2bcd4f4 (patch) | |
tree | cce8b5c5afe4cb87f38dbb8a6e8bc3db7cab88f5 | |
parent | 2ffb3332c4c557f62aa381c05b8b960d741c90f9 (diff) | |
download | meta-virtualization-7525f301947821a82db3f6497bff0f3fc2bcd4f4.tar.gz |
cri-o: update to 1.15
Updating to the 1.15 release.
With this update there are significant new build constraints and
dependencies. As such, the cross binaries are now being be built
by default, with the old (non-cross) build being kept around as
an optional way to build the components.
There are still issues with the non-cross build, so it will
require more work in the future.
We also document the requirement for selinux and seccomp in the
README as dependencies if you build cri-o.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | README | 9 | ||||
-rw-r--r-- | recipes-containers/cri-o/cri-o_git.bb | 56 |
2 files changed, 51 insertions, 14 deletions
@@ -65,6 +65,15 @@ branch: master | |||
65 | revision: HEAD | 65 | revision: HEAD |
66 | prio: default | 66 | prio: default |
67 | 67 | ||
68 | Required for cri-o: | ||
69 | URI: git://github.com/advancedtelematic/meta-updater | ||
70 | URI: git://git.yoctoproject.org/meta-selinux | ||
71 | URI: git://git.yoctoproject.org/meta-security | ||
72 | branch: master | ||
73 | revision: HEAD | ||
74 | prio: default | ||
75 | |||
76 | |||
68 | Maintenance | 77 | Maintenance |
69 | ----------- | 78 | ----------- |
70 | 79 | ||
diff --git a/recipes-containers/cri-o/cri-o_git.bb b/recipes-containers/cri-o/cri-o_git.bb index bc211f12..1a56dc45 100644 --- a/recipes-containers/cri-o/cri-o_git.bb +++ b/recipes-containers/cri-o/cri-o_git.bb | |||
@@ -14,11 +14,10 @@ At a high level, we expect the scope of cri-o to be restricted to the following | |||
14 | - Resource isolation as required by the CRI \ | 14 | - Resource isolation as required by the CRI \ |
15 | " | 15 | " |
16 | 16 | ||
17 | SRCREV_cri-o = "b986e6a8d2af34451363492479d2671a68fd20a3" | 17 | SRCREV_cri-o = "f61719a88b7de10a88c50e35640f4a7f1f53fbab" |
18 | SRC_URI = "\ | 18 | SRC_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.15;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 \ | ||
22 | file://crio.conf \ | 21 | file://crio.conf \ |
23 | " | 22 | " |
24 | 23 | ||
@@ -28,7 +27,7 @@ LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c2 | |||
28 | 27 | ||
29 | GO_IMPORT = "import" | 28 | GO_IMPORT = "import" |
30 | 29 | ||
31 | PV = "1.13.0+git${SRCREV_cri-o}" | 30 | PV = "1.15.0+git${SRCREV_cri-o}" |
32 | 31 | ||
33 | DEPENDS = " \ | 32 | DEPENDS = " \ |
34 | glib-2.0 \ | 33 | glib-2.0 \ |
@@ -36,6 +35,8 @@ DEPENDS = " \ | |||
36 | gpgme \ | 35 | gpgme \ |
37 | ostree \ | 36 | ostree \ |
38 | libdevmapper \ | 37 | libdevmapper \ |
38 | libseccomp \ | ||
39 | libselinux \ | ||
39 | " | 40 | " |
40 | RDEPENDS_${PN} = " \ | 41 | RDEPENDS_${PN} = " \ |
41 | cni \ | 42 | cni \ |
@@ -52,8 +53,10 @@ inherit goarch | |||
52 | inherit pkgconfig | 53 | inherit pkgconfig |
53 | 54 | ||
54 | EXTRA_OEMAKE="BUILDTAGS=''" | 55 | EXTRA_OEMAKE="BUILDTAGS=''" |
56 | CRIO_BUILD_CROSS ?= "1" | ||
55 | 57 | ||
56 | do_compile() { | 58 | do_compile() { |
59 | set +e | ||
57 | export GOPATH="${S}/src/import:${S}/src/import/vendor" | 60 | export GOPATH="${S}/src/import:${S}/src/import/vendor" |
58 | 61 | ||
59 | # link fixups for compilation | 62 | # link fixups for compilation |
@@ -73,15 +76,37 @@ do_compile() { | |||
73 | ln -sf ../../../../version ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/version | 76 | ln -sf ../../../../version ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/version |
74 | ln -sf ../../../../lib ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/lib | 77 | ln -sf ../../../../lib ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/lib |
75 | 78 | ||
76 | cd ${S}/src/import | ||
77 | 79 | ||
78 | # Build conmon/config.h, requires native versions of | 80 | rm -f ${S}/src/import/src |
79 | # cmd/crio-config/config.go and oci/oci.go | 81 | ln -sf ./ ${S}/src/import/src |
80 | (CGO_ENABLED=0 GO=go GOARCH=${BUILD_GOARCH} GOOS=${BUILD_GOOS} oe_runmake conmon/config.h) | 82 | mkdir -p ${S}/src/import/src/github.com/cri-o/cri-o/cmd |
81 | rm -f bin/crio-config | 83 | ln -sf ../../../../cmd/crio-config ${S}/src/import/src/github.com/cri-o/cri-o/cmd |
82 | rm -rf vendor/pkg | 84 | ln -sf ../../../lib ${S}/src/import/src/github.com/cri-o/cri-o/lib |
85 | ln -sf ../../../oci ${S}/src/import/src/github.com/cri-o/cri-o/oci | ||
86 | ln -sf ../../../pkg ${S}/src/import/src/github.com/cri-o/cri-o/pkg | ||
87 | ln -sf ../../../utils ${S}/src/import/src/github.com/cri-o/cri-o/utils | ||
88 | ln -sf ../../../version ${S}/src/import/src/github.com/cri-o/cri-o/version | ||
89 | ln -sf ../../../server ${S}/src/import/src/github.com/cri-o/cri-o/server | ||
90 | ln -sf ../../../types ${S}/src/import/src/github.com/cri-o/cri-o/types | ||
91 | |||
92 | # fixes the bin/crio build of oe_runmake binaries below | ||
93 | ln -sf ../../../../cmd/crio ${S}/src/import/src/github.com/cri-o/cri-o/cmd/ | ||
94 | |||
95 | cd ${S}/src/import | ||
83 | 96 | ||
84 | oe_runmake binaries | 97 | if [ "${CRIO_BUILD_CROSS}" = "1" ]; then |
98 | # New: using the -cross target. But this doesn't build conmon and pause. So | ||
99 | # keeping the old parts around if someone yells. | ||
100 | oe_runmake local-cross | ||
101 | else | ||
102 | # Build conmon/config.h, requires native versions of | ||
103 | # cmd/crio-config/config.go and oci/oci.go | ||
104 | (CGO_ENABLED=0 GO=go GOARCH=${BUILD_GOARCH} GOOS=${BUILD_GOOS} oe_runmake conmon/config.h) | ||
105 | rm -f bin/crio-config | ||
106 | rm -rf vendor/pkg | ||
107 | |||
108 | oe_runmake binaries | ||
109 | fi | ||
85 | } | 110 | } |
86 | 111 | ||
87 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" | 112 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" |
@@ -89,6 +114,7 @@ SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','crio. | |||
89 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" | 114 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" |
90 | 115 | ||
91 | do_install() { | 116 | do_install() { |
117 | set +e | ||
92 | localbindir="/usr/local/bin" | 118 | localbindir="/usr/local/bin" |
93 | 119 | ||
94 | install -d ${D}${localbindir} | 120 | install -d ${D}${localbindir} |
@@ -102,10 +128,12 @@ do_install() { | |||
102 | install -d ${D}/${sysconfdir}/crio/config/ | 128 | install -d ${D}/${sysconfdir}/crio/config/ |
103 | install -m 755 -D ${S}/src/import/test/testdata/* ${D}/${sysconfdir}/crio/config/ | 129 | install -m 755 -D ${S}/src/import/test/testdata/* ${D}/${sysconfdir}/crio/config/ |
104 | 130 | ||
105 | install ${S}/src/import/bin/crio ${D}/${localbindir} | 131 | install ${S}/src/import/bin/crio.cross.linux* ${D}/${localbindir}/crio |
106 | 132 | ||
107 | install ${S}/src/import/bin/conmon ${D}/${localbindir}/crio | 133 | if [ "${CRIO_BUILD_CROSS}" = "1" ]; then |
108 | install ${S}/src/import/bin/pause ${D}/${localbindir}/crio | 134 | install ${S}/src/import/bin/conmon ${D}/${localbindir}/crio |
135 | install ${S}/src/import/bin/pause ${D}/${localbindir}/crio | ||
136 | fi | ||
109 | 137 | ||
110 | install -m 0644 ${S}/src/import/contrib/systemd/crio.service ${D}${systemd_unitdir}/system/ | 138 | install -m 0644 ${S}/src/import/contrib/systemd/crio.service ${D}${systemd_unitdir}/system/ |
111 | install -m 0644 ${S}/src/import/contrib/systemd/crio-shutdown.service ${D}${systemd_unitdir}/system/ | 139 | install -m 0644 ${S}/src/import/contrib/systemd/crio-shutdown.service ${D}${systemd_unitdir}/system/ |