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

Use "#!/usr/bin/env rakudo" instead of perl6 in module scripts #4358

Merged
merged 1 commit into from May 7, 2021
Merged

Use "#!/usr/bin/env rakudo" instead of perl6 in module scripts #4358

merged 1 commit into from May 7, 2021

Conversation

voegelas
Copy link
Contributor

@voegelas voegelas commented May 7, 2021

As far as I can see there's no need to put "#!/usr/bin/env perl6" any longer into scripts like cro and zef when these modules are built and installed with recent Rakudo versions. This pull request replaces perl6 with rakudo, perl6-m with rakudo-m etc. in src/core.c/CompUnit/Repository/Installation.pm6.

BTW, if scripts use #!/usr/bin/env the package tool rpmbuild adds automatic dependencies on the package coreutils, which provides /usr/bin/env, instead of rakudo. But that's another issue that I handle in the RPM spec file.

@patrickbkr
Copy link
Contributor

Is #3716 related?

@voegelas
Copy link
Contributor Author

voegelas commented May 7, 2021

Is #3716 related?

Sort of. But I think that systems that haven't got /usr/bin/env and only provide /bin/env are non-standard even if no standard defines the exact location. I wouldn't add complex code that supports both /usr/bin/env and /bin/env. Better don't use the env command at all und use the configured prefix to set the interpreter to #!/usr/bin/rakudo, for example. That would also make package tools like rpmbuild and rpmlint happy.

But my pull request isn't about the use of the env command. It just replaces perl6 by rakudo.

@patrickbkr
Copy link
Contributor

Ah. Thanks for the explanation!

Looking good. Do you have permissions to merge this yourself?

@lizmat lizmat merged commit 87d019f into rakudo:master May 7, 2021
@jnthn
Copy link
Member

jnthn commented May 7, 2021

I do wonder if it should have been raku not rakudo, otherwise the installed module scripts are tied to a particular implementation of Raku, rather than whichever one has been installed as raku.

@lizmat
Copy link
Contributor

lizmat commented May 7, 2021

I think at this stage, where the status of the CompUnit modules is still a bit in question (is it implementation specific or not?), that rakudo is actually the proper thing to do.

@jnthn
Copy link
Member

jnthn commented May 7, 2021

I thought quite a lot of aspects of the CompUnit:: stuff had made it into spectest by now?

@lizmat
Copy link
Contributor

lizmat commented May 7, 2021

Ah, indeed. Hmmm...

@jnthn
Copy link
Member

jnthn commented May 7, 2021

I did just take a glance through the tests, and I think S11-repository/cur-candidates.t is sort of covering something in this territory.

@voegelas
Copy link
Contributor Author

voegelas commented May 7, 2021

raku would require raku-m, raku-j and raku-js command aliases. That's why I replaced perl with raku in most places, but decided to use rakudo in the subst() calls. For example, when zef is installed you get the scripts zef, zef-m, zef-j and zef-js with corresponding shebang lines.

@voegelas voegelas deleted the usr-bin-env-rakudo branch May 8, 2021 07:08
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

Successfully merging this pull request may close these issues.

None yet

4 participants