-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathBUILD.bazel
51 lines (47 loc) · 1.77 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
load("//bazel:package.bzl", "homeworld_deb")
load("//bazel:substitute.bzl", "substitute")
load("//bazel:assert.bzl", "build_assert")
# TODO: for crio, use flags -ldflags '-s -w -X main.gitCommit="[...]" -X main.buildInfo=[...]'
# and -tags "exclude_graphdriver_devicemapper libdm_no_deferred_remove containers_image_ostree_stub seccomp containers_image_ostree_stub"
# (maybe?)
homeworld_deb(
name = "package",
bin = {
"@com_github_cri_o_cri_o//cmd/crio": "/usr/bin/crio",
"@com_github_containers_conmon//:conmon": "/usr/libexec/crio/conmon",
},
data = {
":crio.conf": "/etc/crio/crio.conf",
"@com_github_cri_o_cri_o//:crio-umount.conf": "/usr/local/share/oci-umount/oci-umount.d/crio-umount.conf",
":crictl.yaml": "/etc/crictl.yaml",
":crio.service": "/usr/lib/systemd/system/crio.service",
":crio-shutdown.service": "/usr/lib/systemd/system/crio-shutdown.service",
},
depends = [
"homeworld-cni-plugins",
"homeworld-oci-sig-policy",
"homeworld-runc",
"libgpgme11",
"libostree-1-1",
],
package = "homeworld-cri-o",
visibility = ["//visibility:public"],
)
substitute(
name = "crio.conf.substituted",
kfs = {
"PAUSE_DIGEST": "//cri-o/pause:oci.ocidigest",
},
template = ":crio.conf.in",
)
build_assert(
name = "crio.conf",
src = ":crio.conf.substituted",
condition = "diff -u $(location @com_github_cri_o_cri_o//:crio.conf) $(location :crio.conf.upstream)",
message = "upstream's default crio.conf has changed; you must merge the changes into crio.conf, " +
"and update crio.conf.upstream to be the new upstream version",
deps = [
":crio.conf.upstream",
"@com_github_cri_o_cri_o//:crio.conf",
],
)