rules_pkg
rules_pkg copied to clipboard
There is no way to tell pkg_tar to not change mtime of the packaged files.
When pkg_tar mtime
attribute is not set (or set to its default value -1) I expected the packaged files to retain their original mtime within the archive. Unfortunately it looks like their mtime is set to Jan 1st 1970 (or Jan 1st 2000 depending on portable_mtime
attribute). I could not find a way to make pkg_tar
to preserve the files mtime.
Strawman proposal:
- pkg_tar should no long auto-unfurl tarballs, and we will not implement a change for that legacy behavior
- add pkg_unfurl which takes tar or zip srcs and returns a provider that specifes the unwrapping of each, with options to
- strip_prefix
- add a new prefix
- change owners
-
preserve mtimes
- the other kinds of stuff that pkg_files might do.
Or maybe it just does the virtual unfurl with ability to preserve mtimes and then pkg_files will to do the rest.
I'm sorry, what is auto-unfurl tarballs
? You do what with what?
Sorry. That was more a note to @nacl and myself about implementation. Right now pkgtar can take a .tar as input and expand it to the constituent files. That behavior is special case to pkg_tar. I won't spend my time adding features to that. Instead, I want to create a rule that takes a tar as input and returns a provider representing that expansion and let all the rules work with that
On Thu, May 6, 2021, 10:02 PM Konstantin Erman @.***> wrote:
I'm sorry, what is auto-unfurl tarballs? You do what with what?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bazelbuild/rules_pkg/issues/265#issuecomment-834003159, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXHHHCFMMWKSUEAGJZYF2DTMNCZPANCNFSM4U63Q45A .
Ah, I see. It makes sense now.
Note from eng meeting. This is probably a dup of the pkg_expand issue.