archive: add WithSourceDateEpoch() for whiteouts

This makes diff archives to be reproducible.

The value is expected to be passed from CLI applications via the $SOUCE_DATE_EPOCH env var.

See https://reproducible-builds.org/docs/source-date-epoch/
for the $SOURCE_DATE_EPOCH specification.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2022-10-08 08:45:03 +09:00
parent 6fcfcf3a89
commit 70fbedc217
13 changed files with 390 additions and 104 deletions

View File

@@ -2827,6 +2827,7 @@ file {
name: "github.com/containerd/containerd/api/services/diff/v1/diff.proto"
package: "containerd.services.diff.v1"
dependency: "google/protobuf/any.proto"
dependency: "google/protobuf/timestamp.proto"
dependency: "github.com/containerd/containerd/api/types/mount.proto"
dependency: "github.com/containerd/containerd/api/types/descriptor.proto"
message_type {
@@ -2928,6 +2929,14 @@ file {
type_name: ".containerd.services.diff.v1.DiffRequest.LabelsEntry"
json_name: "labels"
}
field {
name: "source_date_epoch"
number: 6
label: LABEL_OPTIONAL
type: TYPE_MESSAGE
type_name: ".google.protobuf.Timestamp"
json_name: "sourceDateEpoch"
}
nested_type {
name: "LabelsEntry"
field {