Newer openbsd handles this.
--
Sent from a phone, apologies for poor formatting.
On 25 September 2022 22:16:31 Julian Smith <jules@op59.net> wrote:
> I'm using OpenBSD 7.0 GENERIC.MP#232 amd64.
>
> OpenBSD's tar and pax seem to always think mtimes are zero when
> extracting tar files created by OpenBSD's python3 (python-3.8.12).
>
> These tar files have correct mtimes when opened by python3 itself or
> read by gtar from ports. Similarly, Linux tar sees correct mtimes.
>
> `file` claims the tar files are 'POSIX tar archive'.
>
> OpenBSD's python2 doesn't seem to have this probelem - it creates tar
> files that work correctly with OpenBSD's tar and pax.
>
> When loading a python3-created tar file in python3, it says the format
> is 2, which is tarfile.PAX_FORMAT, so i would have expected things
> to work with tar and pax. Python-3.8 changed the default from
> GNU_FORMAT to PAX_FORMAT
> (https://docs.python.org/3/library/tarfile.html#tar-formats "Changed in
> version 3.8: The default format for new archives was changed to
> PAX_FORMAT from GNU_FORMAT.").
>
> [So could it be possible that python3 is actually generating GNU_FORMAT
> tar archives, but claiming that they are PAX_FORMAT? I've had a quick
> look at Python-3.8.12/Lib/tarfile.py and it doesn't seem to have any
> obvious error like this.]
>
> The attached tarmtime.py script demonstrates the problem - it creates
> various tar archives and extracts with `tar` and `pax` and shows the
> `Jan 1 1970` mtimes.
>
>
> Thanks for any advice here,
>
> - Julian
>
> --
> http://op59.net
No comments:
Post a Comment