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

Tarball produced by Archive::Tar::Wrapper + GNU tar 1.23 is not readable by HP-UX tar #18

Open
plicease opened this issue Sep 10, 2020 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@plicease
Copy link

It was reported by me that one of my tarball dists was not readable by the default HP-UX tar because GNU tar 1.23 uses defaults that do not work with tar implementations that do not support GNU extensions.

PerlAlien/Alien-Build#228

One way to work around this is to use Archive::Tar instead, but there isn't a way to disable Archive::Tar::Wrapper (as far as I can tell) if it happens to be installed.

rjbs/Dist-Zilla#662

I am not sure how hard it would be, but it would be nice if Archive::Tar::Wrapper could either

  1. Detect GNU tar (looks like it might already be doing this) and use the --format=ustar option to produce a more backward compatible tarball.
  2. Provide an option to explicitly do the same.
@haarg
Copy link

haarg commented Sep 10, 2020

There are also other systems that will produce PaxHeaders by default. One of my MacOS machines has a uid/gid that doesn't fit in standard ustar headers. Using the --format=ustar option will produce an empty tarball. This can be fixed by using --format=ustar --uid=0 --gid=0 when using bsd tar, or --format=ustar --owner=0 --group=0 with GNU tar.

@plicease
Copy link
Author

For tarball releases of perl dists I think setting UID + GID to zero is fine, but I can imagine that for some use cases that may not be acceptable. It is probably therefore best if implemented that this be opt-in.

I think supporting GNU tar and bsdtar would probably benefit the majority of users and support for other systems can be added later.

@glasswalk3r
Copy link
Owner

glasswalk3r commented Sep 15, 2020

That falls on the same situation of #16: each OS seems to have their own particular configurations and/or versions of tar that are incompatible with each other.

The way to go in this case, as I see, is to create a dispatch table using the OS name as keys just like we are doing for Microsoft Windows and OpenBSD.

From there, we would execute a function to return an object configured with any little detail that is required to make the tar binary to work as expected.

My only concern is that Archive::Tar::Wrapper was created to overcome the slowness of Archive::Tar, so if anything, we shouldn't make it overly complex to the point there is a performance penalty.

Some refactoring will be required to do that, although. I started doing it in the past, but never finished.

Of course, I'm opened to suggestions too.

@glasswalk3r glasswalk3r added the help wanted Extra attention is needed label Apr 16, 2024
@glasswalk3r
Copy link
Owner

@plicease , can you please provide a PR for this tar implementation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants