Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,26 +101,22 @@ test_task:
BUILDTAGS: 'btrfs_noversion libdm_no_deferred_remove'
- name: "Test w/ opengpg"
env:
BUILDTAGS: 'btrfs_noversion libdm_no_deferred_remove containers_image_openpgp'
BUILDTAGS: &withopengpg 'btrfs_noversion libdm_no_deferred_remove containers_image_openpgp'
script: |
make tools
make test BUILDTAGS="$BUILDTAGS"


#####
###### NOTE: This task is subtantially duplicated in the containers/skopeo
###### repository's `.cirrus.yml`. Changes needed here should first be
###### merged in that repository, before being manually duplicated here.
######
###### The *ONLY* exception is in "setup_script" which must initially
###### clone the skopeo repository.
######
##### NOTE: This task is subtantially duplicated in the containers/skopeo
##### repository's `.cirrus.yml`. Changes made here should be fully merged
##### prior to being manually duplicated and maintained in containers/skopeo.
#####
test_skopeo_task:
alias: test_skopeo
only_if: *not_docs
depends_on:
- validate
- cross
only_if: *not_docs
gce_instance:
image_project: libpod-218412
zone: "us-central1-f"
Expand All @@ -131,25 +127,23 @@ test_skopeo_task:
disk: 200
image_name: ${FEDORA_CACHE_IMAGE_NAME}
matrix:
- name: "Skopeo"
- name: "Skopeo Test"
env:
BUILDTAGS: 'btrfs_noversion libdm_no_deferred_remove'
- name: "Skopeo w/ opengpg"
- name: "Skopeo Test w/ opengpg"
env:
BUILDTAGS: 'btrfs_noversion libdm_no_deferred_remove containers_image_openpgp'
setup_script: |
BUILDTAGS: *withopengpg
setup_script: >-
"${GOSRC}/${SCRIPT_BASE}/runner.sh" setup
vendor_script: >-
"${SKOPEO_PATH}/${SCRIPT_BASE}/runner.sh" vendor
build_script: >-
"${SKOPEO_PATH}/${SCRIPT_BASE}/runner.sh" build
validate_script: >-
"${SKOPEO_PATH}/${SCRIPT_BASE}/runner.sh" validate
unit_script: >-
"${SKOPEO_PATH}/${SCRIPT_BASE}/runner.sh" unit
integration_script: >-
"${SKOPEO_PATH}/${SCRIPT_BASE}/runner.sh" integration
system_script: >-
system_script: >
"${SKOPEO_PATH}/${SCRIPT_BASE}/runner.sh" system


Expand Down
12 changes: 8 additions & 4 deletions directory/directory_dest.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ const version = "Directory Transport Version: 1.1\n"
var ErrNotContainerImageDir = errors.New("not a containers image directory, don't want to overwrite important data")

type dirImageDestination struct {
ref dirReference
compress bool
ref dirReference
compress bool
decompress bool
}

// newImageDestination returns an ImageDestination for writing to a directory.
func newImageDestination(ref dirReference, compress bool) (types.ImageDestination, error) {
d := &dirImageDestination{ref: ref, compress: compress}
func newImageDestination(ref dirReference, compress bool, decompress bool) (types.ImageDestination, error) {
d := &dirImageDestination{ref: ref, compress: compress, decompress: decompress}

// If directory exists check if it is empty
// if not empty, check whether the contents match that of a container image directory and overwrite the contents
Expand Down Expand Up @@ -104,6 +105,9 @@ func (d *dirImageDestination) DesiredLayerCompression() types.LayerCompression {
if d.compress {
return types.Compress
}
if d.decompress {
return types.Decompress
}
return types.PreserveOriginal
}

Expand Down
6 changes: 5 additions & 1 deletion directory/directory_transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ func (ref dirReference) NewImageDestination(ctx context.Context, sys *types.Syst
if sys != nil {
compress = sys.DirForceCompress
}
return newImageDestination(ref, compress)
decompress := false
if sys != nil {
decompress = sys.DirForceDecompress
}
return newImageDestination(ref, compress, decompress)
}

// DeleteImage deletes the named image from the registry, if supported.
Expand Down
2 changes: 2 additions & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,8 @@ type SystemContext struct {
// === dir.Transport overrides ===
// DirForceCompress compresses the image layers if set to true
DirForceCompress bool
// DirForceDecompress decompresses the image layers if set to true
DirForceDecompress bool

// CompressionFormat is the format to use for the compression of the blobs
CompressionFormat *compression.Algorithm
Expand Down
4 changes: 2 additions & 2 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ const (
// VersionMinor is for functionality in a backwards-compatible manner
VersionMinor = 14
// VersionPatch is for backwards-compatible bug fixes
VersionPatch = 0
VersionPatch = 2

// VersionDev indicates development branch. Releases will be empty string.
VersionDev = ""
VersionDev = "-dev"
)

// Version is the specification version that the package types support.
Expand Down