Skip to content

Add support for erofs and squashfs layer media types #1191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Layers SHOULD be packed and unpacked reproducibly to avoid changing the layer Di

NOTE: Do not confuse DiffIDs with [layer digests](manifest.md#image-manifest-property-descriptions), often referenced in the manifest, which are digests over compressed or uncompressed content.

For erofs and squashfs layers, a layer DiffID is the digest over the layer itself.

### Layer ChainID

For convenience, it is sometimes useful to refer to a stack of layers with a single identifier.
Expand Down
4 changes: 4 additions & 0 deletions layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ This section defines the `application/vnd.oci.image.layer.v1.tar`, `application/

- Layer Changesets for the [media type](media-types.md) `application/vnd.oci.image.layer.v1.tar` MUST be packaged in [tar archive][tar-archive].
- Layer Changesets for the [media type](media-types.md) `application/vnd.oci.image.layer.v1.tar` MUST NOT include duplicate entries for file paths in the resulting [tar archive][tar-archive].
- Layer Changesets for the [media type](media-types.md) `application/vnd.oci.image.layer.v1.erofs` MUST be packaged in [erofs file][erofs].
- Layer Changesets for the [media type](media-types.md) `application/vnd.oci.image.layer.v1.squashfs` MUST be packaged in [squashfs file][squashfs].

## Change Types

Expand Down Expand Up @@ -365,3 +367,5 @@ Implementations SHOULD NOT upload layers tagged with this media type; however, s
[rfc1952_2]: https://tools.ietf.org/html/rfc1952
[tar-archive]: https://en.wikipedia.org/wiki/Tar_(computing)
[rfc8478]: https://tools.ietf.org/html/rfc8478
[squashfs]: https://github.com/plougher/squashfs-tools
[erofs]: https://erofs.docs.kernel.org/
8 changes: 8 additions & 0 deletions specs-go/v1/mediatype.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ const (
// MediaTypeImageLayerZstd is the media type used for zstd compressed
// layers referenced by the manifest.
MediaTypeImageLayerZstd = "application/vnd.oci.image.layer.v1.tar+zstd"

// MediaTypeErofs specifies the media type as erofs filesystem layer
// https://www.iana.org/assignments/media-types/application/vnd.erofs
MediaTypeErofs = "application/vnd.oci.image.layer.v1.erofs"

// MediaTypeSquashfs specifies the media type as squashfs filesystem layer
// https://github.com/plougher/squashfs-tools
MediaTypeSquashfs = "application/vnd.oci.image.layer.v1.squashfs"
)

// Non-distributable layer media-types.
Expand Down