Add an OmitLayerHistoryEntry field to CommitOptions, which more or less
causes us to reproduce our base image, except with PrependedEmptyLayers,
AppendedEmptyLayers, PrependedLinkedLayers, AppendedLinkedLayers, and
config changes still added in.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Add a unit test that commits OCI layouts with various types of
compression specified, and verifies that the layers end up written with
the desired compression and media type descriptors.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Add a --source-date-epoch flag, defaulting to $SOURCE_DATE_EPOCH if set,
which sets the created-on date and the timestamp for the new history
entries, but does not default to modifying the timestamps on contents in
new layers.
Add a --rewrite-timestamp flag, which "clamps" timestamps in the new
layers to not be later than the --source-date-epoch value if both
the --rewrite-timestamp and --source-date-epoch flags were set.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
In unit tests that create a SystemContext, point that SystemContext at
the testing signature policy and registries configuration. This should
cause us to pay attention to mirroring settings for images used by this
set of tests.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Add API for adding arbitrary layers at commit-time via CommitOptions,
and via methods of the Builder type.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>