diff options
-rw-r--r-- | recipes-containers/cri-o/cri-o_git.bb | 74 | ||||
-rw-r--r-- | recipes-containers/cri-o/files/crio.conf | 7 |
2 files changed, 17 insertions, 64 deletions
diff --git a/recipes-containers/cri-o/cri-o_git.bb b/recipes-containers/cri-o/cri-o_git.bb index 4fee3856..ebf5bab3 100644 --- a/recipes-containers/cri-o/cri-o_git.bb +++ b/recipes-containers/cri-o/cri-o_git.bb | |||
@@ -14,9 +14,9 @@ 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 = "f61719a88b7de10a88c50e35640f4a7f1f53fbab" | 17 | SRCREV_cri-o = "6d0ffae63b9b7d8f07e7f9cf50736a67fb31faf3" |
18 | SRC_URI = "\ | 18 | SRC_URI = "\ |
19 | git://github.com/kubernetes-sigs/cri-o.git;branch=release-1.15;name=cri-o \ | 19 | git://github.com/kubernetes-sigs/cri-o.git;branch=release-1.17;name=cri-o \ |
20 | file://0001-Makefile-force-symlinks.patch \ | 20 | file://0001-Makefile-force-symlinks.patch \ |
21 | file://crio.conf \ | 21 | file://crio.conf \ |
22 | " | 22 | " |
@@ -27,7 +27,7 @@ LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c2 | |||
27 | 27 | ||
28 | GO_IMPORT = "import" | 28 | GO_IMPORT = "import" |
29 | 29 | ||
30 | PV = "1.15.0+git${SRCREV_cri-o}" | 30 | PV = "1.17.0+git${SRCREV_cri-o}" |
31 | 31 | ||
32 | DEPENDS = " \ | 32 | DEPENDS = " \ |
33 | glib-2.0 \ | 33 | glib-2.0 \ |
@@ -62,7 +62,7 @@ python __anonymous() { | |||
62 | PACKAGES =+ "${PN}-config" | 62 | PACKAGES =+ "${PN}-config" |
63 | 63 | ||
64 | RDEPENDS_${PN} += " virtual/containerd virtual/runc" | 64 | RDEPENDS_${PN} += " virtual/containerd virtual/runc" |
65 | RDEPENDS_${PN} += " e2fsprogs-mke2fs" | 65 | RDEPENDS_${PN} += " e2fsprogs-mke2fs conmon util-linux iptables conntrack-tools" |
66 | 66 | ||
67 | inherit systemd | 67 | inherit systemd |
68 | inherit go | 68 | inherit go |
@@ -70,63 +70,14 @@ inherit goarch | |||
70 | inherit pkgconfig | 70 | inherit pkgconfig |
71 | 71 | ||
72 | EXTRA_OEMAKE="BUILDTAGS=''" | 72 | EXTRA_OEMAKE="BUILDTAGS=''" |
73 | CRIO_BUILD_CROSS ?= "1" | ||
74 | 73 | ||
75 | do_compile() { | 74 | do_compile() { |
76 | set +e | 75 | set +e |
77 | export GOPATH="${S}/src/import:${S}/src/import/vendor" | ||
78 | |||
79 | # link fixups for compilation | ||
80 | rm -f ${S}/src/import/vendor/src | ||
81 | ln -sf ./ ${S}/src/import/vendor/src | ||
82 | |||
83 | mkdir -p ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o | ||
84 | ln -sf ../../../../cmd ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/cmd | ||
85 | ln -sf ../../../../test ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/test | ||
86 | ln -sf ../../../../oci ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/oci | ||
87 | ln -sf ../../../../server ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/server | ||
88 | ln -sf ../../../../pkg ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/pkg | ||
89 | ln -sf ../../../../libpod ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/libpod | ||
90 | ln -sf ../../../../libkpod ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/libkpod | ||
91 | ln -sf ../../../../utils ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/utils | ||
92 | ln -sf ../../../../types ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/types | ||
93 | ln -sf ../../../../version ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/version | ||
94 | ln -sf ../../../../lib ${S}/src/import/vendor/github.com/kubernetes-sigs/cri-o/lib | ||
95 | |||
96 | |||
97 | rm -f ${S}/src/import/src | ||
98 | ln -sf ./ ${S}/src/import/src | ||
99 | mkdir -p ${S}/src/import/src/github.com/cri-o/cri-o/cmd | ||
100 | ln -sf ../../../../cmd/crio-config ${S}/src/import/src/github.com/cri-o/cri-o/cmd | ||
101 | ln -sf ../../../lib ${S}/src/import/src/github.com/cri-o/cri-o/lib | ||
102 | ln -sf ../../../oci ${S}/src/import/src/github.com/cri-o/cri-o/oci | ||
103 | ln -sf ../../../pkg ${S}/src/import/src/github.com/cri-o/cri-o/pkg | ||
104 | ln -sf ../../../utils ${S}/src/import/src/github.com/cri-o/cri-o/utils | ||
105 | ln -sf ../../../version ${S}/src/import/src/github.com/cri-o/cri-o/version | ||
106 | ln -sf ../../../server ${S}/src/import/src/github.com/cri-o/cri-o/server | ||
107 | ln -sf ../../../types ${S}/src/import/src/github.com/cri-o/cri-o/types | ||
108 | |||
109 | # fixes the bin/crio build of oe_runmake binaries below | ||
110 | ln -sf ../../../../cmd/crio ${S}/src/import/src/github.com/cri-o/cri-o/cmd/ | ||
111 | |||
112 | # workaround `use of vendored package not allowed' failure | ||
113 | mv ${S}/src/import/vendor/golang.org ${S}/src/import/ | ||
114 | 76 | ||
115 | cd ${S}/src/import | 77 | cd ${S}/src/import |
116 | 78 | ||
117 | if [ "${CRIO_BUILD_CROSS}" = "1" ]; then | 79 | oe_runmake local-cross |
118 | # New: using the -cross target. But this doesn't build conmon and pause. So | 80 | oe_runmake binaries |
119 | # keeping the old parts around if someone yells. | ||
120 | oe_runmake local-cross | ||
121 | else | ||
122 | # Build conmon/config.h, requires native versions of | ||
123 | # cmd/crio-config/config.go and oci/oci.go | ||
124 | (CGO_ENABLED=0 GO=go GOARCH=${BUILD_GOARCH} GOOS=${BUILD_GOOS} oe_runmake conmon/config.h) | ||
125 | rm -f bin/crio-config | ||
126 | rm -rf vendor/pkg | ||
127 | |||
128 | oe_runmake binaries | ||
129 | fi | ||
130 | } | 81 | } |
131 | 82 | ||
132 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" | 83 | SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${PN}','',d)}" |
@@ -141,6 +92,7 @@ do_install() { | |||
141 | install -d ${D}/${libexecdir}/crio | 92 | install -d ${D}/${libexecdir}/crio |
142 | install -d ${D}/${sysconfdir}/crio | 93 | install -d ${D}/${sysconfdir}/crio |
143 | install -d ${D}${systemd_unitdir}/system/ | 94 | install -d ${D}${systemd_unitdir}/system/ |
95 | install -d ${D}/usr/share/containers/oci/hooks.d | ||
144 | 96 | ||
145 | install ${WORKDIR}/crio.conf ${D}/${sysconfdir}/crio/crio.conf | 97 | install ${WORKDIR}/crio.conf ${D}/${sysconfdir}/crio/crio.conf |
146 | 98 | ||
@@ -149,19 +101,21 @@ do_install() { | |||
149 | install -m 755 -D ${S}/src/import/test/testdata/* ${D}/${sysconfdir}/crio/config/ | 101 | install -m 755 -D ${S}/src/import/test/testdata/* ${D}/${sysconfdir}/crio/config/ |
150 | 102 | ||
151 | install ${S}/src/import/bin/crio.cross.linux* ${D}/${localbindir}/crio | 103 | install ${S}/src/import/bin/crio.cross.linux* ${D}/${localbindir}/crio |
152 | 104 | install ${S}/src/import/bin/crio-status ${D}/${localbindir}/ | |
153 | if [ "${CRIO_BUILD_CROSS}" = "1" ]; then | 105 | install ${S}/src/import/bin/pinns ${D}/${localbindir}/ |
154 | install ${S}/src/import/bin/conmon ${D}/${localbindir}/crio | ||
155 | install ${S}/src/import/bin/pause ${D}/${localbindir}/crio | ||
156 | fi | ||
157 | 106 | ||
158 | install -m 0644 ${S}/src/import/contrib/systemd/crio.service ${D}${systemd_unitdir}/system/ | 107 | install -m 0644 ${S}/src/import/contrib/systemd/crio.service ${D}${systemd_unitdir}/system/ |
159 | install -m 0644 ${S}/src/import/contrib/systemd/crio-shutdown.service ${D}${systemd_unitdir}/system/ | 108 | install -m 0644 ${S}/src/import/contrib/systemd/crio-shutdown.service ${D}${systemd_unitdir}/system/ |
109 | install -m 0644 ${S}/src/import/contrib/systemd/crio-wipe.service ${D}${systemd_unitdir}/system/ | ||
160 | } | 110 | } |
161 | 111 | ||
162 | FILES_${PN}-config = "${sysconfdir}/crio/config/*" | 112 | FILES_${PN}-config = "${sysconfdir}/crio/config/*" |
163 | FILES_${PN} += "${systemd_unitdir}/system/*" | 113 | FILES_${PN} += "${systemd_unitdir}/system/*" |
164 | FILES_${PN} += "/usr/local/bin/*" | 114 | FILES_${PN} += "/usr/local/bin/*" |
115 | FILES_${PN} += "/usr/share/containers/oci/hooks.d" | ||
116 | |||
117 | # don't clobber hooks.d | ||
118 | ALLOW_EMPTY_${PN} = "1" | ||
165 | 119 | ||
166 | INSANE_SKIP_${PN} += "ldflags already-stripped" | 120 | INSANE_SKIP_${PN} += "ldflags already-stripped" |
167 | 121 | ||
diff --git a/recipes-containers/cri-o/files/crio.conf b/recipes-containers/cri-o/files/crio.conf index 9135df08..899d255b 100644 --- a/recipes-containers/cri-o/files/crio.conf +++ b/recipes-containers/cri-o/files/crio.conf | |||
@@ -24,7 +24,7 @@ storage_option = [ | |||
24 | [crio.api] | 24 | [crio.api] |
25 | 25 | ||
26 | # listen is the path to the AF_LOCAL socket on which crio will listen. | 26 | # listen is the path to the AF_LOCAL socket on which crio will listen. |
27 | listen = "/var/run/crio.sock" | 27 | listen = "/var/run/crio/crio.sock" |
28 | 28 | ||
29 | # stream_address is the IP address on which the stream server will listen | 29 | # stream_address is the IP address on which the stream server will listen |
30 | stream_address = "" | 30 | stream_address = "" |
@@ -69,7 +69,7 @@ runtime_untrusted_workload = "" | |||
69 | default_workload_trust = "trusted" | 69 | default_workload_trust = "trusted" |
70 | 70 | ||
71 | # conmon is the path to conmon binary, used for managing the runtime. | 71 | # conmon is the path to conmon binary, used for managing the runtime. |
72 | conmon = "/usr/libexec/crio/conmon" | 72 | conmon = "/usr/bin/conmon" |
73 | 73 | ||
74 | # conmon_env is the environment variable list for conmon process, | 74 | # conmon_env is the environment variable list for conmon process, |
75 | # used for passing necessary environment variable to conmon or runtime. | 75 | # used for passing necessary environment variable to conmon or runtime. |
@@ -132,8 +132,7 @@ insecure_registries = [ | |||
132 | 132 | ||
133 | # registries is used to specify a comma separated list of registries to be used | 133 | # registries is used to specify a comma separated list of registries to be used |
134 | # when pulling an unqualified image (e.g. fedora:rawhide). | 134 | # when pulling an unqualified image (e.g. fedora:rawhide). |
135 | registries = [ | 135 | registries = ['docker.io', 'registry.fedoraproject.org', 'registry.access.redhat.com'] |
136 | ] | ||
137 | 136 | ||
138 | # The "crio.network" table contains settings pertaining to the | 137 | # The "crio.network" table contains settings pertaining to the |
139 | # management of CNI plugins. | 138 | # management of CNI plugins. |