perl5 icon indicating copy to clipboard operation
perl5 copied to clipboard

makerel: always use ustar format

Open haarg opened this issue 1 year ago • 6 comments

When generating release tarballs, always use ustar format. The ustar format is one of the POSIX standard formats, and is the basis for future tar formats. It supports all of the features we need to create a release tarball. The newer formats support extended attributes that can produce warnings when extracting on some systems. This includes attributes like LIBARCHIVE.xattr.com.apple.quarantine, set on macOS systems on files downloaded from the internet. Using the ustar format prevents those attributes from being stored in the tarball and avoids the warnings.

haarg avatar Jun 10 '24 22:06 haarg

Fixes #22245

haarg avatar Jun 10 '24 22:06 haarg

When generating release tarballs, always use ustar format. The ustar format is one of the POSIX standard formats, and is the basis for future tar formats. It supports all of the features we need to create a release tarball. The newer formats support extended attributes that can produce warnings when extracting on some systems. This includes attributes like LIBARCHIVE.xattr.com.apple.quarantine, set on macOS systems on files downloaded from the internet. Using the ustar format prevents those attributes from being stored in the tarball and avoids the warnings.

When generating release tarballs, always use ustar format. The ustar format is one of the POSIX standard formats, and is the basis for future tar formats. It supports all of the features we need to create a release tarball. The newer formats support extended attributes that can produce warnings when extracting on some systems. This includes attributes like LIBARCHIVE.xattr.com.apple.quarantine, set on macOS systems on files downloaded from the internet. Using the ustar format prevents those attributes from being stored in the tarball and avoids the warnings.

I don't know enough about the different tar formats to say whether or not we should be using ustar. I did, however, configure and build perl, then call perl Porting/makerel -r [rootdir] -x -c for both blead and this p.r. I then compared the resulting tarballs and the only difference I found was (as expected) in Porting/makerel. So LGTM.

jkeenan avatar Jun 12 '24 14:06 jkeenan

I feel like EU:MM could benefit from this change, too.

Is there any particular reason why it’s currently limited to makerel? – Oh, I see now the CPAN module is canonical for EU:MM.

johannessen avatar Jun 16 '24 19:06 johannessen

Oh, I see now the CPAN module is canonical for EU:MM.

See https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/issues/349 for discussion there.

Grinnz avatar Jun 16 '24 21:06 Grinnz

Going by the discussion in https://github.com/Perl-Toolchain-Gang/ExtUtils-MakeMaker/issues/349 wouldn't we be better off using ptar?

Since:

  • not all tars accept --format=ustar
  • some tars accept --format=ustar but create an empty archive, or not include some files in the archive ( https://github.com/xsawyerx/module-starter/pull/73#issuecomment-585887546 )

while ptar always produces ustar

tonycoz avatar Jun 17 '24 23:06 tonycoz

All of the tar implementations we care about support --format=ustar.

Producing an empty tarball requires a rather specific system setup that is not common. It's something I ran into before, but is no longer relevant to me. It's also more of an issue for CPAN releases, because they are often uploaded without being tested directly.

makerel doesn't need to work on as diverse of a set of systems as ExtUtils::MakeMaker, and we always verify the tarball that is produced.

haarg avatar Jun 18 '24 00:06 haarg

@tonycoz, @haarg has responded to your concern. Do you want to call either thumbs up or thumbs down on this p.r.? Thanks.

jkeenan avatar Jul 16 '24 12:07 jkeenan