Created attachment 187013 [details] allow both current and POSIX-compliant sh -c The RB_SET_CONF_VAR macro uses a construct like sh -c 'command' -- arg0 arg1 and assume that $0 will expand to arg0 and $1 will expand to arg1. Our current sh implements it that way. However, POSIX specifies that $0 will expand to -- and $1 will expand to arg0, since the command string is an operand and not an option-argument. Bug #220587 requests making sh POSIX-compliant in this regard. If the argument after the command string does not start with '-', the current sh behaves as required by POSIX. Therefore, the macros should be adjusted so this is always the case. Tested with poudriere, stable/10 with patched head sh.
The same problem affects lang/ruby23 and lang/ruby24, and the patch is the same (though context differs a bit for lang/ruby24).
ping!
ruby22 is now EoL and already removed from ports tree.
Oops, it affects ruby23 and ruby24.
Is this still relevant with lang/ruby27 ?
(In reply to Rene Ladan from comment #5) Yes, the problematic code is still in lang/ruby26, lang/ruby27 and lang/ruby30.
@Jilles Is ruby31 also affected, and should these changes go upstream? ^Triage: Patch needs updating to cover all currently affected ruby's
(In reply to Kubilay Kocak from comment #7) The problematic code has been reformatted a bit in lang/ruby31, but is still there. The problematic code is in the port Makefile, not in upstream code.
(In reply to Jilles Tjoelker from comment #8) Thanks, sorry I missed the location of the patch. Happy to approve a QA'd patch against all affected lang/ruby* ports if you'd like to take this to resolution
Trim EOL lang/ruby2[67] from the title.