Commit Graph

631 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron 3eb5ae110a rabbitmq-hexpm.mk: Switch to hexpm-cli 0.3.0
This version should work with the latest `rebar3_hex` plugin (6.5.0).
2019-03-18 13:40:25 +01:00
Jean-Sébastien Pédron 844c591027 Revert "rabbitmq-run.mk: Increase lager message rate threshold from 50 to 5000"
We don't need this anymore, now that the high watermark is bumped
automatically when the log level is set to `debug` in rabbit_lager.

This reverts commit 49956c6423.
2019-03-18 11:41:28 +01:00
Michael Klishin 80c867763d Recon 2.4.0
[#164450566]
2019-03-15 05:32:16 +03:00
Michael Klishin cdf2a5afc0 Lager 3.6.9
[#164603900]
2019-03-15 05:17:19 +03:00
kjnilsson 1e6fed8e4e Replace use of erl_call with rabbitmqctl
The stop-node command is the only make target still using erl_call who
is prone to breakage (broken in OTP 21.3) and can readily be replaced
with rabbitmqctl stop.
2019-03-14 15:26:24 +00:00
Jean-Sébastien Pédron d216e67183 rabbitmq-run.mk: Set `$LEAVE_PLUGINS_DISABLED` to start broker without plugins
I.e, plugins are available but left disabled at broker start. It is
still possible to enable them using rabbitmq-plugins(1).
2019-03-01 15:52:38 +01:00
Jean-Sébastien Pédron ef6aa904c9 rabbitmq-run.mk: Allow to set `$RABBITMQ_PLUGINS_DIR` when starting a broker 2019-03-01 15:50:14 +01:00
Michael Klishin a14097173b Fix a typo in rabbitmq-components.mk 2019-02-12 22:34:01 +03:00
Yury.Alioshinov a3d44e3fe4 fix whitespaces 2019-02-08 01:51:20 +03:00
Yury.Alioshinov 0e1e260446 rabbit_log_ldap external sink was added 2019-02-08 01:42:11 +03:00
kjnilsson 5d8cfdc134 Rename rabbit_log_ra
and add new sink to rabbitmq-build.mk

[#163724857]
2019-02-05 11:52:28 +00:00
Jean-Sébastien Pédron 49956c6423 rabbitmq-run.mk: Increase lager message rate threshold from 50 to 5000
Otherwise, it drops too many messages and the log file becomes useless
when debugging.
2019-02-01 10:45:29 +01:00
Jean-Sébastien Pédron 43e40f3370 rabbitmq-run.mk: Log debug messages when using `make run-broker` 2019-02-01 10:45:29 +01:00
Jean-Sébastien Pédron dca9cad83a rabbitmq-run.mk: Configure `$RABBITMQ_FEATURE_FLAGS`
[#159298729]
2019-02-01 10:45:29 +01:00
Michael Klishin ce47d85a93 Update rabbitmq-components.mk 2019-01-10 02:08:44 +03:00
Luke Bakken e33487ab63 Add sysmon_handler dependency
Fixes rabbitmq/rabbitmq-server#952
2019-01-07 12:52:06 -08:00
Jean-Sébastien Pédron 2d116f96d6 rabbitmq-hexpm.mk: Switch to hexpm-cli 0.2.0
This version should work with the latest `rebar3_hex` plugin.
2018-12-06 18:32:53 +01:00
Michael Klishin 733bcb6507 rabbitmq-components.mk: remove SockJS, rabbitmq_clusterer, rabbitmq_management_visualiser
They've been discontinued in 3.7.0.
2018-12-06 18:27:46 +03:00
Loïc Hoguin ed7802233d Use the built-in Ranch PROXY protocol support 2018-12-04 12:29:29 +01:00
Loïc Hoguin ea18cd032b Update Ranch to 1.7.1 and Cowboy to 2.6.1 2018-11-28 15:53:03 +01:00
Loïc Hoguin 3a9b2134c4 Update Cowboy to 2.6 and Ranch to 1.7 2018-11-20 14:34:59 +01:00
John Eckersberg 69b4d311da rabbitmq-run.mk: Fix stop-brokers with NODES > 1
The seq command should include a -1 increment to stop nodes in reverse
order.  Previously, as an example with NODES=2, will run `seq 2 1`
which produces no items to iterate, so the entire stop-node loop does
not execute and the brokers are left running.
2018-11-16 08:52:59 -05:00
Jean-Sébastien Pédron ecc8c4e670 rabbitmq-run.mk: Add AMQP and management TCP ports to `test_rabbitmq_config`
This helps when we want to start multiple nodes on the same host with
the management plugin enabled.
2018-11-05 14:16:12 +01:00
kjnilsson 7242b2f98b add Ra as external dependency 2018-10-29 12:41:41 +00:00
Diana Corbacho f7bb8baff3 Revert "Configure ra metrics handler"
This reverts commit 1d946c91635f250677968949d79abd5b40974201.
2018-09-21 08:51:16 +01:00
Diana Corbacho baadbe8701 Configure ra metrics handler
[#157193081]
2018-09-21 08:51:16 +01:00
Diana Corbacho d145becaee Use RABBITMQ_QUORUM_DIR as ra data_dir when starting a node
[#154472152]
2018-09-21 08:51:16 +01:00
Diana Corbacho 3e66da916c Set the ra data_dir when starting a node
Ra is now a dependency of rabbit application, and it must be started
and configured on every rabbitmq node

[#154472152]
2018-09-21 08:51:16 +01:00
Jean-Sébastien Pédron 26cd7e4980 rabbitmq-components.mk: Bump Ranch to 1.6.2
... and ranch_proxy_protocol to 2.1.1.

Ranch 1.6.2 fixes ninenines/ranch#205 which was discovered in the
rabbitmq-stomp testsuite.

[#160270896]
2018-09-19 11:00:56 +02:00
Jean-Sébastien Pédron 158d07485b rabbitmq-components.mk: Bump 3rd-party dependencies' pinning
* Lager: 3.6.4 -> 3.6.5
* Ranch: 1.5.0 -> 1.6.1
* ranch_proxy_protocol: 1.5.0 -> 2.1.0-rc.1

Note that ranch_proxy_protocol 2.1.0-rc.1 is not an official release
from upstream: it was published by us (the RabbitMQ team) because we
don't have feedback from upstream about a pull request to update Ranch
to 1.6.x (heroku/ranch_proxy_protocol#49). Hopefully upstream will merge
the pull request and cut a new official release.

Fixes rabbitmq/rabbitmq-common#269.
[#160270896]
2018-09-11 14:25:16 +02:00
Daniil Fedotov 8f6c838a42 Remove -Wunmatched_returns from default dialyzer options. 2018-08-14 17:34:19 +01:00
Jean-Sébastien Pédron a52cd02bff rabbitmq-components.mk: Switch back to Ranch 1.5.0
... until we have a compatible ranch_proxy_protocol.
2018-08-09 17:43:24 +02:00
Jean-Sébastien Pédron b97303820c rabbitmq-components.mk: Bump 3rd-party dependencies' pinning
* Cowboy: 2.3.0 -> 2.4.0
* Cowlib: 2.2.1 -> 2.3.0
* Lager: 3.6.3 -> 3.6.4
* Ranch: 1.5.0 -> 1.6.0
* Recon: 2.3.4 -> 2.3.6

`ranch_proxy_protocol` was not updated to 2.0.0 because it drops support
for Erlang 19.3 (it requires `ssl:handlshake()`).
2018-08-09 12:06:51 +02:00
Jean-Sébastien Pédron 0312c6c5ed rabbirmq-run.mk: Use rabbitmqctl(1) instead of erl_call(1)
erl_call(1) is broken in Erlang 21.0-rc.2 when we use it to evaluate
some code on a remote node. The issue was reported upstream but we can
replace erl_call(1) by `rabbitmqctl eval` to achieve the same result.

The output is still filtered using sed(1) to ensure it remains
unchanged, in case testsuites expect a particular format.

We still continue to use erl_call(1) to stop a node because we can't
achieve the same behavior using rabbitmqctl(1). This use of erl_call(1)
is working with Erlang 21.0-rc.2.

[#157964874]
2018-06-07 11:38:44 +02:00
Jean-Sébastien Pédron a993a4ab1b rabbitmq-components.mk: Update lager to 3.6.3
This version is the first one compatible with Erlang 21.x.

[#157964874]
2018-06-07 11:13:04 +02:00
Jean-Sébastien Pédron d9f23c1f8d rabbitmq-tools.mk: New targets to print Git repoository URLs
They are useful to query the upstream/default Git repository URLs for
both fetch and push.

[#156874375]
2018-04-18 11:43:35 +02:00
Jean-Sébastien Pédron 99e9a354df rabbitmq-components.mk: Update other third-party dependencies
* Cowboy: 2.2.2 -> 2.3.0
* Cowlib: 2.1.0 -> 2.2.1
* jsx:    2.8.2 -> 2.9.0
* Lager:  3.5.1 -> 3.6.1
* recon:  2.3.2 -> 2.3.4
2018-04-11 10:44:25 +02:00
Jean-Sébastien Pédron bcb92df7a1 rabbitmq-components.mk: Update Ranch to 1.5.0
... as well as ranch_proxy_protocol to 1.5.0.
2018-04-11 10:03:49 +02:00
Jean-Sébastien Pédron b4b8c8057e rabbitmq-early-test.mk: Start common_test node with `-hidden`
That way, it doesn't interfere with testcases working with multiple
RabbitMQ nodes. Furthermore, independent sets of nodes won't try to
autoconnect to the common_test node, and thus unrelated nodes after.
This is useful for the upcoming VM-based test helpers.

[#153749132]

(cherry picked from commit 47a5bdfff548a5c278af2d947feeeb7836aae0c3)
2018-03-06 22:26:12 +03:00
Jean-Sébastien Pédron e232a6080e Revert "rabbitmq-early-test.mk: Start common_test node with `-hidden`"
This reverts commit 878628a1f9.
2018-03-05 14:50:20 +01:00
Jean-Sébastien Pédron 18985a1007 Merge branch 'hide-common_test-node' 2018-03-05 12:25:22 +01:00
Jean-Sébastien Pédron 878628a1f9 rabbitmq-early-test.mk: Start common_test node with `-hidden`
That way, it doesn't interfere with testcases working with multiple
RabbitMQ nodes. Furthermore, independent sets of nodes won't try to
autoconnect to the common_test node, and thus unrelated nodes after.
This is useful for the upcoming VM-based test helpers.

[#153749132]
2018-03-05 12:23:21 +01:00
Jean-Sébastien Pédron b0ef541275 Merge branch 'fix-dialyzer-errors-part2' 2018-02-02 10:24:05 +01:00
Jean-Sébastien Pédron 3be47d477e rabbitmq-build.mk: Only add rabbitmq-cli to compiler path for plugins
rabbitmq-common shouldn't see this, otherwise it's a reverse dependency
and thus a dependency circle.

In the future, we should fix this by adding rabbitmq-cli as an explicit
dependency to whatever component needs it.

[#153850881]
2018-02-01 17:09:26 +01:00
Jean-Sébastien Pédron ec7bdb3ab5 Merge branch 'limit-rabbitmq-components.mk-update-to-same-branch' into v3.7.x 2018-01-30 16:20:56 +01:00
Jean-Sébastien Pédron 7e342b04d6 Merge branch 'limit-rabbitmq-components.mk-update-to-same-branch' 2018-01-30 15:04:48 +01:00
Jean-Sébastien Pédron cca83231f0 rabbitmq-tools.mk: Move `rabbitmq-components.mk`-related targets there
This way, we are sure that the possibly newer recipe in
`rabbitmq-tools.mk` handles the operation instead of a possibly obsolete
`rabbitmq-components.mk` copy.

[#154761483]
2018-01-30 14:54:37 +01:00
Jean-Sébastien Pédron 73e2e89312 rabbitmq-components.mk: Compare branch names before updating `rabbitmq-components.mk`
To avoid a copy of `rabbitmq-components.mk` from rabbitmq-common's
`v3.6.x` branch to another component's `master` branch, we want to
compare branch names of both repositories.

This situation may occur when checking out the `v3.6.x` in the Umbrella
using `gmake up BRANCH=v3.6.x` but for instance some plugins don't have
such a branch. In this case, they remain on the previous branch. We
don't want to overwrite their `rabbitmq-components.mk` if this happens.

[#154761483]
2018-01-30 14:51:27 +01:00
Luke Bakken 21b10e9a9a Merge branch 'cowboy-update-154176350' 2018-01-29 16:20:02 -08:00
Luke Bakken 4df3a6f2a1 Update cowboy to 2.2.2 2018-01-29 16:02:24 -08:00
Jean-Sébastien Pédron 98305dd9aa rabbitmq-components.mk: Fix $(possible_base_rmq_ref) value
It should be `master` because we are not in a release branch.
2018-01-23 17:20:57 +01:00
Jean-Sébastien Pédron 1c843e741f Merge branch 'sort-components-alphabetically' into v3.7.x 2018-01-23 12:48:26 +01:00
Jean-Sébastien Pédron 70fd88613d Merge branch 'sort-components-alphabetically' 2018-01-23 12:47:17 +01:00
Jean-Sébastien Pédron 2a33e25e34 rabbitmq-components.mk: Sort components alphabetically
[#154472152]
2018-01-23 12:46:22 +01:00
Diana Corbacho f6f1eb6c41 Merge branch 'rabbitmq-common-story-154472152' 2018-01-22 18:28:39 +00:00
Diana Corbacho adbb3a8a81 Merge branch 'rabbitmq-common-story-154472152' into v3.7.x 2018-01-22 18:26:30 +00:00
Diana Corbacho d2e287f5eb mk/rabbitmq-components.mk: Add ra as a dependency
[#154472152]
2018-01-22 18:19:35 +00:00
Gerhard Lazu aa2944236c Merge remote-tracking branch 'origin/allow-to-use-apps-directly-instead-of-ez-archives-in-umbrella' into v3.7.x 2018-01-18 14:43:28 +00:00
Gerhard Lazu 12020aaa24 Merge remote-tracking branch 'origin/allow-to-use-apps-directly-instead-of-ez-archives-in-umbrella' 2018-01-18 14:17:09 +00:00
Jean-Sébastien Pédron 98353f0489 rabbitmq-run.mk: Use plugins from `$(DEPS_DIR)` if `PLUGINS_FROM_DEPS_DIR` is defined
If the test broker is started using:

    gmake run-broker PLUGINS_FROM_DEPS_DIR=1

Then plugins are taken from `$(DEPS_DIR)` even though, the `.ez`
archives were created.

This can be handy when e.g. working in the management plugin's static
files: it makes it possible to modify a CSS and just reload the page to
see the change. There is no need to re-run `gmake run-broker`.

The value of `PLUGINS_FROM_DEPS_DIR` is not verified.

Caveats:
    * Irrelevant plugins which happend to be already compiled will
      be enabled because rabbitmq-plugins(8) will find them inside
      `$(DEPS_DIR).
    * This feature isn't tested when a plugin is cloned directly and
      it probably doesn't work. The developer is expected to use the
      Umbrella for now.

[#154435736]
2018-01-18 14:03:41 +01:00
Jean-Sébastien Pédron 9a043eef8d Merge branch 'add-commits-since-release-target' into v3.7.x 2018-01-08 14:07:43 +01:00
Jean-Sébastien Pédron c3ecea0e56 Merge branch 'add-commits-since-release-target' 2018-01-08 12:11:48 +01:00
Jean-Sébastien Pédron 7aad8fc90e rabbitmq-tools.mk: Add `commits-since-release` target
This target is useful to get the list of commits since the last
(pre)release or a specified tag in all RabbitMQ repositories involved
(i.e. the current project and its RabbitMQ dependencies). In particular,
from rabbitmq-server-release, it can help during the review of all
commits, issues and pull requests while preparing a release.

To see an interactive list of commits for each repository:

    gmake commits-since-release

To get the same list formatted as Markdown (to publish on GitHub):

    gmake commits-since-release MARKDOWN=yes

To get the commits since the last prerelease:

    gmake commits-since-release SINCE_TAG=last-prerelease

To get the commits since a specific release:

    gmake commits-since-release SINCE_TAG=v3.7.1

[#153087397]
2018-01-08 11:50:39 +01:00
Jean-Sébastien Pédron 8726b8996a rabbitmq-components.mk: Switch base branch to `v3.6.x`
We are about to rename `stable` to `v3.6.x`. That's why we need to
update the script which determines if a development branch was forked
from `v3.6.x` (instead of `stable`) and falls back to `master` if it's
not the case.

While here, handle the case where the `master` branch doesn't exist
locally. This happens when using `git clone -b $branch` or in CI.

(cherry picked from commit 037bab7f799bf9cc180b0dfa2b7899b7a464cf9d)
2017-12-14 14:13:00 +01:00
Jean-Sébastien Pédron 790c7c150c rabbitmq-mix.mk: New Makefile to integrate with Mix in the source archive
This file is copied to Elixir-based components (e.g. rabbitmq_cli) when
we create the source archive of RabbitMQ. It allows RabbitMQ to build
offline (which is the case in many package build farms).

References rabbitmq/rabbitmq-server-release#61.
[#153358632]
2017-12-07 12:05:01 +01:00
Jean-Sébastien Pédron d0c17eff47 rabbitmq-components.mk: Import changes from `master`
Namely:
 * Fix `check-rabbitmq-components.mk` for rabbitmq-common.
2017-12-01 17:05:21 +01:00
Jean-Sébastien Pédron df3f2af3f3 rabbitmq-components.mk: Import changes from `master`
Namely:
 * Depend on ranch_proxy_protocol 1.4.4 (which depends on ranch 1.4.0,
   the same as us).
 * Fix `check-rabbitmq-components.mk` for rabbitmq-common.
2017-12-01 15:04:35 +01:00
Jean-Sébastien Pédron 77e66bba35 rabbitmq-components.mk: Set Cowboy pinning to 2.0.0 and Ranch to 1.4.0
This change was committed to the management-related plugins directly
during the switch to Cowboy 2.0. Unfortunately, it was lost when
rabbitmq-components.mk was updated globally.

Therefore this commit restores the new expected pinning.
2017-11-28 13:55:46 +01:00
Jean-Sébastien Pédron 23bc5cc1b5 Revert "rabbitmq-components.mk: Skip CI when updating rabbitmq-components.mk"
Unfortunately, the "skip CI" feature isn't what I would expect: I
expected that such a commit would not trigger a job, but that the commit
would still be picked by a job triggered for another reason. In fact,
it's entirely ignored: the resource will be stuck at the previous
commit, until another regular commit (i.e. without the "skip CI"
message) is pushed.

This reverts commit c9e636c0b4.
2017-11-28 13:03:12 +01:00
Jean-Sébastien Pédron c9e636c0b4 rabbitmq-components.mk: Skip CI when updating rabbitmq-components.mk
A build will be triggered anyway because of the initial commit of
rabbitmq-components.mk to rabbitmq-common.
2017-11-28 12:56:09 +01:00
Jean-Sébastien Pédron 95aca57abd rabbitmq-components.mk: Switch base branch to `v3.7.x`
Therefore, after we branch `v3.7.x`, rabbitmq-components.mk will try to
determine if a development branch was forked from `v3.7.x` (instead of
`stable`) and fallback to `master` if it's not the case.

While here, handle the case where the `master` branch doesn't exist
locally. This happens when using `git clone -b $branch` or in CI.
2017-11-28 12:43:04 +01:00
Jean-Sébastien Pédron 722eb5aa06 Merge branch 'stable' 2017-11-08 10:08:06 +01:00
Jean-Sébastien Pédron 255077a79f rabbitmq-tools.mk: Remove set -x from replace_aws_creds
It was only useful during debuggin.

[#152509619]
2017-11-08 10:07:34 +01:00
Jean-Sébastien Pédron 3efe79bfaf Merge branch 'stable' 2017-11-07 14:21:00 +01:00
Jean-Sébastien Pédron 5d4e6318bd rabbitmq-tools.mk: It's ok if the existing .travis.yml has no encrypted env. vars
[#152509619]
2017-11-07 12:37:08 +01:00
Jean-Sébastien Pédron c05addf2b1 Merge branch 'stable' 2017-11-06 19:55:22 +01:00
Jean-Sébastien Pédron aca81b436b rabbitmq-tools.mk: Restore AWS creds when syncing .travis.yml
In other words, instead of copying rabbitmq-common's credentials which
won't be valid in another project, keep the existing credentials (if
any).

Tha said, if CREDS is set, they will be overwritten again.

[#152509619]
2017-11-06 19:53:07 +01:00
Jean-Sébastien Pédron 84bca32db6 Merge branch 'stable' 2017-11-06 19:22:10 +01:00
Jean-Sébastien Pédron 5d2ab49087 rabbitmq-tools.mk: Set AWS credentials in the `travis-yml` target
... if CREDS, the path to `pipeline-credentials.yml` is set.

This is used to upload logs to Amazon S3 when a build fails.

[#152509619]
2017-11-06 19:19:09 +01:00
Jean-Sébastien Pédron b9f90556d2 Merge branch 'stable' 2017-11-03 17:46:53 +01:00
Jean-Sébastien Pédron f6360209aa rabbitmq-tools.mk: New target to help keep `.travis.yml` synchronized
It assumes that all projects use the same `.travis.yml` usually (we try
to achieve the same in Concourse). For special cases, like e.g.
rabbitmq-amqp1.0 which needs .NET Core, there is a `.travis.yml.patch`
in the project which is applied to the stock `.travis.yml`.

Like `rabbitmq-components-mk`, it accepts a `DO_COMMIT=yes` variable to
automatically create a commit if there is a change to `.travis.yml`.

There is also a `update-travis-yml` to update it recursively.

[#152509619]
2017-11-03 17:37:05 +01:00
Jean-Sébastien Pédron ad337ecad9 rabbitmq-early-test.mk: Do not use ct_styled_out on Travis CI (take #2)
This time, avoid to erase the value of $(TEST_DEPS)...

[#152509619]
2017-11-02 18:45:58 +01:00
Jean-Sébastien Pédron f7e0ca04f8 rabbitmq-early-test.mk: Do not use ct_styled_out on Travis CI
Escape sequences used to move cursor around are not properly translated
in the HTML output, thus defeating the purpose of the Common Test output
module.

[#152509619]
2017-11-02 18:35:49 +01:00
Jean-Sébastien Pédron 41677e35fa Merge branch 'stable' 2017-10-20 09:03:01 +02:00
Jean-Sébastien Pédron 54ff0ee888 rabbitmq-hexpm.mk: Allow to override version pinning
... for `rabbit_common` and `amqp_client`.

This should only be used for testing purpose (e.g. dry-run in CI),
otherwise dependency tracking will break: `amqp_client` depends on a
specific version of `rabbit_common`.

However in CI, we want to be able to do a publish dry-run of
`amqp_client`. As it requires `rabbit_common` to be published, we need
to override the version pinning to point it to an already published
version of `rabbit_common` (the corresponding version of `rabbit_common`
was not published either). This is ok because nothing is published in
the end.

[#150482173, #150482202]
2017-10-20 09:02:48 +02:00
Jean-Sébastien Pédron bff1b7eabf Merge branch 'stable' 2017-10-16 17:11:55 +02:00
Jean-Sébastien Pédron 3cce066955 rabbitmq-macros.mk: Move `compare_version` macro to its own file
This way, it can be used with including rabbitmq-build.mk.
2017-10-16 17:08:55 +02:00
Jean-Sébastien Pédron de6c34decb Merge branch 'stable' 2017-10-13 14:31:55 +02:00
Jean-Sébastien Pédron 882e2c8409 rabbitmq-components.mk: Add AMQP 1.0 client & common library 2017-10-13 14:31:14 +02:00
Michael Klishin 63ec01089a Add random exchange plugin
(cherry picked from commit 4b624fa546)
2017-10-13 12:59:41 +02:00
Jean-Sébastien Pédron bb147ac748 rabbitmq-hexpm.mk: No need to override version pinning for `rebar.config`
We now always take 3rd-party dependencies from Hex.

[#150482173]
2017-10-13 11:51:54 +02:00
Jean-Sébastien Pédron 589126b2a2 Merge branch 'stable' 2017-10-13 11:13:43 +02:00
Jean-Sébastien Pédron 34e9ac31b9 rabbitmq-hexpm.mk: Copy 3rd-party dependencies to rabbitmq-componentS.hexpm.mk
When we publish our packages to Hex.pm, we use the simplified
rabbitmq-components.hexpm.mk to replace the regular
rabbitmq-components.mk.

Before commit ba59f969b7,
rabbitmq-components.mk took 3rd-party dependencies from GitHub. Now that
it takes them from Hex.pm, we don't need to override and hard-code them
again in rabbitmq-components.hexpm.mk.

Thus now, we extract them from rabbitmq-components.mk and put them at
the end of rabbitmq-components.hexpm.mk when we publish to Hex.pm.

The other benefit is that we don't have to remember to change version
pinning in both rabbitmq-components.mk and rabbitmq-components.hexpm.mk.

[#150482173]
2017-10-13 10:47:45 +02:00
Jean-Sébastien Pédron ba59f969b7 rabbitmq-components.mk: Take 3rd-party dependencies from Hex.pm
This way, when we publish our own packages to Hex.pm (rabbitmq-common
and rabbitmq-erlang-client as of now), we are sure that no dependency
will miss from Hex.pm.

Before that, 3rd-party dependencies were taken from GitHub, and only
when we published to Hex.pm, the source was overriden and set to Hex.pm.
This led to bad surprises such as `ranch_proxy_protocol` which was
unavailable on Hex.pm, preventing us from publishing our packages.

While here, remove pinning for mochiweb and webmachine which we are not
using anymore.

[#150482173]
2017-10-13 10:16:04 +02:00
Jean-Sébastien Pédron 2f350dc77c mk/rabbitmq-hexpm.mk: Take rabbit_common deps from Hex.pm
Otherwise, we use the Git repository. At some point, we might consider
using Hex.pm all the time.

[#150482173]
2017-09-28 14:49:00 +02:00
Jean-Sébastien Pédron d689a3d75e mk/rabbitmq-components.mk: Pin jsx and lager versions
We were using the `master` branch before.

While here, we extract the version of `ranch_proxy_protocol` and store
it in a dedicated variable. This will be used in `rabbitmq-hexpm.mk` to
prepare `rebar.config`.
2017-09-28 14:35:00 +02:00
Michael Klishin a3411ec8bf Merge branch 'stable' 2017-09-13 17:53:46 -04:00
Michael Klishin b060f06b0e rabbitmq_vlc => rabbitmq_vlc_exchange 2017-09-13 17:45:01 -04:00
Michael Klishin 2fc037fc83 Switch to rabbitmq/mix_task_archive_deps 2017-09-12 14:03:35 -04:00
Michael Klishin 4b624fa546 Add random exchange plugin 2017-09-12 12:38:11 -04:00
Michael Klishin 377a560d66 Merge branch 'stable' 2017-08-29 09:11:45 -06:00
Michael Klishin 1d73bd58c8 Merge pull request #219 from binarin/patch-1
Fix dep fetching on detached HEAD
2017-08-29 09:08:06 -06:00
Jean-Sébastien Pédron 85a7f0e0c2 Merge branch 'stable' 2017-08-29 17:03:07 +02:00
Jean-Sébastien Pédron 92829f64c9 rabbitmq-run.mk: Add `start-brokers` and `start-cluster` targets
... as well as their matching `stop-*` targets.

The goal is to ease the start of many nodes with a single command.

To start 6 unclustered RabbitMQ nodes:

    gmake start-brokers NODES=6

To start 6 clustered RabbitMQ nodes:

    gmake start-cluster NODES=6

To stop them:

    gmake stop-brokers NODES=6
    gmake stop-cluster NODES=6

Nodes are called `rabbit-$N@$HOSTNAME`. $N starts at 1. TCP ports are
taken from 5672/15672/25672 and increased by one for each subsequent
node.

This also works from plugins, so you can start a cluster with eg. the
management plugin enabled on all nodes.
2017-08-29 15:59:45 +02:00
Jean-Sébastien Pédron 67c0f7d62f rabbitmq-run.mk: Fix indentation 2017-08-29 15:55:28 +02:00
Alexey Lebedeff 4a704b2d3f Fix dep fetching on detached HEAD
When non-English locale is used, detached HEAD magic stops working
2017-08-29 12:22:55 +02:00
Gerhard Lazu b6ce549268 Create .erlang.mk if it's missing
Subsequent commands will fail otherwise

[#150422612]
2017-08-21 23:38:52 +01:00
Michael Klishin d44bd0b7aa Bump Cowboy to 1.1.2 2017-07-26 03:52:06 +03:00
Michael Klishin 7fface95bc Bump Ranch to 1.3.2 2017-07-26 02:26:48 +03:00
Jean-Sébastien Pédron 6891b51067 Merge branch 'stable' 2017-07-07 13:28:53 +02:00
Jean-Sébastien Pédron 36ba07bb58 mk/xrefr: Add Elixir-based applications to code path
For Erlang-based applications, the path is expected to be
`$application/ebin` and Erlang.mk sets up everything for us.

For Elixir-based applications, the path is something like
`$application/_build/$env/lib/*/ebin`. To add those, first we make sure
that $(ERLANG_MK_RECURSIVE_DEPS_LIST) is generated because it will
contains all build and runtime dependencies paths, and we pass that
filename to xrefr(1) using an environment variable.

Then xrefr(1) parses that file and looks at all of them if they contain
`_build/dev/lib/*/ebin` directories. If that's the case, those are added
to the code path.

Later in the script, the code path is added to xref library path.

[#140125673]
2017-07-07 13:23:16 +02:00
Jean-Sébastien Pédron c871241e80 Merge branch 'stable' 2017-07-05 11:40:46 +02:00
Jean-Sébastien Pédron ce33ccfb23 mk/rabbitmq-early-test.mk: Do not set XREFR if target is `distclean{,-xrefr}`
Erlang.mk removes the copy of xrefr(1) during `make distclean-xref` (and
thus `make distclean`) because it assumes the script was fetched and can
be refetched.

In our case, the script is committed to this repository and all projects
are using it. Therefore, `make distclean` shouldn't remove our script.

To work around this, we do not set `$(XREFR)` if the target is either
`distclean` or `distclean-xref`.
2017-07-05 11:37:42 +02:00
Michael Klishin 94c796e756 This file was removed unintentionally 2017-07-04 22:53:57 +03:00
Michael Klishin c48c32ecbd rabbit_nodes_common: diagnostics messages improvements
A follow-up to rabbitmq/rabbitmq-cli@158798af0c.
2017-07-04 22:51:39 +03:00
Jean-Sébastien Pédron 2f29714cec Merge branch 'stable' 2017-06-30 17:32:08 +02:00
Jean-Sébastien Pédron 3fa098e9a1 mk/xrefr: Skip missing directories
For instance, `test` doesn't exist in all projects.

[#140125673]
2017-06-30 16:30:16 +02:00
Jean-Sébastien Pédron 951d5f45a6 mk/xrefr: Adapt how the script ignores results to our needs
In particular:
    - If an MFA is listed in -ignore_xref(), ignore both the error in
      the calling module having this -ignore_xref() and the undefined
      MFA if any.
    - Ignore all errors from functions listed in
      -erlang_version_support() that will be "compiled-out" at runtime.

[#140125673]
2017-06-30 13:46:54 +02:00
Jean-Sébastien Pédron c42e53a6e0 mk/xrefr: Provide our own xrefr(1) escript
It is forked from xref_runner. Compared to upstream, it allows to
exclude entire modules: we need that for the *_compat modules.

Furthermore it's compatible with Erlang R16B03 because:
    - It's a plain text escript, not a precompiled one.
    - It doesn't use maps.

[#140125673]
2017-06-30 11:29:37 +02:00
Michael Klishin 7919af892e Merge branch 'master' into rabbitmq-common-198 2017-06-27 10:17:55 +03:00
Jean-Sébastien Pédron 00ec8d527f xref: Add configuration to disable deprecated function checks
Set `$(XREFR_ARGS)` for all projects using the `rabbitmq-early-test.mk`
early-stage plugin so that they also use this configuration file.

[#118490793]

(cherry picked from commit 44dd06343d)
2017-06-26 14:56:39 +02:00
Jean-Sébastien Pédron 44dd06343d xref: Add configuration to disable deprecated function checks
Set `$(XREFR_ARGS)` for all projects using the `rabbitmq-early-test.mk`
early-stage plugin so that they also use this configuration file.

[#118490793]
2017-06-26 13:31:47 +02:00
Michael Klishin b8956d3577 Add peer_discovery_etcd and peer_discovery_k8s to rabbitmq-components.mk 2017-06-12 20:12:06 +03:00
Michael Klishin a9e92db8f2 Add peer_discovery_etcd and peer_discovery_k8s to rabbitmq-components.mk 2017-06-12 18:35:00 +03:00
Jean-Sébastien Pédron c0fe0b15e2 Merge branch 'stable' 2017-06-08 17:49:54 +02:00
Jean-Sébastien Pédron 8d2f49097e rabbitmq-early-test.mk: Include `$(RMQ_CI_CT_HOOKS)` in TEST_DEPS
... the target is *-on-concourse. This fixes the make recipe because the
dependency might be missing on the host, which caused fly(1) to complain
because the specified input was not there.

This makes the loop on `$(RMQ_CI_CT_HOOKS)` useless in rabbitmq-test.mk,
because those inputs are handled with the previous loop on TEST_DEPS.

[#146078591]
2017-06-08 17:46:25 +02:00
Michael Klishin fed87956a7 Merge branch 'stable' 2017-06-02 19:05:17 +03:00
Michael Klishin b615e9313c Add rabbitmq_aws
Since we added rabbitmq_peer_discovery_aws to reduce the diff
with master.
2017-06-02 17:50:40 +03:00
Jean-Sébastien Pédron 76c81d3514 Merge branch 'stable' 2017-06-02 09:48:26 +02:00
Michael Klishin d7728ab099 Add peer discovery plugins (3.7.0+) 2017-06-01 18:49:48 +03:00
Jean-Sébastien Pédron f9838978e0 rabbitmq-test.mk: Add a *-on-concourse target
It allows to run any target on Concourse. All test dependencies are
taken locally and uploaded to Concourse before the make target is
executed. The test-output is written to logs/on-concourse.

By default, the oldest version of Erlang supported by the branch is
used. One can override that with the $(ERLANG_VERSION) make variable.

Here are some examples:

    gmake tests-on-concourse
    gmake dialyzer-on-concourse
    gmake ct-on-concourse V=1
    gmake ct-unit-on-concourse t=parallel_tests:pid_decompose_compose

[#146078591]
2017-06-01 17:33:15 +02:00
Michael Klishin 82c6750294 Add peer discovery plugins (3.7.0+) 2017-06-01 18:00:49 +03:00
Michael Klishin 1d31da5e16 Merge branch 'master' into rabbitmq-common-198 2017-05-27 00:46:24 +03:00
Michael Klishin d854099e91 Merge branch 'stable'
Conflicts:
	Makefile
	src/ssl_compat.erl
2017-05-25 02:56:03 +03:00
Jean-Sébastien Pédron 8c0830c1fa Revert "rabbitmq-build.mk: Enable -Werror for testsuites too"
This is too early to enable: they are still many warnings to fix before.

This reverts commit 0c364f7499.
2017-05-22 11:04:14 +02:00
Jean-Sébastien Pédron 0c208416e3 rabbitmq-build.mk: The `nowarn_export_all` flag was moved
... to `rabbit_upgrade_functions.erl`. We need it in this module
specifically, but nowhere else for now. So restore the default behavior
of the compiler (Erlang 20.x warns about `export_all` by default).
2017-05-19 17:11:18 +02:00
Jean-Sébastien Pédron 2e0c467506 rabbitmq-early-test.mk: Remove a stale comment about cth_styledout
[#138917395]
2017-05-19 16:45:08 +02:00
Jean-Sébastien Pédron 3623310ca1 rabbtmq-early-test.mk: Always enable cth_styledout
... not only in CI.

Remember that this common_test hook only works with Erlang 19.2+. It's
effectively a no-op with previous versions.

[#138917395]
2017-05-19 16:45:08 +02:00
Jean-Sébastien Pédron 0c364f7499 rabbitmq-build.mk: Enable -Werror for testsuites too 2017-05-19 16:45:05 +02:00
Daniil Fedotov 9a5bbb3463 Merge branch 'stable' 2017-05-19 12:31:32 +01:00
Daniil Fedotov 5f46c33dc7 Add nowarn_export_all to erlang compile options
export_all is used in rabbit_upgrades, but causes a warning in OTP-20
2017-05-19 12:30:27 +01:00
Loïc Hoguin 46f8ffd5f7 Add Looking Glass support
We need to exclude looking_glass and lz4 from plugins and use
a different loading method because it is not possible to load
NIFs from within archives.

An example usage follows:

$ make run-broker RABBITMQ_TRACER=rabbit_tracer:connections

In another shell:

$ bin/runjava com.rabbitmq.perf.PerfTest

Then some time later stop the test and the node, then run:

$ make profile
$ qcachegrind
2017-05-19 10:17:25 +02:00
Jean-Sébastien Pédron 3f913f0bba Merge branch 'stable' 2017-05-16 17:53:27 +02:00
Jean-Sébastien Pédron 53f04c9b07 Use the new early-stage plugin support from Erlang.mk
With the latest update of Erlang.mk, regular plugins are loaded near the
end of `erlang.mk`. This means our plugins can't add any DEPS.
Fortunately we can do that from early-stage plugins which are loaded
near the beginning of `erlang.mk`.

Therefore, we move part of `rabbitmq-build.mk` to
`rabbitmq-early-test.mk` because it appends to `$(TEST_DEPS)`. We also
create `rabbitmq-early-plugin.mk` wrapper for plugins, like the
`rabbitmq-plugin.mk`.

A project can now load local plugins, so rabbitmq-common can load them
like other projets.

We can get rid of the compilation flags duplication because plugins are
loaded late enough that they can append to `ERLC_OPTS`.

[#144697185]
2017-05-16 16:55:07 +02:00
Daniil Fedotov 09a6a684ef Do not warn about export_all in modules
rabbit_upgrade_functions is using it.
OTP-20.0 strictly warns about export_all
2017-05-11 18:44:18 +01:00
Jean-Sébastien Pédron 8185247968 rabbitmq-build.mk: Format -ct_hooks value dynamically
... instead of hardcoding the value.

This flag takes a list of hooks separated by `and`. This formatting
should really go into Erlang.mk which would accept a `$(CT_HOOKS)`
variable.

For instance, `$(CT_OPTS)` was broken with Jenkins because multiple
`ct_hooks` were passed instead of using the `and` syntax.
2017-05-11 15:12:00 +02:00
Jean-Sébastien Pédron 70a9ab885d rabbitmq-build.mk: Fix typo in "concise" 2017-05-11 14:39:08 +02:00
Daniil Fedotov 1dcb328448 Skip erlang.mk dependencies when building mix dependencies.
Some dependencies will be archived by erlang.mk itself,
so there is no point in rebuilding them using archive.build.deps
Using the new --skip switch we can skip archives already built and
also rabbit application itself.

[Fixes #191]
2017-05-04 16:33:15 +01:00
Jean-Sébastien Pédron dc06767f88 Merge branch 'stable' 2017-05-04 14:56:55 +02:00
Jean-Sébastien Pédron fbdd03f5ea rabbitmq-build.mk: Enable cth_styledout on Travis and Concourse
The goal of this hook is to change the default output of common_test on
stdout to something colored and concise. The HTML reports still contain
everything.

This hook only works with Erlang 19.2+. With previous version, it will
be a no-op and the outout will remain unchanged.

With this change, we restore the default verbosity of common_test on
Concourse. It means way too many messages with Erlang up-to 19.1 but
that's ok. On Travis, we keep the lowered verbosity because we could
reach the limit set by Travis. Note that the verbosity affects both
stdout and the HTML reports so on Concourse, we should have more data to
debug failures.

While here, reorganize a bit the common_flags to separate each "topic".

[#138917395]
2017-05-03 11:22:44 +02:00
Alexey Lebedeff 0945a7c91e Regenerate Elixir-based .ez-s after changes
After changing any .erl-file and running `make dist` .ez files are
regenerated. But this is not the case for Elixir plugins - so it's
necessary to clean `plugins/` to refresh.

The difference is that for erlang.mk projects there is an explicit
dependencies on `ebin`, `include` and `priv` folder content -
b2d635f5a2/mk/rabbitmq-dist.mk (L52)

But there were no similar rule around
b2d635f5a2/mk/rabbitmq-dist.mk (L91)

So I've tried to add some reasonable dependencies there, and it helps.
2017-04-26 15:30:36 +03:00
Jean-Sébastien Pédron 2e66b19f2a Merge branch 'stable' 2017-04-19 12:36:10 +02:00
Jean-Sébastien Pédron f0b860619b rabbitmq-tools.mk: Remove syntastic-related targets
Erlang.mk was updated and it has the new Syntastic plugin.
2017-04-19 12:13:13 +02:00
Alexey Lebedeff 729d71abc2 Allow building plugins written in Elixir
One of the thing RabbitMQ expects from a plugin is a dependency on the
`rabbit` app. The problem is that `mix run` tries to start plugin app,
which leads to an unsuccessful attempt to start `rabbit` app.
2017-04-17 16:39:05 +03:00
Jean-Sébastien Pédron 14f8a5d5c2 Merge branch 'stable' 2017-03-28 11:43:19 +02:00
Jean-Sébastien Pédron 4a09f6c28e rabbitmq-run.mk: Add rabbitmq_management SSL configuration
... which will enable HTTPS support for the management UI when running
`gmake run-tls-broker`.
2017-03-28 11:40:11 +02:00
Jean-Sébastien Pédron bc6a4afd2e Merge branch 'stable' 2017-03-20 18:09:15 +01:00
Jean-Sébastien Pédron 3c88b4bcef rabbitmq-components.mk: Disconnect sockjs from the Umbrella and pin its version
It should be treated as a regular third-party dependency because we do
not manage it like other plugins. Furthermore, it simplifies CI.
2017-03-20 18:02:44 +01:00
Jean-Sébastien Pédron d686e4a1cf Merge branch 'stable' 2017-03-16 17:42:50 +01:00
Jean-Sébastien Pédron a6fbaf93cc mk/rabbitmq-hexpm.mk: Extract plugin from rabbitmq-build.mk
This is necessary to load rabbitmq-hexpm.mk after erlang.mk. This should
fix the publish to Hex.pm.
2017-03-16 16:29:27 +01:00
Gerhard Lazu 092d49afcd Merge branch 'stable' 2017-03-08 17:30:39 +00:00
Jean-Sébastien Pédron 4e77ad4c26 rabbitmq-build.mk: Set -ct_hooks before -erl_args
We pass `-erl_args` followed by several flags to ct_run(1) in order to
turn off messages from Erlang's kernel specifically on Concourse.
`-erl_flags` explicitely tells ct_run(1) to pass all following flags to
the emulators and thus common_test doesn't see or interpret them.

Before this change, we added the `-ct_hook` at the end of the command
line. This was fine when trying it on our workstations because we don't
try to silence extra logging there (ie. `-erl_args` is not passed).
However on Concourse, this made ct_run(1) pass `-ct_hooks` to the
emulator (which had no effect) and common_test never enabled the hook.

Therefore this patch moves `-ct_hooks cth_fail_fast` before messing with
`-erl_args`.

Because of this, our use of `$(CT_OPTS)` is fragile because all changes
later in other Makefiles will be ignored. Erlang.mk would need to expose
two variables for common_test and emulator flags. I added a comment in
rabbitmq-build.mk so we pay attention to flags order in this file at
least.

While here, only enable `cth_fail_fast` on Concourse. Everywhere else,
the full testsuites are executed no matter the failures.

Signed-off: Gerhard Lazu <gerhard@rabbitmq.com>

[#141155967]
2017-03-08 15:28:02 +01:00
Jean-Sébastien Pédron 1186e6d832 Merge branch 'stable' 2017-03-08 10:05:44 +01:00
Jean-Sébastien Pédron 6d855641d0 rabbitmq-build.mk: Enable `cth_fail_fast` commont_test hook
It means `make ct` will stop at the first test failure, for every uses:
Concourse, Travis, developers' workstation.

[#141155967]
2017-03-07 18:53:39 +01:00
Jean-Sébastien Pédron 2405f70fc3 Merge branch 'stable' 2017-03-07 13:02:53 +01:00
Diana Corbacho 9d7d4e5b1b Makefile plugin for fast and slow test suites 2017-03-07 11:42:27 +00:00
Jean-Sébastien Pédron 99700dd07b rabbitmq-components.mk: Pin PropEr version
Pin the version to the last commit supporting Erlang R16B03.

[#140575489]
2017-02-27 10:42:25 +01:00
Jean-Sébastien Pédron f8254f53b2 Revert "Restore "rabbitmq-run.mk: Remove $RABBITMQ_PLUGINS_EXPAND_DIR""
Loading a native library (eg. a NIF) from an .ez archive in unsupported
by Erlang and the team decided to revert this change again.

This reverts commit a855222dfa.

[#136622317]
2017-02-22 15:32:28 +01:00
Jean-Sébastien Pédron ec5dea2298 Revert "Make sure to build dist archives before running tests"
This caused a circular dependency in Makefile targets:
    test-dist -> test-build -> test-dist

This was reported by GNU Make as:
    gmake: Circular test-dist <- test-build dependency dropped.

This problem didn't cause any issue. However, adding `clean` as a
dependency of `test-dist` broke several assumptions, as well as many
testsuites.

This reverts commit 0599f0ac7a.
2017-02-21 18:08:53 +01:00
Jean-Sébastien Pédron a855222dfa Restore "rabbitmq-run.mk: Remove $RABBITMQ_PLUGINS_EXPAND_DIR"
Support for reading static files from Erlang .ez archives was added to
Cowboy and various RabbitMQ plugins were updated to take advantage of
the new API.

So this commit restores commit ef00860597.

It was reverted in 9037b78a3c because
Cowboy didn't have this support at the time.

Signed-off-by: Gerhard Lazu <gerhard@rabbitmq.com>

[#118562759, #136622317]
2017-02-20 18:00:57 +01:00
Daniil Fedotov 0599f0ac7a Make sure to build dist archives before running tests 2017-02-16 15:58:13 +00:00
Michael Klishin 08da9d2b27 Bump ranch_proxy_protocol to 1.4.2; ranch to 1.3.2 2017-02-11 23:26:19 +03:00
Michael Klishin 5facf4649e Clone dependencies using the git protocol, not SSH [for CI] 2017-02-10 11:15:55 +03:00
Michael Klishin ba758979f6 Merge branch 'master' into rabbitmq-server-589 2017-02-09 20:14:07 +03:00
Michael Klishin bb84ee87fa merge branch 'stable' 2017-02-08 16:51:56 +03:00
Michael Klishin ac9665d028 Add JMS CTS repo to rabbitmq-components.mk 2017-02-08 16:40:33 +03:00
Arnaud Cogoluègnes b161c09f35 Merge branch 'master' into rabbitmq-server-589 2017-02-07 10:49:04 +01:00
Arnaud Cogoluègnes ea9c3265d2 Integrate Ranch Proxy Protocol library
Part of rabbitmq/rabbitmq-server#589
2017-02-07 10:40:53 +01:00
Michael Klishin b868ab455b merge branch 'stable' 2017-02-06 19:49:29 +03:00
Michael Klishin 4e92559ef1 Add rabbitmq-auth-backend-cache to umbrella components 2017-02-06 19:22:08 +03:00
Jean-Sébastien Pédron 627bc7d05d mk/rabbitmq-components.mk: Switch to Cowboy 1.1.0
The new feature of Cowboy 1.1.0 of interest to RabbitMQ is the
possibility to serve static files from Erlang application .ez archives.
This will allow us to get rid of the plugins expansion during RabbitMQ
startup.

Cowboy 1.1.0 also comes with a stricter URL parser. In particular, `+`
characters are not converted to spaces anymore! They are left alone.
Users of the HTTP API must make sure that their requests are encoded
using path segment encoding, not query string encoding (where `+` are
converted to spaces).

References ninenines/cowboy#1070.
References ninenines/cowboy#1080.
[#136779967]
2017-02-02 12:22:47 +01:00
Jean-Sébastien Pédron 191a9b7bcf Merge branch 'stable' 2017-01-31 17:31:51 +01:00
Jean-Sébastien Pédron e51dcfc6c2 mk/rabbitmq-builds.mk: Do not warn about export_all in tests
This is the default behavior so it shouldn't be needed, but Syntastic
sets this flag by default. So disabling it here overrides Syntastic
internal default.
2017-01-31 17:30:07 +01:00
Jean-Sébastien Pédron 6845955a66 mk/rabbitmq-dist.mk: mix compile is required before using archive.build.all*
Otherwise, mix compiles the project, which pollutes stdout.

References #rabbitmq/rabbitmq-auth-backend-uaa#3.
References #rabbitmq/rabbitmq-auth-backend-uaa#5.
[#136341089]
2017-01-31 17:08:56 +01:00
Daniil Fedotov 63ff5edb21 Bump mix_task_archive_deps version 2017-01-31 16:05:26 +00:00
Michael Klishin a0a19a4497 merge branch 'stable' 2017-01-31 18:21:27 +03:00
Michael Klishin 1b2ad3b9ed Bump Ranch to 1.3.1 2017-01-31 17:43:29 +03:00
Daniil Fedotov faec55b37c mk/rabbitmq-dist.mk: Build .ez archives for Elixir dependencies
We rely on the `mix_task_archive_deps` Mix task to create the project
.ez archive, as well as all its dependencies' archive. It also creates
an archive for Elixir runtime itself.

This task is also used to list the created archives, in order to filter
the one we want from the staled archives.

Write 'y' to mix(1) stdin, because it may ask confirmation to install
Hex.

References #rabbitmq/rabbitmq-auth-backend-uaa#3.
References #rabbitmq/rabbitmq-auth-backend-uaa#5.
[#136341089]
2017-01-31 12:05:08 +01:00
Jean-Sébastien Pédron ce547af73b rabbitmq-build.mk: Note the fact that the plugin is loaded twice
... leading to some variables appended twice.
2017-01-16 17:21:38 +01:00
Jean-Sébastien Pédron e623b4521a rabbitmq-build.mk: Convert Elixir code path to MSYS2-style path
... before assigning the result to $(ELIXIR_LIB_DIR).

This removes the mixing of `:` used as a PATH separator and a drive
letter marker at the same time. This was causing future Erlang VMs to
crash with "Bad address".

[#137695585]
2017-01-16 17:16:50 +01:00
Jean-Sébastien Pédron a71cc3fc5f rabbitmq-build.mk: Move comment back above the code it describes 2017-01-16 17:10:15 +01:00
Jean-Sébastien Pédron e18918d345 Merge branch 'stable' 2017-01-03 16:46:10 +01:00
Jean-Sébastien Pédron d624dff2b6 rabbitmq-tools.mk: Add hard-coded compile flags to show-*ERLC_OPTS
Erlang.mk hard-codes "-pa ebin" and "-I include" in compile command
lines. So add them as well to the returned values.

[#136364285]
2017-01-03 16:44:32 +01:00
Jean-Sébastien Pédron 48dd2c9634 rabbitmq-run.mk: Use "rabbitmq-plugins enable --all"
... instead of parsing the output of "rabbitmq-plugins list".
2016-12-29 17:36:05 +01:00
Jean-Sébastien Pédron ea91e23274 rabbitmq-run.mk: Set RABBITMQ_GENERATED_CONFIG_DIR in "make run-broker"
Otherwise RabbitMQ defaults to a subdirectory of `/var/lib/rabbitmq`,
which is a directory requiring privileges and possibly holding
production data.
2016-12-29 17:33:55 +01:00
Jean-Sébastien Pédron 531dc62221 rabbitmq-build.mk: Add CLI ebin dir. to compiler code path
Plugin CLI extensions may access behaviour modules defined in this
directory.
2016-12-29 17:33:19 +01:00
Michael Klishin 0efe2c6c6c Merge branch 'master' into rabbitmq-server-1058 2016-12-27 11:52:48 +03:00
Michael Klishin d1ed9ce18b Merge branch 'master' into rabbitmq-server-567 2016-12-23 23:18:50 +03:00
Jean-Sébastien Pédron 9037b78a3c Revert "rabbitmq-run.mk: Remove $RABBITMQ_PLUGINS_EXPAND_DIR"
This reverts commit ef00860597.

[#118562759]
2016-12-23 18:22:28 +01:00
Daniil Fedotov 945c8a203e Support tests with the new CLI 2016-12-23 12:13:38 +00:00
Jean-Sébastien Pédron 47fa7b8c80 Merge branch 'stable' 2016-12-21 19:05:40 +01:00
Jean-Sébastien Pédron 81d5283767 rabbitmq-build.mk: Use the correct URL to fetch `hexpm`
[#134268483]
2016-12-21 19:04:19 +01:00
Jean-Sébastien Pédron 654b18cb34 Merge branch 'stable' 2016-12-21 16:33:02 +01:00
Jean-Sébastien Pédron 9fa72789bd rabbitmq-tools.mk: Add new target for Vim's Syntastic plugin
Those targets are used by both Erlang checkers to query compiler
options. Those options are required to properly report errors and
warnings.

This is a temporary commit to this project: once the patches to the
Syntastic Erlang checkers have stabilized, the change should be
submitted to Erlang.mk instead, and removed from this project.

[#136364285]
2016-12-21 16:32:34 +01:00
Daniil Fedotov 075531a54a Merge branch 'master' into rabbitmq-server-567 2016-12-20 18:16:26 +00:00
Jean-Sébastien Pédron ef00860597 rabbitmq-run.mk: Remove $RABBITMQ_PLUGINS_EXPAND_DIR
It is now ignored by the broker because plugins are not expanded
anymore.

Signed-off-by: Gerhard Lazu <gerhard@rabbitmq.com>

[#118562759]
2016-12-19 18:59:28 +01:00
Jean-Sébastien Pédron 63e312ccac Merge branch 'stable' 2016-12-19 10:48:32 +01:00
Jean-Sébastien Pédron c83c6a2967 Support publish to Hex.pm
To do it, run:
    make hex-publish PROJECT_VERSION=3.6.6

You can also publish documentation to hexdocs.pm. The documentation is
generated first with the `docs` Erlang.mk target and the content of the
`doc` subdirectory is published. To do it, run:
    make hex-publish-docs PROJECT_VERSION=3.6.6

Generated files are published to Hex.pm so that users of this package
don't have to depend on rabbitmq-codegen and Python.

`git-revisions.txt` is generated in the process to carry the version of
the project. Not really standard, but it's the way other RabbitMQ
projects do it for now, so take advantage of the existing
infrastructure. Once a package is published to Hex.pm, it's good to
`make clean` so this file is removed.

Other RabbitMQ components can also be published to Hex.pm with a few
modifications. For them, rabbit_common/mk/rabbitmq-components.hexpm.mk
is sent in place of their copy of rabbitmq-components.mk. This modified
file pulls dependencies from Hex.pm using version $(PROJECT_VERSION),
instead of using Git.

All projects published to Hex.pm can use $(RABBITMQ_HEXPM_DEFAULT_FILES)
as the list of files to put in the `files` key in the .app file.

[#134268483]
2016-12-16 14:50:29 +01:00
Jean-Sébastien Pédron 15787a11e9 Merge branch 'stable' 2016-12-13 13:22:04 +01:00
Jean-Sébastien Pédron 56e07472f9 rabbitmq-build.mk: SEt RABBITMQ_CT_SKIP_AS_ERROR on CI
[#133917673]
2016-12-13 13:09:58 +01:00
Jean-Sébastien Pédron 87bc27bfb5 rabbitmq-build.mk: Remove obsolete comment about Concourse user 2016-12-13 12:52:33 +01:00
Jean-Sébastien Pédron d39cc3f359 Merge branch 'stable' 2016-12-09 19:17:14 +01:00
Jean-Sébastien Pédron 9b209d1455 rabbitmq-components.mk: Use a simply expanded var for `PROJECT_VERSION`
In rabbitmq-server-release, this will allow to use a recursively
expanded variable for `RABBITMQ_VERSION`.
2016-12-08 19:00:19 +01:00
Jean-Sébastien Pédron 97198534a3 Merge branch 'stable' 2016-12-07 14:56:58 +01:00
Jean-Sébastien Pédron c7bbba8cd8 rabbitmq-components.mk: Remove `v` prefix from computed version
[#130992027]
2016-12-06 15:49:09 +01:00
Jean-Sébastien Pédron 2e496eaa72 rabbitmq-components.mk: Use RABBITMQ_VERSION there too
[#130992027]
2016-12-06 13:39:50 +01:00
Jean-Sébastien Pédron 3243506499 rabbitmq-components.mk: Compute default PROJECT_VERSION
If `git-revisions.txt` exists, take the version from this file.
Otherwise, use git-describe(1) to compute a version from the working
copy. If it's not a Git clone, fall back to `0.0.0`.

[#130992027]
2016-12-06 13:34:29 +01:00
Daniil Fedotov 295651ba5b Lage sink for upgrade logs 2016-12-02 17:47:59 +00:00
Michael Klishin 277df764c0 Merge branch 'stable' 2016-11-29 20:56:36 +03:00
Loïc Hoguin 2f75757585 Update Ranch to 1.3.0
Adds proper support for SNI, plus various fixes. See CHANGELOG:
https://git.ninenines.eu/ranch.git/plain/CHANGELOG.asciidoc
2016-11-29 11:30:23 +01:00
Loïc Hoguin 717f990449 Update Cowboy to 1.0.4
Small maintenance release fixing an issue with Websocket.
2016-11-29 11:29:49 +01:00
Jean-Sébastien Pédron e67080c6a2 Merge branch 'stable' 2016-11-25 10:49:13 +01:00
Jean-Sébastien Pédron bda4c27f89 rabbitmq-components.mk: Use Basho's mochiweb fork 2016-11-25 10:46:41 +01:00
Jean-Sébastien Pédron c2abbf13d4 Merge branch 'stable' 2016-11-25 10:10:06 +01:00
Jean-Sébastien Pédron 2c5484e069 rabbitmq-components.mk: Pin version of several 3rd-party deps
The pinned dependencies are:
    o  cowboy
    o  mochiweb
    o  ranch
    o  webmachine

In particular, pinning webmachine fixes the testsuites of
rabbitmq-shovel-management and rabbitmq-tracing.
2016-11-25 10:07:46 +01:00
Jean-Sébastien Pédron 94eb1e2f9d Merge branch 'stable' 2016-11-23 18:13:40 +01:00
Jean-Sébastien Pédron 0a44089c99 rabbitmq-components.mk: Add rabbitmq-ct-client-helpers to components
[#134347953]
2016-11-23 18:12:57 +01:00
Jean-Sébastien Pédron f6db3e3dd4 rabbitmq-components.mk: Add rabbitmq-cli to components
[#131353583]

(cherry picked from commit 9221587e0c253fe178fba36519d8d90aa3e1ec52)
2016-11-22 10:23:04 +01:00
Jean-Sébastien Pédron d94a298b8c rabbitmq-components.mk: Add rabbitmq-cli to components
[#131353583]
2016-11-04 15:34:42 +01:00
Jean-Sébastien Pédron 135de0de33 Merge branch 'stable' 2016-10-31 12:28:51 +01:00
Alexey Lebedeff 023fc42777 Create .ez for multi-app plugins
Without this change applications in `apps/` were compiled, but not
bundled into `.ez` files.
2016-10-28 16:45:33 +03:00
Jean-Sébastien Pédron 89b8c4e45a Merge branch 'stable' 2016-09-27 15:59:19 +02:00
Jean-Sébastien Pédron 79deda5489 rabbitmq-tools.mk: Add `make show-branch` to list deps' branch 2016-09-27 14:46:16 +02:00
Arnaud Cogoluègnes 4c555f53da Merge branch 'stable' 2016-09-27 14:38:16 +02:00
Arnaud Cogoluègnes 87703516da Use Common Test Helpers directory for certificates 2016-09-27 14:34:58 +02:00
Jean-Sébastien Pédron 8bd5f18297 Merge branch 'stable' 2016-09-23 14:22:40 +02:00
Jean-Sébastien Pédron 81cda3e285 rabbitmq-components.mk: Add rabbitmq-server-release to the components
[#130659985]
2016-09-23 14:21:26 +02:00
Jean-Sébastien Pédron 86b5cd1cff rabbitmq-run.mk: Query the location of `erl_call`
This has two advantages:
    o  We don't have to rely on a package ability to put `erl_call` in
       the $PATH.
    o  We are sure that `erl_call` comes from the same Erlang as `erl`.

[#130099459]
2016-09-19 12:38:30 +02:00
Jean-Sébastien Pédron 45257a33cc rabbitmq-run.mk: Remove comment about plugins having to add `rabbit` to DEPS
[#130086871]
2016-09-19 12:30:14 +02:00
Jean-Sébastien Pédron 7f5d884c0f rabbitmq-components.mk: Do not fill DEPS automatically
Projects will have to explixcitely list their dependencies from now on.
This will help fix dependencies cycle.

[#130086871]
2016-09-19 11:35:21 +02:00
Jean-Sébastien Pédron bae4c1cf6d Merge branch 'stable' 2016-09-15 16:25:23 +02:00
Jean-Sébastien Pédron 08d0d34141 rabbitmq-components.mk: Add rabbitmq-ct-helpers to the components
[#130086871]
2016-09-15 15:27:45 +02:00
Jean-Sébastien Pédron 99c3294f6a rabbitmq-components.mk: Remove the unused distclean-components target 2016-09-15 15:27:10 +02:00
Jean-Sébastien Pédron 309db38777 rabbitmq-components.mk: Disable automatic check-rabbitmq-components.mk
The rule is still there and we can enable it in CI, but it's not
executed out-of-the-box anymore. It was more painful than anything else:
the file doesn't change often and doing the check in CI will be more
than enough.
2016-09-15 15:24:56 +02:00
Jean-Sébastien Pédron 7682125a8e Merge branch 'stable' 2016-09-08 14:28:02 +02:00
Jean-Sébastien Pédron a78b0bd37a rabbitmq-build.mk: Add reference to ninenines/erlang.mk#502 2016-09-08 14:26:46 +02:00
Jean-Sébastien Pédron 50b7b17475 Merge branch 'stable' 2016-09-02 15:45:29 +02:00
Jean-Sébastien Pédron 1ac1b90d2c rabbitmq-components.mk: Update the list of targets used to start a broker 2016-09-02 13:19:09 +02:00
Jean-Sébastien Pédron 875838bc8c rabbitmq-components.mk: Disconnect rabbitmq-test from the Umbrella
[#127356157]
2016-09-02 13:18:41 +02:00
Jean-Sébastien Pédron a0de3a7a3b Remove all bits of the old test framework
Now that everything was moved to common_test, we don't need the old
framework anymore.

The only target still in use was `cluster-other-node`. As it was only
used by rabbitmq-java-client, the target was moved there.

The `test` target, which was an alias to `tests` (the regular Erlang.mk
target), was removed at the same time.

[#127356157]
2016-09-02 13:15:43 +02:00