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

Fixup the usage of the ruby interpreter for OpenBSD to run #276

Closed
wants to merge 0 commits into from
Closed

Fixup the usage of the ruby interpreter for OpenBSD to run #276

wants to merge 0 commits into from

Conversation

buzzdeee
Copy link
Contributor

concatfragments.rb, similar to what's done on Windows.

OpenBSD "breakage" was introduced with Git commit:
7eb14b7

The ruby interpreter used by Puppet package for OpenBSD is
called ruby21, therefore the shebang in concatfragments.rb
doesn't work, and breaks for me on at least OpenBSD 5.6 and 5.7-beta.

Whenever the default ruby interpreter used by Puppet on OpenBSD will be
updated, then a version check for ::kernelversion or the like
can/must be added.

please consider inclusion of the fix, or any feedback appreciated.

cheers,
Sebastian

@jhoblitt
Copy link
Contributor

Ugh - the ports package for ruby does not install a symlink/wrapper for 'ruby'? This needs unit test coverage before it can be merged.

@buzzdeee
Copy link
Contributor Author

nope, it (un)fortunately doesn't.

One reason is, because you can install multiple versions of ports/packages of ruby in parallel without conflicting. Then you decide as administrator, or user, what version you want as default, by either setting global or personal symlinks to the versioned binaries in question.

The very same is true for pyhton, the binary is installed as python2.7 for example.

It is just, within the ports infrastructure, it happens that ruby 2.1 is the "defined" default, and that's also the what puppet uses. I.e. the puppet-dashboard port/package explicitly requires the ruby 1.8 as default, and it lives quite happily with puppet next to each other.

Another example is the gem package provider that comes with Puppet. There is a patch on the port, to explicitly use 'gem21', instead of just 'gem' to install ruby gems via Puppet.

I'll see if I can get a test case written for it over the weekend, guess/hope there is one for Windows, that I can just adapt ;)

cheers,
Sebastian

@buzzdeee
Copy link
Contributor Author

buzzdeee commented Mar 1, 2015

I was looking for a specific case for Windows, but didn't found one. I'm not that good at writing tests (yet), and I don't really know, how to write a test for OpenBSD
However, I added a note to the README.md that, whenever the Ruby version used by Puppet changes, this must be enhanced to check for the OpenBSD version. Is that sufficient?

Otherwise, this file could also be converted into a template, and the ruby interpreter, defaulting to what it currently is, be made a variable.

@buzzdeee
Copy link
Contributor Author

rebased...

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

2 participants