Tool information
tar --version | grep GNUArea for Triage:
Packages
Question, Bug, or Feature?:
Feature
Virtual environments affected
Can this tool be installed during the build?
Sure.
Tool installation time in runtime
I don't know.
Are you willing to submit a PR?
Sure if I have time at that time.
We don't need to replace the default command with gnu-tar on each platform, but by installing it by default, we should be able to avoid quite a few problems just by setting the path without taking installation time when using it from any actions.
Hello, actually, gnu-tar is already available on Windows images and is located on C:\Program Files\Git\usr\bin\tar.exe or C:\msys64\usr\bin\tar.exe.
I believe https://github.com/actions/toolkit/pull/553 should fix initial issue?
Hello again, @maxim-lobanov 馃檪 I didn't notice that! Great.
Is this issue actual for MacOS too? I didn't notice any reports about macOS.
There may be some differences in flags between BSD tar and GNU tar, but that shouldn't be a big problem. Well, I don't use macOS, so I don't know. What do you think? @dhadka
Considering the fact that tar is already installed on Windows, I am going to close this issue.
If actions/cache needs gnu tar on MacOS too, please let us know and we will reopen this issue
gnutar provides the --owner and --group arguments which are missing with macos default tar (BSD tar?).
Thus said, it would be great to have it on macos too. At the moment this is an issue here, testing/building the CMS Plone unified installer using an GH action.
@maxim-lobanov to work around https://github.com/actions/cache/issues/403 without additional install time it would need to be installed for macOS by default as well.
@anp thank you for additional info. Probably, if we pre-install gnu-tar, actions/cache can use it by default. I have requested additional information in issue
@maxim-lobanov multiple people have issues with tar on macOS that are solved by switching to gnu-tar:
https://github.community/t/bizarre-issue-with-tar-archive-for-macos-build/145377
https://github.com/Cyberbeni/install-swift-tool/issues/69
Thank you for everyone for sharing your feedback and requests.
We have decided to revisit this issue and install gnu-tar on MacOS images.
Reopened and moved to backlog
I haven't tested the compatibility between the two tars extensively but I would expect that setting the tar command to point to gnu-tar instead of just having it installed shouldn't break anything. At least when I restore a cache that was saved with bsdtar, I only get a warning, but it works perfectly: /usr/local/opt/gnu-tar/libexec/gnubin/tar: Ignoring unknown extended header keyword 'LIBARCHIVE.creationtime'
And this issue is rare enough that if we leave bsdtar as default, there will be issues about tar not working on macOS without any answer because people who know the answer don't read every issue of every repository that comes into contact with GitHub Actions.
(But having it installed by default would already be an improvement at least for my action, so I can avoid using env HOMEBREW_NO_AUTO_UPDATE=1 brew install gnu-tar)
We have added gnu-tar installation to macOS.
Unfortunately images with it will be rolled out around January due to deployment freeze.
Most helpful comment
We have added gnu-tar installation to macOS.
Unfortunately images with it will be rolled out around January due to deployment freeze.