I have a travis setup with java image as a base. Leaving out some details it looked like this:
language: generic
dist: xenial
env:
global:
- export PATH="/opt/rakudo-pkg/bin:/opt/rakudo-pkg/share/perl6/site/bin:$PATH"
addons:
apt:
sources:
- sourceline: deb https://dl.bintray.com/nxadm/rakudo-pkg-debs $(lsb_release -cs)
main
key_url: http://keyserver.ubuntu.com/pks/lookup?search=0x379CE192D401AB61&op=get
packages:
- rakudo-pkg
script:
- zef install OO::Monitors JSON::Fast
- (...)
and it Just Worked this way.
As the bintray went down, I am migrating it to CloudSmith and having some issues. First, it would be great to have some docs describing the sources/key_url or similar for other distros, as I had to dig them up.
So the changes are:
addons:
apt:
sources:
- sourceline: deb https://dl.cloudsmith.io/public/nxadm-pkgs/rakudo-pkg/deb/ubuntu xenial
main
key_url: https://dl.cloudsmith.io/public/nxadm-pkgs/rakudo-pkg/gpg.0DD4CA7EB1C6CC6B.key
packages:
- rakudo-pkg
Then all the trouble starts. First, zef for the travis user is not found anymore:
$ zef install OO::Monitors JSON::Fast
No command 'zef' found, did you mean:
Command 'zed' from package 'zfs-zed' (universe)
Command 'zmf' from package 'zoneminder' (universe)
Command 'zec' from package 'zec' (universe)
Command 'zf' from package 'zend-framework-bin' (universe)
zef: command not found
The command "zef install OO::Monitors JSON::Fast" exited with 127.
I guess paths to binaries were changed? So I tried to use the script:
script:
- /opt/rakudo-pkg/bin/install-zef
- zef install OO::Monitors JSON::Fast
and the result is:
$ /opt/rakudo-pkg/bin/install-zef
WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failure was:
Failed to create directory '/opt/rakudo-pkg/share/perl6/vendor/short' with mode '0o777': Failed to mkdir: Permission denied
in method probe at bin/zef line 71
in block at bin/zef line 135
So I tried with sudo and it installs this time.
The command "sudo /opt/rakudo-pkg/bin/install-zef" exited with 0.
0.09s$ zef install OO::Monitors JSON::Fast
No command 'zef' found, did you mean:
So this is wrong as well, no sudo. Let's change the rights manually:
The command "sudo /opt/rakudo-pkg/bin/install-zef" exited with 0.
0.01s$ sudo chmod -R 777 ~/.zef
The command "sudo chmod -R 777 ~/.zef" exited with 0.
The command "sudo chown -R travis ~/.zef" exited with 0.
5.38s$ zef install OO::Monitors JSON::Fast
===> Searching for: OO::Monitors, JSON::Fast
===> Updating fez mirror: http://360.zef.pm/
===> CompUnit::Repository install target is not writeable/installable: /home/travis/build/the-funky-project/auto
===> Updated fez mirror: http://360.zef.pm/
===> Updating cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updated 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
Need a valid installation target to continue
The command "zef install OO::Monitors JSON::Fast" exited with 1.
Why does it try to install things into auto
directory? It is, apparently, a default CURI to install modules in case there is no valid one, but why there is no one now? Am I really missing something silly? The travis setup was not touched, just the package sources.