Filetimestamps and pkg_tar

237 views
Skip to first unread message

Jeremy Lewi

unread,
Mar 10, 2016, 12:04:57 AM3/10/16
to bazel-...@googlegroups.com
Hi bazel users,

I'm using the pkg_tar rule to produce a .tar.gz file. 

The timestamps on the files in the tarball end up being Dec 31 1969.

Is there any way to prevent bazel from setting the timestamps to Dec 31 1969?

The timestamps are too old for the tools I'm trying to work with. Specifically, the unpacked tarball is a python package. If you run 
python setup.py install

I get an error because zip can't handle timestamps before 1980.

I guess one solution would be to write my own genrule to create the tarball.

Suggestions?

Thanks
J

Kamal Marhubi

unread,
Mar 10, 2016, 12:51:25 AM3/10/16
to Jeremy Lewi, bazel-...@googlegroups.com
I can see it making sense to provide a timesstamp attribute on the pkg_tar rule. The default could be unix time 0, but allowing users to change it. Maybe open an issue / feature request for it?

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CA%2BFTfeAG5OADBoEwF7-cbi4o0Ka-sxsxe0SjJ26qLO_0aCBE%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Jeremy Lewi

unread,
Mar 10, 2016, 12:58:51 AM3/10/16
to Kamal Marhubi, bazel-...@googlegroups.com
Thanks I'll do that.

J

b424...@gmail.com

unread,
May 16, 2016, 6:35:38 PM5/16/16
to bazel-discuss, ka...@marhubi.com, jl...@google.com
Has this issue been created? I'm similarly affected and wasn't seeing it on GitHub.

Thanks!

Kristina Chodorow

unread,
May 16, 2016, 6:46:32 PM5/16/16
to b424...@gmail.com, bazel-discuss, Kamal Marhubi, jl...@google.com
I don't think it has been.

Ian McGinnis

unread,
May 20, 2016, 1:38:20 PM5/20/16
to bazel-discuss, b424...@gmail.com, ka...@marhubi.com, jl...@google.com
Oops - originally posted with the wrong email...

Thanks Kristina, I've created an issue for this here: https://github.com/bazelbuild/bazel/issues/1299
Reply all
Reply to author
Forward
0 new messages