Closed JJ closed 2 years ago
Thanks for the report! I have just released version 29 fixing this. A rakubrew self-upgrade
should get your installation repaired.
Thanks for the report! I have just released version 29 fixing this. A
rakubrew self-upgrade
should get your installation repaired.
@patrickbkr BTW, it is not 100% true. I once had to manually remove local zef repository clone because rakubrew tried to update it and was failing. Not sure if it worth special handling in the code. Likely not.
@JJ Did it work for you? I wonder if vrurg had a non-normal setup or if this always fails...
Right, worked like a charm.
OK. Then I'll for now assume some special case haunted vrurg and leave it as is. Thanks everyone!
@patrickbkr I can tell you exactly what it was. An old cloned repo of zef which was using git
protocol. rakubrew
tried to update it and was failing. After I removed it manually the new clone was fetched using https
. Nothing really special.
@vrurg Do you know why it was failing to upgrade the repo?
The code doing the upgrade is:
$repo = catdir($repo, '.git') if -d catdir($repo, '.git');
my $config_file = catfile($repo, 'config');
if (-f $config_file) {
my $content = slurp($config_file);
my $replaced = ($content =~ s|^(\s* url \s* = \s*) git (://github\.com/)|$1https$2|gmx);
if ($replaced) {
spurt($config_file, $content);
}
}
My first guess would be a permissions issue.
Wrote a comment only to wipe it out and start afresh...
A simple experiment. I have replaced the url
line in .git/config:
url = git://github.com/ugexe/zef.git
And now:
⇒ rakubrew build zef
HEAD is now at 7c46ca2 Bump version 0.13.8
fatal: remote error:
The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.
Failed running git checkout -f -q master && git reset --hard HEAD && git pull -q at /home/vrurg/.rakubrew/bin/rakubrew line 839.
@vrurg That approach doesn't reproduce the situation entirely. The logic to fix the repos is only run during the rakubrew update process and then also only when the old version is 28 or lower, not on every run. So to reproduce you would now have to download a rakubrew v28 (https://rakubrew.org/files/28/macos/rakubrew), replace ~/.rakubrew/bin/rakubrew
with it and then run rakubrew self-upgrade
to trigger the logic that fixes the repo URLs.
I barely going to give it all a try. :) So, let's see if somebody else hits the issue. If not then we can safely assume there is no problematic installations are left in the wild.
rakubrew rakubrew-version
?:Version 28
Are you using rakubrew in
env
or inshim
mode? (runrakubrew mode
to find out): shimWhere is rakubrew installed? (run
rakubrew home
to find out):~/rakubrew
Same problem as indicated in #48. That's been fixed, but it now occurs when doing rakubrew build zef.