[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Add set_* functions to stat-time?
From: |
Collin Funk |
Subject: |
Add set_* functions to stat-time? |
Date: |
Sun, 17 Mar 2024 11:31:37 -0700 |
User-agent: |
Mozilla Thunderbird |
Hi Paul,
Not sure if this is best suited for a tar mailing list, but since you
wrote stat-time and are a tar maintainer I figured you could help.
But when following Bruno's advice for downloading Eclipse to work on
gnulib-tool.py I ran into this:
$ tar -xf eclipse-inst-jre-linux64.tar.gz
gtar: Ignoring unknown extended header keyword 'LIBARCHIVE.creationtime'
gtar: Ignoring unknown extended header keyword 'LIBARCHIVE.creationtime'
# and many more times...
Is there an interesting in supporting Libarchive extensions in GNU
tar? If so, I can have a look at adding this.
I had a brief look and it seems that it would be fairly simple to add
to 'tar/src/xheader.c'. It seems that this header modifies the
birth time which is a BSD extension if I am not mistaken [1] [2] [3].
Currently, I think that adding a function like this to stat-time.h
would allow me to implement it:
/* Set the birth time of *ST, if avaliable; otherwise return -1. */
_GL_STAT_TIME_INLINE int _GL_ATTRIBUTE_PURE
set_stat_birthtime (_GL_UNUSED struct stat *st,
struct timespec ts);
Any thoughts about this?
[1]
https://github.com/libarchive/libarchive/blob/9ba8292aafacb7de8ff3629e823a862aa2ec569f/libarchive/archive_write_set_format_pax.c#L1187
[2]
https://github.com/libarchive/libarchive/blob/9ba8292aafacb7de8ff3629e823a862aa2ec569f/libarchive/archive_read_support_format_tar.c#L1971
[3]
https://github.com/libarchive/libarchive/blob/9ba8292aafacb7de8ff3629e823a862aa2ec569f/libarchive/tar.5#L468C8-L468C31
Collin
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Add set_* functions to stat-time?,
Collin Funk <=