bazelbuild / bazelbuild/rules_pkg

Packaging rules should support --stamp flag

Open
#287 17 comments 1 reaction 1 assignee Claimed by @aiuto View on GitHub
P2
Dominant language
Starlark
Stars
253
Forks
221
Avg merge
10h 33m
Merged PRs (30d)
1

Description

#285 requested a feature to preserve mtime's in tar files. @aiuto brought up the below WRT how this might be assembled:

_Originally posted by @aiuto in https://github.com/bazelbuild/rules_pkg/issues/285#issuecomment-770153075_

> Let's discuss solutions in an issue first. I would like to to have as many people as possible weigh in on what is useful.
There are a lot of questions
> - do we change the stamp of every file?
> - does that include files which came from pre-made archives that have a particular timestamp of their own?
> - some people want to put the timestamp into the output filename. While I find that dubious, any stamping solution should consider it.
> - Why is stamp_mtime an attribute? Why not just support the --stamp flag. That seems to be the API of least surprise.
> - and.... no solutions that just to .tar. We need do do the appropriate thing for each of pkg_zip, pkg_deb and pkg_rpm. But that makes getting the API right before doing any code even more important.

This issue tracks the design of a "stamping" mechanism for packages prior to implementation, especially with regards to fixing/clamping file modifications. Whether the `--stamp` argument should control this is also a question to consider.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.