Skip to content

Navigation Menu

Sign in
Sign up

Homebrew package for Rex missing modules #1622

adam12 started this conversation in General
Discussion options

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.

You must be logged in to vote

Replies: 1 comment 2 replies

Comment options

Hey, @adam12, thanks for sharing your experience here!

brew install rex seems 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 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.

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::lib and then cpan 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 :)

You must be logged in to vote
2 replies
Comment options

Hi @ferki,

Thanks for the very detailed reply!

I will raise an issue with Homebrew.

Comment options

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /