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

gh-130819: Update tarfile.py#_create_gnu_long_header to align with GNU Tar #130820

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gdh1995
Copy link

@gdh1995 gdh1995 commented Mar 4, 2025

The latest tarfile may still generate a file slightly different with the one made by GNU Tar, whenever a path name is longer than 100 bytes. So this PR tries to avoid the difference.

More details are in #130819 .

@gdh1995 gdh1995 requested a review from ethanfurman as a code owner March 4, 2025 03:03
Copy link

cpython-cla-bot bot commented Mar 4, 2025

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Mar 4, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@gdh1995 gdh1995 force-pushed the fix_long_gnu_name_in_tarfile branch from 24b90cf to 283b34e Compare March 5, 2025 02:38
Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you motivate the choice for this? namely is there a real benefit between having an explicit user+mode rather than letting the "defaults"? And more importantly, can you cite the relevant manpage / specs where we can find this?

Note: whether this is accpeted or not, this should be treated as a feature request and not a bug IMO. As such, a What's New entry will need to be created, unless the motivation behind this change is not sufficient (in which case we would close the issue as "not planned")

Comment on lines +1193 to +1195
info["mode"] = 0o100644
info["uname"] = "root"
info["gname"] = "root"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where in the specs are these decided?

@bedevere-app
Copy link

bedevere-app bot commented Mar 8, 2025

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@picnixz
Copy link
Member

picnixz commented Mar 8, 2025

Oh btw, please reply on the issue instead of the PR (I'll repost my comment above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants