-
Notifications
You must be signed in to change notification settings - Fork 81
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
Allow setting tarfile format #83
Comments
Perhaps you can consider conversation after the archive is created, as explained on StackOverflow? |
Thanks for the suggestion, I looked into that but bsdtar doesn't support --format=gnu (or at least the Fedora packaged version doesn't), and GNU tar doesn't support the easy conversion method that bsdtar does. But while we could do it manually, it just seems pretty inefficient to create a tarball in a brokenish format, then uncompress it and recompress it in the correct format when we could just create it in the correct format to begin with. |
There are myriad of options if you think about it, and not just for tar but for the compressors too. And then there are also their flavors. What if I extend the archiver to produce an mtree-formatted file, will it suffice? Or perhaps in some other intermediate format which you can easily work with using builtin tools and trivial shel pipelines. |
True. I haven't fully thought this through, but what about allowing some arbitrary
The really nice part about using this library is that it just takes care of everything for us, with very little complexity on our side :) But if that's what you think is best, we'll update our script to make it work. |
Python 3.8 switched the default tarfile format from GNU to PAX, but it turns out that our PAX tarballs can't be uncompressed properly on Windows when using 7zip. git-archive-all doesn't let us specify a specific tarfile format yet (see <Kentzo/git-archive-all#83>), so in the meantime we can simply monkeypatch tarfile's default format to use GNU. Bug: T257102 Change-Id: I2c12fe230d6d35e18cf8bc795a174663a5139911
As an update, we're now monkey patching |
Since you are using it as a library, you should be able to call |
For MediaWiki, we would like to be able to use a different tarfile format instead of the default one after identifying regressions in the new 3.8 default format.
We use this as a library, so if it would be possible to add an option to
GitArchiver.create
to let us specifytarfile.GNU_FORMAT
that would be appreciated.Our downstream ticket is https://phabricator.wikimedia.org/T257102.
The text was updated successfully, but these errors were encountered: