Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@grahamc
Copy link

@grahamc grahamc commented Aug 28, 2023

Hi Alex,

Thanks for the excellent tar crate. While developing a project, we needed a way to override the mtime. This was the most direct route to get it done, even though I'm rather sure it isn't something you'd want to merge upstream.

So, here is some code we wrote. We're sending the PR for you to look at and consider as a use case. We'd be interested in hearing back from you if you're interested in a better implementation, and if so what you think that might look like.

Thank you!

Copy link
Contributor

@adamqqqplay adamqqqplay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grahamc Hi grahamc, it looks like the CI test is failing, maybe you could fix it first, thanks!

@grahamc
Copy link
Author

grahamc commented Oct 15, 2023

We certainly could. Does that mean you're interested in accepting this change as designed?

@cgwalters
Copy link
Collaborator

Hi @grahamc 👋

This relates a lot to e.g. #346 and #343 a bit.

In your use case, do you also want to canonicalize uid/gid? I'd guess so...which would argue that we should fix HeaderMode::Deterministic.

Also I think we should call out that it's really not terribly hard to do "manually" walk a directory recursively and add entries to it:

See e.g. https://github.com/coreos/cargo-vendor-filterer/blob/28c7760484240184c95f76b5a3f11d92a6779ff1/src/main.rs#L475-L510

We could put that in examples/build-walkdir.rs or something that people could at least copy-paste as a reference?

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.

4 participants