-
Notifications
You must be signed in to change notification settings - Fork 204
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
reproducible tarballs have unexpected checksums on macOS #4657
Comments
@boegel this one is for you 😃 |
@lexming This explains it:
So, the resulting tarball is basically an empty file. Two (well, three) problems here:
For For
|
|
It doesn't. Using |
@boegel using |
@boegel the ownership issue is a big problem. Only root can Good news is that BSD tar does actually support |
PR #4660 adds a more portable setting for timestamps and enables pipeline failures. The issue about |
For Quick & dirty try: import tarfile
import os
def reset(tarinfo):
tarinfo.uid = tarinfo.gid = 0
tarinfo.uname = tarinfo.gname = "root"
tarinfo.mtime = 0
return tarinfo
# Create a tar archive
with tarfile.open("example.tar", "w") as tar:
tar.add("file1.txt", filter=reset)
tar.add("file2.txt", filter=reset)
print("Tar archive created.") (doesn't reproduce exact same tarball on macOS + Linux yet though using empty |
@boegel as discussed, updated #4660 with an implementation using However there is a different problem now, Python version [3.6, 3.8] use the old header format and versions 3.9 onwards use the new one. AFAIK there is no workaround we can use. So the only solution seems to be to support reproducible tarballs in Python 3.9+ only and leave older versions of Python with the current status in 4.9. In time those will become unsupported anyhow. |
This is related to PR easybuilders/easybuild-easyconfigs#21392
The checksum of the generated
lsp-types-0.95.1.tar.gz
with our reproducible tarball code is455f2c12f64c2e293c72efdf2b90b96f5903d6590bd2e496bab5f12750402631
on several Linux systems (RHEL8, Rocky 8, Fedora 40 and Debian Bookworm).However, on MacOS it has an unexpected
59869db34853933b239f1e2219cf7d431da006aa919635478511fabbfc8849d2
.Steps to generate tarball from git repo:
git clone https://github.com/astral-sh/lsp-types.git
cd lsp-types && git checkout 3512a9f33eadc5402cfab1b8f7340824c8ca1439 && cd ..
We need to troubleshoot this on a mac:
head -n 100
on the.tar
filesThe text was updated successfully, but these errors were encountered: