Replies: 1 comment 2 replies
-
Hey, @adam12, thanks for sharing your experience here!
Homebrew volunteers maintain the formula for Rex, and the dependencies listed there looks incorrect to me. Please make sure to report the issues you experienced to them so they can fix the formula, optionally pointing them to here for more info. I'm glad to support any downstream packagers of Rex to supply correct results to their target users.
The transport layer of Rex is modular, and it can use different backends to connect and control managed endpoints. For SSH, Rex supports two options:
Rex checks prefers to use Net::OpenSSH+Net::SFTP::Foreign when both are available, otherwise falls back to the other (historically traditional) option as a default. The current Homebrew formula seems to depend only on Net::OpenSSH without Net::SFTP::Foreign, and doesn't depend on Net::SSH2+libssh2 at all, which explains your experience mentioned above. The formula also doesn't seem to run Rex's own test suite which would have pointed out this case of unsatisfied dependencies (see Overall I'd recommend including Net::SFTP::Foreign in the formula dependencies, and running the built-in test suite as well to prevent similar problems in the future.
Thanks for confirming that. Yes, the standard Perl build system we use here in the core project should correctly determine and handle all dependencies, including OS-specific ones and optional ones. For some reason, the Homebrew formula doesn't follow the same logic, and thus misses some dependencies. Let's help its maintainers to deliver a smooth Rex experience via Homebrew too :) |
Beta Was this translation helpful? Give feedback.
-
Just in case anyone else runs into this,
brew install rex
seems to be missing packages (tho I can't tell why since it looks correct from the brew file).First issue was
Can't locate Net/SSH2.pm
, which I worked around withset connection => "OpenSSH";
inRexfile
.Next issue was
Can't locate Net/SFTP/Foreign/Constants.pm
. I didn't see a great way of working around that.It was much easier to just install
local::lib
and thencpan Rex
.Beta Was this translation helpful? Give feedback.
All reactions