build/binary_tarball: rename from static_binary_tarball
The static_binary_tarball rule no longer has a transition to build
statically, so the "static" part of the name is not meaningful anymore.
Change-Id: Ifaecf2f7846a963d957d4bfcc89a3d9e7e911f5c
Reviewed-on: https://review.monogon.dev/c/monogon/+/4415
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/build/binary_tarball/spec/BUILD.bazel b/build/binary_tarball/spec/BUILD.bazel
new file mode 100644
index 0000000..bd02812
--- /dev/null
+++ b/build/binary_tarball/spec/BUILD.bazel
@@ -0,0 +1,36 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@rules_proto_grpc_buf//:defs.bzl", "buf_proto_lint_test")
+
+buf_proto_lint_test(
+ name = "spec_proto_lint_test",
+ except_rules = [
+ "PACKAGE_VERSION_SUFFIX",
+ ],
+ protos = [":spec_proto"],
+ use_rules = [
+ "DEFAULT",
+ "COMMENTS",
+ ],
+)
+
+proto_library(
+ name = "spec_proto",
+ srcs = ["spec.proto"],
+ visibility = ["//visibility:public"],
+)
+
+go_proto_library(
+ name = "spec_go_proto",
+ importpath = "source.monogon.dev/build/binary_tarball/spec",
+ proto = ":spec_proto",
+ visibility = ["//visibility:public"],
+)
+
+go_library(
+ name = "spec",
+ embed = [":spec_go_proto"],
+ importpath = "source.monogon.dev/build/binary_tarball/spec",
+ visibility = ["//visibility:public"],
+)
diff --git a/build/binary_tarball/spec/gomod-generated-placeholder.go b/build/binary_tarball/spec/gomod-generated-placeholder.go
new file mode 100644
index 0000000..ca2145c
--- /dev/null
+++ b/build/binary_tarball/spec/gomod-generated-placeholder.go
@@ -0,0 +1,4 @@
+// Copyright The Monogon Project Authors.
+// SPDX-License-Identifier: Apache-2.0
+
+package spec
diff --git a/build/binary_tarball/spec/spec.proto b/build/binary_tarball/spec/spec.proto
new file mode 100644
index 0000000..1e2e17e
--- /dev/null
+++ b/build/binary_tarball/spec/spec.proto
@@ -0,0 +1,32 @@
+// Copyright 2020 The Monogon Project Authors.
+//
+// SPDX-License-Identifier: Apache-2.0
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package build.binary_tarball.spec;
+
+// Spec is a spec of what goes into a binary_tarball
+message Spec {
+ repeated File file = 1;
+}
+
+// File is a single file in the tarball
+message File {
+ // src contains the path of the file on the build host
+ string src = 1;
+ // path contains the path in the tarball
+ string path = 2;
+}