Skip to content

Commit 485c6de

Browse files
committed
cri-o: upgrade to 1.16.3
This involves: - Separating out the conmon build (following the upstream change) and giving it its own bazel build file patch. - Removing the conmon tests since they require additional build dependencies that we don't need. - Regenerating the CRI-O build file patch. - Updating the CRI-O upstream config file. - Updating deps.bzl.
1 parent ced57ff commit 485c6de

File tree

6 files changed

+486
-118
lines changed

6 files changed

+486
-118
lines changed

platform/cri-o/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ homeworld_deb(
1010
name = "package",
1111
bin = {
1212
"@com_github_cri_o_cri_o//cmd/crio": "/usr/bin/crio",
13-
"@com_github_cri_o_cri_o//conmon": "/usr/libexec/crio/conmon",
13+
"@com_github_containers_conmon//:conmon": "/usr/libexec/crio/conmon",
1414
},
1515
data = {
1616
":crio.conf": "/etc/crio/crio.conf",

platform/cri-o/build.patch

+36-82
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
diff --git a/BUILD.bazel b/BUILD.bazel
22
new file mode 100644
3-
index 0000000..bf0a685
3+
index 000000000..a79f430ae
44
--- /dev/null
55
+++ b/BUILD.bazel
66
@@ -0,0 +1,15 @@
@@ -19,68 +19,8 @@ index 0000000..bf0a685
1919
+ cmd = "\"$(location //cmd/crio)\" --root=\"/nonexistent\" --runroot \"/nonexistent\" --storage-driver=\"\" --config=\"\" config >\"$@\"",
2020
+ visibility = ["//visibility:public"],
2121
+)
22-
diff --git a/conmon/BUILD.bazel b/conmon/BUILD.bazel
23-
new file mode 100644
24-
index 0000000..9b97598
25-
--- /dev/null
26-
+++ b/conmon/BUILD.bazel
27-
@@ -0,0 +1,46 @@
28-
+# TODO: include -std=c99 in C builds
29-
+
30-
+genrule(
31-
+ name = "config.h-genrule",
32-
+ outs = [":conf/config.h"],
33-
+ tools = ["//cmd/crio-config"],
34-
+ cmd = """
35-
+ REL="$$(realpath "$(location //cmd/crio-config)")"
36-
+ cd \"$(@D)\"
37-
+ "$${REL}"
38-
+ """,
39-
+)
40-
+
41-
+cc_library(
42-
+ name = "glibinc",
43-
+ hdrs = [":glibobject-include/glibconfig.h"],
44-
+ includes = ["glibobject-include"],
45-
+ linkopts = ["-lglib-2.0"],
46-
+)
47-
+
48-
+cc_library(
49-
+ name = "configinc",
50-
+ hdrs = [":conf/config.h"],
51-
+ includes = ["conf"],
52-
+)
53-
+
54-
+cc_binary(
55-
+ name = "conmon",
56-
+ srcs = [
57-
+ ":conmon.c",
58-
+ ":cmsg.c",
59-
+ ":cmsg.h",
60-
+ ":utils.c",
61-
+ ":utils.h",
62-
+ ":ctr_logging.c",
63-
+ ":ctr_logging.h",
64-
+ ],
65-
+ # TODO: get these dynamically, not statically
66-
+ defines = [
67-
+ "VERSION='\"1.10.7-dev\"'",
68-
+ "GIT_COMMIT='\"210d46c717c5dcb6d11302723eb9d20575ee7a78\"'",
69-
+ ],
70-
+ deps = [":glibinc", ":configinc"],
71-
+ copts = ["-I/usr/include/glib-2.0"],
72-
+ visibility = ["//visibility:public"],
73-
+)
74-
diff --git a/conmon/glibobject-include b/conmon/glibobject-include
75-
new file mode 120000
76-
index 0000000..3638b19
77-
--- /dev/null
78-
+++ b/conmon/glibobject-include
79-
@@ -0,0 +1 @@
80-
+/usr/lib/x86_64-linux-gnu/glib-2.0/include
81-
\ No newline at end of file
8222
diff --git a/vendor/github.com/containers/storage/pkg/devicemapper/BUILD.bazel b/vendor/github.com/containers/storage/pkg/devicemapper/BUILD.bazel
83-
index bd64ed0..a12b9f5 100644
23+
index c8f3bf6be..495ea30a4 100644
8424
--- a/vendor/github.com/containers/storage/pkg/devicemapper/BUILD.bazel
8525
+++ b/vendor/github.com/containers/storage/pkg/devicemapper/BUILD.bazel
8626
@@ -12,6 +12,7 @@ go_library(
@@ -92,7 +32,7 @@ index bd64ed0..a12b9f5 100644
9232
importpath = "github.com/containers/storage/pkg/devicemapper",
9333
visibility = ["//visibility:public"],
9434
diff --git a/vendor/github.com/seccomp/libseccomp-golang/BUILD.bazel b/vendor/github.com/seccomp/libseccomp-golang/BUILD.bazel
95-
index 3a0a989..9e0efbe 100644
35+
index 6cd7977bd..c51281f0d 100644
9636
--- a/vendor/github.com/seccomp/libseccomp-golang/BUILD.bazel
9737
+++ b/vendor/github.com/seccomp/libseccomp-golang/BUILD.bazel
9838
@@ -7,6 +7,7 @@ go_library(
@@ -103,20 +43,37 @@ index 3a0a989..9e0efbe 100644
10343
importmap = "github.com/cri-o/cri-o/vendor/github.com/seccomp/libseccomp-golang",
10444
importpath = "github.com/seccomp/libseccomp-golang",
10545
visibility = ["//visibility:public"],
106-
--- a/vendor/k8s.io/apimachinery/pkg/util/sets/BUILD 2019-09-29 15:55:01.213000000 -0400
107-
+++ b/vendor/k8s.io/apimachinery/pkg/util/sets/BUILD 2019-09-29 15:36:54.915000000 -0400
46+
diff --git a/vendor/golang.org/x/crypto/ed25519/BUILD.bazel b/vendor/golang.org/x/crypto/ed25519/BUILD.bazel
47+
index 36055b042..1e3c1c9a5 100644
48+
--- a/vendor/golang.org/x/crypto/ed25519/BUILD.bazel
49+
+++ b/vendor/golang.org/x/crypto/ed25519/BUILD.bazel
50+
@@ -2,10 +2,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
51+
52+
go_library(
53+
name = "go_default_library",
54+
- srcs = [
55+
- "ed25519.go",
56+
- "ed25519_go113.go",
57+
- ],
58+
+ srcs = ["ed25519.go"],
59+
importmap = "github.com/cri-o/cri-o/vendor/golang.org/x/crypto/ed25519",
60+
importpath = "golang.org/x/crypto/ed25519",
61+
visibility = ["//visibility:public"],
62+
diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/BUILD b/vendor/k8s.io/apimachinery/pkg/util/sets/BUILD
63+
index 4d61ac5ba..784db97c9 100644
64+
--- a/vendor/k8s.io/apimachinery/pkg/util/sets/BUILD
65+
+++ b/vendor/k8s.io/apimachinery/pkg/util/sets/BUILD
10866
@@ -1,6 +1,5 @@
10967
package(default_visibility = ["//visibility:public"])
11068

11169
-load("@io_k8s_repo_infra//defs:go.bzl", "go_genrule")
11270
load(
11371
"@io_bazel_rules_go//go:def.bzl",
11472
"go_library",
115-
@@ -19,35 +13,6 @@
116-
importmap = "github.com/cri-o/cri-o/vendor/k8s.io/apimachinery/pkg/util/sets",
73+
@@ -21,35 +20,6 @@ go_library(
11774
importpath = "k8s.io/apimachinery/pkg/util/sets",
11875
)
119-
-
76+
12077
-# This rule makes all sorts of terrible assumptions that it's running inside k8s.io/kubernetes, even though it's part of k8s.io/apimachinery. :\
12178
-go_genrule(
12279
- name = "set-gen",
@@ -145,22 +102,19 @@ index 3a0a989..9e0efbe 100644
145102
- "//vendor/k8s.io/code-generator/cmd/set-gen",
146103
- ],
147104
-)
148-
105+
-
149106
filegroup(
150107
name = "package-srcs",
151-
--- a/vendor/golang.org/x/crypto/ed25519/BUILD.bazel 2019-09-29 15:57:46.980000000 -0400
152-
+++ b/vendor/golang.org/x/crypto/ed25519/BUILD.bazel 2019-09-29 15:36:54.862000000 -0400
153-
@@ -2,12 +2,9 @@
108+
srcs = glob(["**"]),
109+
diff --git a/vendor/k8s.io/component-base/metrics/BUILD b/vendor/k8s.io/component-base/metrics/BUILD
110+
index 06398d377..9feb27b0c 100644
111+
--- a/vendor/k8s.io/component-base/metrics/BUILD
112+
+++ b/vendor/k8s.io/component-base/metrics/BUILD
113+
@@ -4,7 +4,6 @@ load(
114+
"@io_bazel_rules_go//go:def.bzl",
115+
"go_library",
116+
)
117+
-load("//staging/src/k8s.io/component-base/version:def.bzl", "version_x_defs")
154118

155119
go_library(
156120
name = "go_default_library",
157-
- srcs = [
158-
- "ed25519.go",
159-
- "ed25519_go113.go",
160-
- ],
161-
+ srcs = ["ed25519.go"],
162-
importmap = "github.com/cri-o/cri-o/vendor/golang.org/x/crypto/ed25519",
163-
importpath = "golang.org/x/crypto/ed25519",
164-
visibility = ["//visibility:public"],
165-
deps = ["//vendor/golang.org/x/crypto/ed25519/internal/edwards25519:go_default_library"],
166-
)

0 commit comments

Comments
 (0)