-
Notifications
You must be signed in to change notification settings - Fork 214
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 with set connection => "OpenSSH"; in Rexfile.
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 then cpan Rex.
All reactions
Replies: 1 comment 2 replies
Hey, @adam12, thanks for sharing your experience here!
brew install rexseems to be missing packages (tho I can't tell why since it looks correct from the brew file).
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.
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.
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:
- use Net::SSH2, which in turn depends on libssh2
- use Net::OpenSSH together with Net::SFTP::Foreign
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 t/os_dependencies.t).
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.
It was much easier to just install
local::liband thencpan Rex.
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 :)
All reactions
All reactions
-
❤️ 1
I'm glad these details proved useful!
Please feel free to link the Homebrew issue here for cross-reference, and should a solution need further input, please don't hesitate to involve me!