ugexe / zef

Raku Module Management
Artistic License 2.0
207 stars 44 forks source link

Unable to install packages #450

Closed demanuel closed 2 years ago

demanuel commented 2 years ago

Context

I updated my raku env (rakudo to latest master, and zef to 0.13.8) and now i'm unable to install packages:

$ zef install NativeHelpers::Blob
===> Searching for: NativeHelpers::Blob
===> Testing: NativeHelpers::Blob:ver<0.1.12>:auth<github:salortiz>
===> Testing [OK] for NativeHelpers::Blob:ver<0.1.12>:auth<github:salortiz>
===> Installing: NativeHelpers::Blob:ver<0.1.12>:auth<github:salortiz>
===> Install [FAIL] for NativeHelpers::Blob:ver<0.1.12>:auth<github:salortiz>: Failed to open file /usr/share/perl6/site/repo.lock: Permission denied
Failed to open file /usr/share/perl6/site/repo.lock: Permission denied

Expected Behavior

The package should be installed. It shouldn't try to install files in the root filesystem.

Versions and package list:

demanuel@archlinux /u/s/perl6 [1]> zef --version
v0.13.8
demanuel@archlinux /u/s/perl6> raku -v
Welcome to Rakudo™ v2022.03-162-g2cadc4d86.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2022.03-15-g43e1b00a6.
demanuel@archlinux /u/s/perl6> zef list --installed
===> Found via /usr/share/perl6/vendor
zef:ver<0.13.8>:auth<github:ugexe>:api<0>
===> Found via /usr/share/perl6/core
CORE:ver<6.d>:auth<perl>:api<0>
demanuel@archlinux /u/s/perl6>

my config file:

{
    "ConfigVersion" : "1",
    "RootDir"  : "$*HOME/.zef",
    "StoreDir" : "$*HOME/.zef/store",
    "TempDir"  : "$*HOME/.zef/tmp",
    "DefaultCUR" : ["auto"],
    "License" : {
        "whitelist" : "*",
        "blacklist" : []
    },
    "Install" : [
        { 
            "short-name" : "install-raku-dist",
            "enabled" : 1,
            "module" : "Zef::Service::InstallRakuDistribution"
        }
    ],
    "Report" : [
        { 
            "short-name" : "file-reporter",
            "enabled" : 0,
            "module" : "Zef::Service::FileReporter"
        }
    ],
    "Repository" : [
        [
            {
                "short-name": "fez",
                "enabled": 1,
                "module": "Zef::Repository::Ecosystems",
                "options": {
                    "name": "fez",
                    "auto-update": 1,
                    "uses-path": true,
                    "mirrors": [
                        "https://360.zef.pm/"
                    ]
                }
            }
        ],
        [
            {
                "short-name" : "cpan",
                "enabled" : 0,
                "module" : "Zef::Repository::Ecosystems",
                "options" : {
                    "name" : "cpan",
                    "auto-update" : 1,
                    "mirrors" : [
                        "https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json",
                        "https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan.json",
                        "https://github.com/ugexe/Perl6-ecosystems.git"
                    ]
                }
            },
            {
                "short-name" : "p6c",
                "enabled" : 0,
                "module" : "Zef::Repository::Ecosystems",
                "options" : {
                    "name" : "p6c",
                    "auto-update" : 1,
                    "mirrors" : [
                        "https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/p6c1.json",
                        "https://github.com/ugexe/Perl6-ecosystems.git",
                        "https://ecosystem-api.p6c.org/projects1.json"
                    ]
                }
            }
        ],
        [
            {
                "short-name": "rea",
                "enabled": 1,
                "module": "Zef::Repository::Ecosystems",
                "options": {
                    "name": "rea",
                    "auto-update": 1,
                    "mirrors": [
                        "https://raw.githubusercontent.com/Raku/REA/main/META.json"
                    ]
                }
            }
        ],
        [
            {
                "short-name" : "cached",
                "enabled" : 1,
                "module" : "Zef::Repository::LocalCache",
                "options" : { }
            }
        ]
    ],
    "Fetch" : [
        {
            "short-name" : "git",
            "module" : "Zef::Service::Shell::git",
            "options" : {
                "scheme" : "https"
            }
        },
        {
            "short-name" : "path",
            "module" : "Zef::Service::FetchPath"
        },
        {
            "short-name" : "curl",
            "module" : "Zef::Service::Shell::curl"
        },
        {
            "short-name" : "wget",
            "module" : "Zef::Service::Shell::wget"
        },
        {
            "short-name" : "pswebrequest",
            "module" : "Zef::Service::Shell::PowerShell::download"
        }
   ],
    "Extract" : [
        {
            "short-name" : "git",
            "module" : "Zef::Service::Shell::git",
            "comment" : "used to checkout (extract) specific tags/sha1/commit/branch from a git repo"
        },
        {
            "short-name" : "path",
            "module" : "Zef::Service::FetchPath",
            "comment" : "if this goes before git then git wont be able to extract/checkout local paths because this reaches it first :("
        },
        {
            "short-name" : "tar",
            "module" : "Zef::Service::Shell::tar"
        },
        {
            "short-name" : "p5tar",
            "module" : "Zef::Service::Shell::p5tar"
        },
        {
            "short-name" : "unzip",
            "module" : "Zef::Service::Shell::unzip"
        },
        {
            "short-name" : "psunzip",
            "module" : "Zef::Service::Shell::PowerShell::unzip"
        }
    ],
    "Build" : [
        {
            "short-name" : "default-builder",
            "module" : "Zef::Service::Shell::DistributionBuilder"
        },
        {
            "short-name" : "legacy-builder",
            "module" : "Zef::Service::Shell::LegacyBuild"
        }
    ],
    "Test" : [
        {
            "short-name" : "tap-harness",
            "module" : "Zef::Service::TAP",
            "comment" : "Raku TAP::Harness adapter"
        },
        {
            "short-name" : "prove",
            "module" : "Zef::Service::Shell::prove"
        },
        {
            "short-name" : "raku-test",
            "module" : "Zef::Service::Shell::Test"
        }
    ]
}
ugexe commented 2 years ago

Maybe a regression in rakudo? There have been various unvetted commits to rakudo/master recently in that area of the code.

demanuel commented 2 years ago

How can i confirm that?

ugexe commented 2 years ago

Did zef work before? If zef worked previously then it’s almost certainly the case that it’s a rakudo regression.

demanuel commented 2 years ago

Yep...

I went back and tested several commits. The problem seems to be: https://github.com/rakudo/rakudo/commit/da54063c230fd12db407b6893dc2e251b2680906