Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow tests to pass after 2038 #1838

Merged
merged 2 commits into from Jan 20, 2023
Merged

Conversation

bmwiedemann
Copy link
Contributor

@bmwiedemann bmwiedemann commented Jan 13, 2023

new deadline is 2242-03-16

https://wiki.osdev.org/USTAR documents the 12-byte octal time format
that provides 12*3 = 36 bits for mtime.

Fixes #1837

@bmwiedemann bmwiedemann force-pushed the ftbfs2038 branch 3 times, most recently from 608ae9f to 805edd5 Compare January 13, 2023 11:50
@kientzle
Copy link
Contributor

One clarification: POSIX requires that the 12-byte field include at least one terminator character which must be space or NULL. That limits you to 33 bits (11 bytes) in a fully standards-conforming implementation. (Libarchive is willing to bend these rules, but in this particular case, I don't see any reason to go beyond 33 bits right now.)

new deadline is 2242-03-16

https://wiki.osdev.org/USTAR documents the 12-byte octal time format
that provides 12*3 = 36 bits for mtime.
But apparently POSIX requires a terminator byte that reduces it to 33 bits.
https://pubs.opengroup.org/onlinepubs/7908799/xcu/pax.html#tag_001_014_1700_006

Fixes libarchive#1837

This patch was done while working on reproducible builds for openSUSE.
@kientzle
Copy link
Contributor

Nice! Thanks for working through this so conscientously!

@kientzle kientzle merged commit 9079959 into libarchive:master Jan 20, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bsdtar_test_option_C_mtree fails in 2038
2 participants