Skip to content

support equivalent to tar's --clamp-mtime#409

Open
tofay wants to merge 1 commit into
composefs:mainfrom
tofay:clamp-mtime
Open

support equivalent to tar's --clamp-mtime#409
tofay wants to merge 1 commit into
composefs:mainfrom
tofay:clamp-mtime

Conversation

@tofay
Copy link
Copy Markdown

@tofay tofay commented Jul 15, 2025

I'm using this crate to build reproducible container images from os packages. I want uid/gid's preserved so I don't use HeaderMode::Deterministic, so I manually do the equivalent of tar's clamp-mtime: https://github.com/Metaswitch/rpmoci/blob/fd11658fa8d0085e9275ee000bf5eb58cf9f7e51/src/archive.rs#L100

I can achieve this simpler if this crate supports a clamp-mtime header mode.
The enum's non-exhaustive so this isn't a breaking change.

(I also see #339 which is similar - instead of adding support for clamp mtime directly I could add a header mode that allows the caller to provide a function that can modify the header with the given file metadata)

xzfc added a commit to xzfc/tar-rs that referenced this pull request Feb 8, 2026
Based on changes in composefs#409, composefs#424.
Co-authored-by: Eashwar Ranganathan <eashwar@eashwar.com>
Co-authored-by: Tom Fay <tom@teamfay.co.uk>
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.

1 participant