File mediatype.patch of Package umoci

Index: umoci-0.4.5/new.go
===================================================================
--- umoci-0.4.5.orig/new.go
+++ umoci-0.4.5/new.go
@@ -68,6 +68,7 @@ func NewImage(engineExt casext.Engine, t
 	manifest := ispec.Manifest{
 		Versioned: imeta.Versioned{
 			SchemaVersion: 2, // FIXME: This is hardcoded at the moment.
+			MediaType: ispec.MediaTypeImageManifest,
 		},
 		Config: ispec.Descriptor{
 			MediaType: ispec.MediaTypeImageConfig,
Index: umoci-0.4.5/oci/cas/dir/dir.go
===================================================================
--- umoci-0.4.5.orig/oci/cas/dir/dir.go
+++ umoci-0.4.5/oci/cas/dir/dir.go
@@ -412,6 +412,7 @@ func Create(path string) error {
 	defaultIndex := ispec.Index{
 		Versioned: imeta.Versioned{
 			SchemaVersion: 2, // FIXME: This is hardcoded at the moment.
+			MediaType: ispec.MediaTypeImageIndex,
 		},
 	}
 	if err := json.NewEncoder(indexFh).Encode(defaultIndex); err != nil {
Index: umoci-0.4.5/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go
===================================================================
--- umoci-0.4.5.orig/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go
+++ umoci-0.4.5/vendor/github.com/opencontainers/image-spec/specs-go/versioned.go
@@ -20,4 +20,5 @@ package specs
 type Versioned struct {
 	// SchemaVersion is the image manifest schema that this image follows
 	SchemaVersion int `json:"schemaVersion"`
+	MediaType string `json:"mediaType"`
 }
openSUSE Build Service is sponsored by