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

zef install 'JSON::Fast:ver<0.16>:auth<cpan:TIMOTIMO>' fails to install #79

Closed
patrickbkr opened this issue Feb 6, 2022 · 14 comments
Closed

Comments

@patrickbkr
Copy link

I think the reason might be the "auth" : null, in META6.json.

@lizmat
Copy link
Contributor

lizmat commented Feb 10, 2022

FWIW, I cannot reproduce. What version of zef are you using?

@patrickbkr
Copy link
Author

@lizmat: Latest Zef as of today. Latest rakudo/nqp/moar master as of today. Is it possible that you have that version JSON::Fast already installed?

@lizmat
Copy link
Contributor

lizmat commented Feb 12, 2022

$ zef uninstall JSON::Fast
===> Uninstalled from /Users/liz/Github/rakudo.moar/install/share/perl6/site
JSON::Fast:ver<0.17>:auth<cpan:TIMOTIMO>
JSON::Fast:ver<0.16>
LizyPro:rakudo.moar liz$ zef install 'JSON::Fast:ver<0.16>:auth<cpan:TIMOTIMO>'
===> Searching for: JSON::Fast:ver<0.16>:auth<cpan:TIMOTIMO>
===> Updating fez mirror: https://360.zef.pm/
===> Updated fez mirror: https://360.zef.pm/
===> Updating cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updating p6c mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/p6c1.json
===> Updated p6c mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/p6c1.json
===> Updated cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updating rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
===> Updated rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
===> Testing: JSON::Fast:ver<0.16>
===> Testing [OK] for JSON::Fast:ver<0.16>
===> Installing: JSON::Fast:ver<0.16>
$ zef install JSON::Fast
All candidates are currently installed
No reason to proceed. Use --force-install to continue anyway
LizyPro:rakudo.moar liz$ zef upgrade JSON::Fast
===> Searching for: JSON::Fast
The following distributions will be upgraded: JSON::Fast:ver<0.17>:auth<cpan:TIMOTIMO>
===> Updating: JSON::Fast:ver<0.17>:auth<cpan:TIMOTIMO>
===> Testing: JSON::Fast:ver<0.17>:auth<cpan:TIMOTIMO>
===> Testing [OK] for JSON::Fast:ver<0.17>:auth<cpan:TIMOTIMO>
===> Installing: JSON::Fast:ver<0.17>:auth<cpan:TIMOTIMO>

@lizmat
Copy link
Contributor

lizmat commented Feb 12, 2022

Aaah... I just realized it might be installing 0.16 from the REA (which I have enabled). The CPAN version of 0.16 erroneously does not have an auth. This has been corrected in the REA.

Could you try:

$ zef install Zef::Configuration
$ zef-configure enable rea
$ zef install 'JSON::Fast:ver<0.16>:auth<cpan:TIMOTIMO>'

?

@patrickbkr
Copy link
Author

@lizmat I did and this is the output:

patrickb@~ [0]$ zef install 'JSON::Fast:ver<0.16>:auth<cpan:TIMOTIMO>'
===> Searching for: JSON::Fast:ver<0.16>:auth<cpan:TIMOTIMO>
===> Updating rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
===> Updated rea mirror: https://raw.githubusercontent.com/Raku/REA/main/META.json
===> Extraction: Failed to find a META6.json file for JSON::Fast:ver<0.16>:auth<cpan:TIMOTIMO> -- failure is likely
[JSON::Fast] Extracting with plugin Zef::Service::Shell::tar+{<anon|1>} aborted.
Type check failed for return value; expected IO::Path but got Any (Any)

I'm not entirely sure the error is related.

@lizmat
Copy link
Contributor

lizmat commented Feb 12, 2022

Dann bin ich überfragt :-(

@patrickbkr
Copy link
Author

It seems the filename JSON::Fast:ver%3C0.16%3E:auth%3Ccpan:TIMOTIMO%3E.tar.gz poses a problem.
Trying to run tar -xzf "JSON::Fast:ver%3C0.16%3E:auth%3Ccpan:TIMOTIMO%3E.tar.gz" fails with

tar (child): Cannot connect to JSON: resolve failed

gzip: stdin: unexpected end of file
tar: Child returned status 128
tar: Error is not recoverable: exiting now

Moving that very same file to asdf.tgz and then doing the extraction makes it work.

This is

tar --version
tar (GNU tar) 1.34
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.

This feels very much like a bug in tar. Even though I can't quite make myself believe that.

@patrickbkr
Copy link
Author

Quoting man tar:

An archive name that has a colon in it specifies a file or device on a remote machine.  The part before the colon is taken as the machine name or IP address, and the part
              after it as the file or device pathname, e.g.:

              --file=remotehost:/dev/sr0

              An optional username can be prefixed to the hostname, placing a @ sign between them.

also

--force-local
              Archive file is local even if it has a colon.

@patrickbkr
Copy link
Author

Using a path (i.e. prepending ./) instead of a filename also makes tar not try doing strange stuff.
So this turns out to be a zef bug.

@lizmat
Copy link
Contributor

lizmat commented Feb 17, 2022

OOC, why can't I reproduce this, you think?

@patrickbkr
Copy link
Author

lizmat: I suspect MacOS tar behaves differently than gnu tar. Do you find a respective piece of documentation for your tar?

That's also what complicates the obvious patch. The --force-local option isn't supported by busybox and possibly/probably others.

@patrickbkr
Copy link
Author

Now I'm thinking about how to platform independently prefix a filename with ./ as that seems to be the approach more tars will be compatible with...

@lizmat
Copy link
Contributor

lizmat commented Feb 17, 2022

I guess we can close this one now.

@patrickbkr
Copy link
Author

I agree.

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

No branches or pull requests

2 participants