-
Notifications
You must be signed in to change notification settings - Fork 181
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
Use GNU_FORMAT for tarfiles for dpkg compatibility. #201
Conversation
…s Py3.8 change "The default format for new archives was changed to PAX_FORMAT from GNU_FORMAT." and resulting > unsupported PAX tar header type 'x' on `dpkg --install`
I've verified this fixes the "unsupported PAX tar header" issue when building debs containing tarballs via the following patch: -http_archive(
+git_repository(
name = "rules_pkg",
- sha256 = "4ba8f4ab0ff85f2484287ab06c0d871dcb31cc54d439457d28fd4ae14b18450a",
- url = "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz",
+ remote = "https://github.com/itdaniher/rules_pkg.git",
+ commit = "b16882f7d5f15201dd3d49b5aadd67cabca57b9f",
+ patch_cmds = ["mv pkg/* ."]
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 things first:
- Please create an issue for new features before sending a PR
- This needs integration tests. You are probably better off waiting until my PR changing the tar tests goes in
- you are changing the format, this needs to be behind a flag.
@aiuto Thanks for the timely response. This is not a new feature, but a bugfix for a behavior change introduced in Python 3.8 causing
upon install attempt. I'll open an issue for this bugfix, which merely ensures rules_pkg produces the same format of archive on Ubuntu 20.04 as it does in your 14.04 CI. Can you elaborate the use case for a flag (enabling PAX_FORMAT) which creates invalid deb files? |
@itdaniher oh, you hit basically the same issue as I did! Maybe the tests here are helpful: #204 |
@aiuto it's worth noting that this patch is a no-op in Python < 3.8, since the default was GNU_FORMAT up until that point. This avoids a breaking change by keeping the default the same, so I also don't see the point in a flag. |
I see your point, but I want to look into this deeper. That probably won't be until next week. |
Let's go with #204, since that has test cases for long file names. |
Add the format=tarfile.GNU_FORMAT to tarfile.open arguments to address Py3.8 change "The default format for new archives was changed to PAX_FORMAT from GNU_FORMAT."
and resulting
on
dpkg --install
Google CLA signed today.