Skip to content

Do not set gzipWriter.Name#120

Merged
bcmyers merged 1 commit intomainfrom
the-cop/remove-name-from-gzip-writer
Apr 10, 2026
Merged

Do not set gzipWriter.Name#120
bcmyers merged 1 commit intomainfrom
the-cop/remove-name-from-gzip-writer

Conversation

@The-Cop
Copy link
Copy Markdown
Contributor

@The-Cop The-Cop commented Apr 10, 2026

When dd_oci_image builds FIPS and non-FIPS variants, they get different target names (.fips. vs .internal.), which means the output filenames differ. The gzip blobs end up 4 bytes apart in the header despite having byte-identical content, so the registry sees different SHA256 digests and can't deduplicate them.

The FNAME field is optional per RFC 1952, and Go's gzip.Writer omits it when Name is empty (the default). Nobody downstream reads it — OCI registries identify layers by digest.

When dd_oci_image builds FIPS and non-FIPS variants, they get different target names (.fips. vs .internal.), which means the output filenames differ. The gzip blobs end up 4 bytes apart in the header despite having byte-identical content, so the registry sees different SHA256 digests and can't deduplicate them.
The FNAME field is optional per RFC 1952, and Go's gzip.Writer omits it when Name is empty (the default). Nobody downstream reads it — OCI registries identify layers by digest.
@bcmyers bcmyers merged commit a5acb70 into main Apr 10, 2026
2 checks passed
@bcmyers bcmyers deleted the the-cop/remove-name-from-gzip-writer branch April 10, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants