Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/libduckdb-sys/build_bundled_cc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ fn untar_archive(out_dir: &str) {
let tar_gz = std::fs::File::open(path).expect("archive file");
let tar = flate2::read::GzDecoder::new(tar_gz);
let mut archive = tar::Archive::new(tar);
// These archives are generated for reproducibility, not source mtimes.
// Skipping mtime restoration also avoids Windows SetFileTime failures on
// filesystems such as FAT32, which cannot represent Unix epoch mtimes.
archive.set_preserve_mtime(false);
archive.unpack(out_dir).expect("archive");
}

Expand Down
Binary file modified crates/libduckdb-sys/duckdb.tar.gz
Binary file not shown.
7 changes: 6 additions & 1 deletion crates/libduckdb-sys/update_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
)
SRC_DIR = SCRIPT_DIR / "src"

# Keep the timestamp reproducible while staying within the FAT/FAT32 date
# range used by some Windows target directories. Unix epoch mtimes can fail
# when archive tools restore them through SetFileTime.
ARCHIVE_MTIME = 946684800 # 2000-01-01T00:00:00Z

# List of extensions' sources to grab. Technically, these sources will be compiled
# but not included in the final build unless they're explicitly enabled.
EXTENSIONS = ["core_functions", "parquet", "json"]
Expand Down Expand Up @@ -109,7 +114,7 @@ def normalized_tarinfo(path):
tarinfo.gid = 0
tarinfo.uname = ""
tarinfo.gname = ""
tarinfo.mtime = 0
tarinfo.mtime = ARCHIVE_MTIME
tarinfo.pax_headers = {}

if path.is_symlink():
Expand Down
Loading