rakudo / star

Rakudo Star (Raku distribution)
https://rakudo.org/
Artistic License 2.0
267 stars 41 forks source link

share/perl6/vendor/short creation as root - when installed via brew #192

Closed rcmlz closed 1 year ago

rcmlz commented 1 year ago

Bug Description

Reproduction path

git clone https://github.com/rcmlz/perlweeklychallenge-club
cd perlweeklychallenge-club
git checkout origin/raku-benchmark-scaleability
raku test/benchmark-scalabiity.raku DEMO

However, running as privileged user (sudoers) works

sudo raku test/benchmark-scalabiity.raku DEMO

and inspection of the folders show

ls -aslh /usr/local/Cellar/rakudo-star/2023.08/share/perl6/vendor/ 
total 8
0 drwxr-xr-x  4 privuser admin   128B  5 Sep 11:21 .
0 drwxr-xr-x  7 privuser admin   224B 22 Aug 01:57 ..
0 drwxr-xr-x  2 root    admin    64B  5 Sep 11:21 short
8 -rw-r--r--  1 privuser  admin     1B 22 Aug 01:57 version

that running as sudo user created a folder 'short'.

Conclusion

Apparently the folder /usr/local/Cellar/rakudo-star/2023.08/share/perl6/vendor/short is not created during setup but only on first run - which requires sudo rights. I assume this is not intended behaviour.

AntonOks commented 1 year ago

Thanks for your bug report.

I will not be able to help any soon. I have now Mac available... and also in the next couple of days, I've only a ARM based Windows10 box, so a "win32" emulation... and there is no (recent) win32 Raku version, and so also no win32 Star....

Anyhow, as Star nowadays is just "the similar Rakudo version + some additional modules", the problem must be somewhere else.

From a quick search, I found:#

From what I would have understood from those discussions:

AntonOks commented 1 year ago

@rcmlz - Hi. Any opinion on the feedback above? Any chance to install Star new / from zero?

rcmlz commented 1 year ago

Hello @AntonOks

I encountered this error on a fresh Radudo-Star installation on a freshly installed Mac.

For me it was not a problem to run Raku once with sudo/root to fix this.

However, I thought that error might be an issue in general. Perhaps I am wrong. Just wanted to let you know about that error.

AntonOks commented 1 year ago

Hmm, strange. To rule out Star, any change to remove your Star installation completely and install the same "bare bone" Rakudo installation?

Else, lacking of any better idea right now, I may have to "missuse" the GitHub osx runners for that kind of test :|

rcmlz commented 1 year ago

I get the same error when running on github runners, so nothing to do with Star ... sorry for the confusion

https://github.com/rcmlz/perlweeklychallenge-club/blob/raku-benchmark-scaleability/.github/workflows/manual_raku_benchmark.yml

Failed to create directory '/usr/lib/perl6/site/short' with mode '0o777': Failed to mkdir: Permission denied in any statement_control at /usr/lib/perl6/lib/Perl6/Grammar.moarvm line 1

AntonOks commented 1 year ago

as it's not a Star issue AND there is an open issue in Rakudo, I'm hereby closing this one