[Why]
Before `rabbitmq_prelaunch` was moved from `deps/rabbit/apps` to `deps`,
it would inherit compile flags from `deps/rabbit`. Therefore, when
`rabbit` was tested, `rabbit_logger_std_h` simply replaced the calls to
`io:put_chars/2` with an internal macro to also call `ct:log/2`.
This is not possible anymore after the move and the move broke the
console-based testcases.
[How]
`rabbit_logger_std_h` now uses an indirect internal call to a wrapper of
`io:put_chars/2`. This allows the `logging_SUITE` to mock that call and
add the addition call to `ct:log/2`.
We need to do an explicit `?MODULE:io_put_chars/2` even though a local
call would work, otherwise meck can't intercept the calls.
[Why]
`rabbit_logger_std_h` is a fork of Erlang/OTP's `logger_std_h` to:
* allow to mock the call to io:put_chars/2
* support date-based rotation
[How]
The initial fork was from Erlang/OTP 23.0. Here, we update it to
Erlang/OTP 26.1.2.
[Why]
Before `rabbitmq_prelaunch` was moved from `deps/rabbit/apps` to `deps`,
it would inherit compile flags from `deps/rabbit`. Therefore, when
`rabbit` was tested, `rabbitmq_prelaunch` would be compiled with
`-DTEST`.
After the move, this is not the case anymore. Thus, the `logging_SUITE`
testsuite can't call those internal functions anymore.
[How]
Now, the needed functions are always exported. We simply comment that
they are for internal testing purpose and should not be called in
production code.
Discovered while testing
https://github.com/rabbitmq/rabbitmq-server/pull/10108 by using the
lukebakken/docker-rabbitmq-cluster project.
That project, by default, uses longnames for node names. When testing
classic peer discovery, starting a peer node would time out every time.
Ensure `host` is set
[Why]
Building an Erlang release with this application under `apps` happened
to be problematic with Erlang.mk. Our use of deps and apps is not
exactly standard here anyway.
We also get issues with various make targets where `rabbitmq_prelaunch`
is being cleaned and not re-compiled, leading to "application not found"
errors.
[How]
So instead of fighting, move `rabbitmq_prelaunch` to the deps directory,
like all other applications.
This commit is not enough and will be followed with changes to Makefiles
and Bazel files. This is not done in this commit so the changes are
visible. Otherwise, they would be burried in the move.