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

Add gnu-tar #1534

Closed
3 of 6 tasks
smorimoto opened this issue Sep 1, 2020 · 15 comments
Closed
3 of 6 tasks

Add gnu-tar #1534

smorimoto opened this issue Sep 1, 2020 · 15 comments

Comments

@smorimoto
Copy link
Contributor

Tool information

  • Tool name: gnu-tar
  • Tool license: GPL 3
  • Add or update? Add
  • Desired version: latest
  • Approximate size: I don't know
  • If this is an add request:
    • Brief description of tool: GNU Tar provides the ability to create tar archives, as well as various other kinds of manipulation. For example, you can use Tar on previously created archives to extract files, to store additional files, or to update or list files which were already stored.
    • URL for tool's homepage: https://www.gnu.org/software/tar
    • Provide a basic test case to validate the tool's functionality: tar --version | grep GNU

Area for Triage:

Packages

Question, Bug, or Feature?:

Feature

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Ubuntu 20.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

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.

@smorimoto
Copy link
Contributor Author

@smorimoto
Copy link
Contributor Author

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.

@maxim-lobanov
Copy link
Contributor

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 actions/toolkit#553 should fix initial issue?

@smorimoto
Copy link
Contributor Author

Hello again, @maxim-lobanov 🙂 I didn't notice that! Great.

@maxim-lobanov
Copy link
Contributor

Is this issue actual for MacOS too? I didn't notice any reports about macOS.

@smorimoto
Copy link
Contributor Author

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

@maxim-lobanov
Copy link
Contributor

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

@jensens
Copy link

jensens commented Sep 27, 2020

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.

@anp
Copy link

anp commented Oct 18, 2020

@maxim-lobanov to work around actions/cache#403 without additional install time it would need to be installed for macOS by default as well.

@maxim-lobanov
Copy link
Contributor

@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

jensens added a commit to plone/Installers-UnifiedInstaller that referenced this issue Oct 19, 2020
@Cyberbeni
Copy link

@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
Cyberbeni/install-swift-tool#69

@maxim-lobanov
Copy link
Contributor

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

@maxim-lobanov maxim-lobanov reopened this Nov 27, 2020
@Cyberbeni
Copy link

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)

@nikita-bykov
Copy link
Contributor

nikita-bykov commented Dec 16, 2020

We have added gnu-tar installation to macOS.
Unfortunately images with it will be rolled out around January due to deployment freeze.

@nikita-bykov
Copy link
Contributor

All changes were successfully deployed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants