Skip to content

Commit

Permalink
KAZOO-4362: replace old rabbitmq_client way of things with rabbitmq_e…
Browse files Browse the repository at this point in the history
…rlang_client-3.6.0rc3
  • Loading branch information
fenollp committed Jan 26, 2016
1 parent 94415b6 commit 4872179
Show file tree
Hide file tree
Showing 1,174 changed files with 16,277 additions and 167,024 deletions.
25 changes: 0 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,6 @@ deps/zucchini-1.0.0/src/zucchini_parser.erl
deps/slex-*/src/slex_parser.erl
deps/slex-*/src/slex_scanner.erl
deps/erlang_localtime-*/include/tz_index.hrl
deps/rabbitmq_server-*/codegen/amqp_codegen.pyc
deps/rabbitmq_server-*/deps.mk
deps/rabbitmq_server-*/dist/
deps/rabbitmq_server-*/include/rabbit_framing.hrl
deps/rabbitmq_server-*/plugins-src/*/build/
deps/rabbitmq_server-*/plugins-src/*/dist/
deps/rabbitmq_server-*/plugins-src/sockjs-erlang-wrapper/hash.mk
deps/rabbitmq_server-*/plugins-src/eldap-wrapper/eldap-git/generated/
deps/rabbitmq_server-*/plugins-src/rabbitmq-erlang-client/deps.mk
deps/rabbitmq_server-*/plugins-src/rabbitmq-erlang-client/deps/
deps/rabbitmq_server-*/plugins-src/rabbitmq-server
deps/rabbitmq_server-*/plugins-src/rabbitmq-amqp1.0/include/rabbit_amqp1_0_framing.hrl
deps/rabbitmq_server-*/plugins-src/rabbitmq-amqp1.0/src/rabbit_amqp1_0_framing0.erl
deps/rabbitmq_server-*/plugins-src/webmachine-wrapper/hash.mk
deps/rabbitmq_server-*/plugins-src/mochiweb-wrapper/hash.mk
deps/rabbitmq_server-*/plugins/
deps/rabbitmq_server-*/src/rabbit_ctl_usage.erl
deps/rabbitmq_server-*/src/rabbit_framing_amqp_0_8.erl
deps/rabbitmq_server-*/src/rabbit_framing_amqp_0_9_1.erl
deps/rabbitmq_server-*/src/rabbit_plugins_usage.erl
deps/rabbitmq_client-*
deps/rabbit_common-*
!deps/rabbitmq_server-*/plugins-src/eldap-wrapper/eldap-git/ebin/eldap.app
!deps/rabbitmq_server-*/plugins-src/erlang-rfc4627-wrapper/erlang-rfc4627-git/ebin/rfc4627_jsonrpc.app
!deps/rabbitmq_server-*/plugins-src/webmachine-wrapper/webmachine-git/ebin/webmachine.app
/.edts
.project
.settings
Expand Down
2 changes: 1 addition & 1 deletion applications/blackhole/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ROOT = ../..
PROJECT = blackhole

EBINS = $(shell find $(ROOT)/core/whistle_apps-* -maxdepth 2 -name ebin) \
$(shell find $(ROOT)/deps/rabbitmq_client-* -maxdepth 2 -name ebin)
$(shell find $(ROOT)/deps/rabbitmq_erlang_client-* -name ebin)

all: compile

Expand Down
2 changes: 1 addition & 1 deletion applications/camper/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ROOT = ../..
PROJECT = camper

EBINS = $(shell find $(ROOT)/core/whistle_apps-* -maxdepth 2 -name ebin) \
$(shell find $(ROOT)/deps/rabbitmq_client-* -maxdepth 2 -name ebin)
$(shell find $(ROOT)/deps/rabbitmq_erlang_client-* -name ebin)

all: compile

Expand Down
2 changes: 1 addition & 1 deletion applications/camper/src/camper_request_listener.erl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
]).

-include("camper.hrl").
-include_lib("rabbitmq_client/include/amqp_client.hrl").
-include_lib("rabbitmq_erlang_client/include/amqp_client.hrl").

-behaviour(gen_listener).

Expand Down
2 changes: 1 addition & 1 deletion applications/cccp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PROJECT = cccp

EBINS = $(shell find $(ROOT)/core/whistle_apps-* -maxdepth 2 -name ebin) \
$(shell find $(ROOT)/core/whistle_number_manager-* -maxdepth 2 -name ebin) \
$(shell find $(ROOT)/deps/rabbitmq_client-* -maxdepth 2 -name ebin)
$(shell find $(ROOT)/deps/rabbitmq_erlang_client-* -name ebin)

all: compile

Expand Down
2 changes: 1 addition & 1 deletion applications/conference/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ROOT = ../..
PROJECT = conference

EBINS = $(shell find $(ROOT)/deps/rabbitmq_client-* -maxdepth 2 -name ebin)
EBINS = $(shell find $(ROOT)/deps/rabbitmq_erlang_client-* -name ebin)

all: compile

Expand Down
2 changes: 1 addition & 1 deletion applications/crossbar/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ EBINS = $(shell find $(ROOT)/core/whistle_number_manager-* -maxdepth 2 -name ebi
$(shell find $(ROOT)/core/kazoo_bindings-* -maxdepth 2 -name ebin) \
$(shell find $(ROOT)/deps/cowboy-* -maxdepth 2 -name ebin) \
$(shell find $(ROOT)/deps/ejson-* -maxdepth 2 -name ebin) \
$(shell find $(ROOT)/deps/rabbitmq_client-* -maxdepth 2 -name ebin)
$(shell find $(ROOT)/deps/rabbitmq_erlang_client-* -name ebin)

all: compile

Expand Down
2 changes: 1 addition & 1 deletion applications/frontier/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ROOT = ../..
PROJECT = frontier

EBINS = $(shell find $(ROOT)/core/whistle_apps-* -maxdepth 2 -name ebin) \
$(shell find $(ROOT)/deps/rabbitmq_client-* -maxdepth 2 -name ebin)
$(shell find $(ROOT)/deps/rabbitmq_erlang_client-* -name ebin)

all: compile

Expand Down
2 changes: 1 addition & 1 deletion applications/notify/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ROOT = ../..
PROJECT = notify

EBINS = $(shell find $(ROOT)/deps/rabbitmq_client-* -maxdepth 2 -name ebin)
EBINS = $(shell find $(ROOT)/deps/rabbitmq_erlang_client-* -name ebin)

all: compile

Expand Down
2 changes: 1 addition & 1 deletion applications/trunkstore/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ROOT = ../..
PROJECT = trunkstore

EBINS = $(shell find $(ROOT)/core/whistle_number_manager-* -maxdepth 2 -name ebin) \
$(shell find $(ROOT)/deps/rabbitmq_client-* -maxdepth 2 -name ebin)
$(shell find $(ROOT)/deps/rabbitmq_erlang_client-* -name ebin)

all: compile

Expand Down
2 changes: 1 addition & 1 deletion applications/trunkstore/src/ts.hrl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-ifndef(TS_HRL).
-include_lib("rabbitmq_client/include/amqp_client.hrl").
-include_lib("rabbitmq_erlang_client/include/amqp_client.hrl").
-include_lib("whistle/include/wh_types.hrl").
-include_lib("whistle/include/wh_amqp.hrl").
-include_lib("whistle/include/wh_log.hrl").
Expand Down
2 changes: 1 addition & 1 deletion core/whistle-1.0.0/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ROOT = ../..
PROJECT = whistle

EBINS = $(shell find $(ROOT)/deps/rabbitmq_client-* -maxdepth 2 -name ebin)
EBINS = $(shell find $(ROOT)/deps/rabbitmq_erlang_client-* -name ebin)

TEST_EBINS = $(shell find $(ROOT)/deps/mochiweb-* -maxdepth 2 -name ebin) \
$(shell find $(ROOT)/core/kazoo_web* -maxdepth 2 -name ebin) \
Expand Down
2 changes: 1 addition & 1 deletion core/whistle-1.0.0/include/wh_amqp.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
%%%-------------------------------------------------------------------
-ifndef(WH_AMQP_HRL).

-include_lib("rabbitmq_client/include/amqp_client.hrl").
-include_lib("rabbitmq_erlang_client/include/amqp_client.hrl").

-define(KEY_ORGN_RESOURCE_REQ, <<"orginate.resource.req">>). %% corresponds to originate_resource_req/1 api call
-define(RESOURCE_QUEUE_NAME, <<"resource.provider">>).
Expand Down
2 changes: 1 addition & 1 deletion core/whistle_amqp-1.0.0/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ROOT = ../..
PROJECT = whistle_amqp

EBINS = $(shell find $(ROOT)/deps/rabbitmq_client-* -maxdepth 2 -name ebin)
EBINS = $(shell find $(ROOT)/deps/rabbitmq_erlang_client-* -name ebin)

all: compile

Expand Down
18 changes: 1 addition & 17 deletions deps/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
ROOT = ..

MAKEDIRS = rabbitmq_server-*/Makefile \
lager-*/Makefile \
MAKEDIRS = lager-*/Makefile \
ibrowse-*/Makefile \
cowlib-*/Makefile \
wsock-*/Makefile \
Expand All @@ -14,24 +13,9 @@ all: compile

compile: ACTION = all
compile: $(MAKEDIRS)
cp -a rabbitmq_server-3.5.5/plugins-src/rabbitmq-erlang-client rabbitmq_client-3.5.5
cp -a rabbitmq_client-3.5.5/deps/rabbit_common-3.5.5 rabbit_common-3.5.5
rm -f rabbitmq_client-*/Makefile

clean: ACTION = clean
clean: $(MAKEDIRS)
rm -rf rabbitmq_client-*
rm -rf rabbit_common-*
rm -rf rabbitmq_server-3.2.0
rm -rf goldrush-0.1.0
rm -rf cowboy-0.9.0
rm -rf cowlib-0.4.0
rm -rf ranch-0.9.0
rm -rf erlang-localtime-1.0.0
rm -rf gen_smtp-0.0.1
rm -rf erlydtl-0.9.0
rm -rf jesse-1.0.1
rm -rf nksip-0.4

$(MAKEDIRS):
$(MAKE) -C $(@D) $(ACTION)
3 changes: 3 additions & 0 deletions deps/rabbitmq_erlang_client-3.6.0rc3/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.erlang.mk/

amqp_client.d
24 changes: 24 additions & 0 deletions deps/rabbitmq_erlang_client-3.6.0rc3/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
sudo: false
language: erlang
notifications:
email:
- [email protected]
addons:
apt:
packages:
- xsltproc
otp_release:
- "R16B03-1"
- "17.5"
- "18.0"

# The checkout made by Travis is a "detached HEAD". We switch back
# to a tag or a branch. This pleases our git_rmq fetch method in
# rabbitmq-components.mk and the proper tag/branch is selected in
# dependencies too.
before_script: (test "$TRAVIS_TAG" && git checkout "$TRAVIS_TAG") || (test "$TRAVIS_BRANCH" && git checkout "$TRAVIS_BRANCH")

script: make tests

cache:
apt: true
164 changes: 164 additions & 0 deletions deps/rabbitmq_erlang_client-3.6.0rc3/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
PROJECT = amqp_client
VERSION ?= $(call get_app_version,src/$(PROJECT).app.src)
ifeq ($(VERSION),)
VERSION = 0.0.0
endif

# Release artifacts are put in $(PACKAGES_DIR).
PACKAGES_DIR ?= $(abspath PACKAGES)

TEST_DEPS = rabbit

DEP_PLUGINS = rabbit_common/mk/rabbitmq-plugin.mk

# FIXME: Use erlang.mk patched for RabbitMQ, while waiting for PRs to be
# reviewed and merged.

ERLANG_MK_REPO = https://github.com/rabbitmq/erlang.mk.git
ERLANG_MK_COMMIT = rabbitmq-tmp

include rabbitmq-components.mk
include erlang.mk

# --------------------------------------------------------------------
# Tests.
# --------------------------------------------------------------------

include test.mk

tests:: all_tests

# --------------------------------------------------------------------
# Distribution.
# --------------------------------------------------------------------

.PHONY: distribution

distribution: docs source-dist package

edoc: doc/overview.edoc

doc/overview.edoc: src/overview.edoc.in
mkdir -p doc
sed -e 's:%%VERSION%%:$(VERSION):g' < $< > $@

.PHONY: source-dist clean-source-dist

SOURCE_DIST_BASE ?= $(PROJECT)
SOURCE_DIST_SUFFIXES ?= tar.xz zip
SOURCE_DIST ?= $(PACKAGES_DIR)/$(SOURCE_DIST_BASE)-$(VERSION)-src

# The first source distribution file is used by packages: if the archive
# type changes, you must update all packages' Makefile.
SOURCE_DIST_FILES = $(addprefix $(SOURCE_DIST).,$(SOURCE_DIST_SUFFIXES))

.PHONY: $(SOURCE_DIST_FILES)

source-dist: $(SOURCE_DIST_FILES)
@:

RSYNC ?= rsync
RSYNC_V_0 =
RSYNC_V_1 = -v
RSYNC_V_2 = -v
RSYNC_V = $(RSYNC_V_$(V))
RSYNC_FLAGS += -a $(RSYNC_V) \
--exclude '.sw?' --exclude '.*.sw?' \
--exclude '*.beam' \
--exclude '*.pyc' \
--exclude '.git*' \
--exclude '.hg*' \
--exclude '.travis.yml' \
--exclude '$(notdir $(ERLANG_MK_TMP))' \
--exclude 'ebin' \
--exclude 'erl_crash.dump' \
--exclude 'deps/' \
--exclude '$(notdir $(DEPS_DIR))/' \
--exclude 'doc/' \
--exclude 'plugins/' \
--exclude '$(notdir $(DIST_DIR))/' \
--exclude '/$(notdir $(PACKAGES_DIR))/' \
--delete \
--delete-excluded

TAR ?= tar
TAR_V_0 =
TAR_V_1 = -v
TAR_V_2 = -v
TAR_V = $(TAR_V_$(V))

GZIP ?= gzip
BZIP2 ?= bzip2
XZ ?= xz

ZIP ?= zip
ZIP_V_0 = -q
ZIP_V_1 =
ZIP_V_2 =
ZIP_V = $(ZIP_V_$(V))

.PHONY: $(SOURCE_DIST)

$(SOURCE_DIST): $(ERLANG_MK_RECURSIVE_DEPS_LIST)
$(verbose) mkdir -p $(dir $@)
$(gen_verbose) $(RSYNC) $(RSYNC_FLAGS) ./ $@/
$(verbose) sed -E -i.bak \
-e 's/[{]vsn[[:blank:]]*,[^}]+}/{vsn, "$(VERSION)"}/' \
$@/src/$(PROJECT).app.src && \
rm $@/src/$(PROJECT).app.src.bak
$(verbose) for dep in $$(cat $(ERLANG_MK_RECURSIVE_DEPS_LIST) | grep -v '/$(PROJECT)$$' | LC_COLLATE=C sort); do \
$(RSYNC) $(RSYNC_FLAGS) \
$$dep \
$@/deps; \
if test -f $@/deps/$$(basename $$dep)/erlang.mk; then \
sed -E -i.bak -e 's,^include[[:blank:]]+$(abspath erlang.mk),include ../../erlang.mk,' \
$@/deps/$$(basename $$dep)/erlang.mk; \
rm $@/deps/$$(basename $$dep)/erlang.mk.bak; \
fi; \
done
$(verbose) for file in $$(find $@ -name '*.app.src'); do \
sed -E -i.bak -e 's/[{]vsn[[:blank:]]*,[[:blank:]]*""[[:blank:]]*}/{vsn, "$(VERSION)"}/' $$file; \
rm $$file.bak; \
done
$(verbose) echo "$(PROJECT) $$(git rev-parse HEAD) $$(git describe --tags --exact-match 2>/dev/null || git symbolic-ref -q --short HEAD)" > $@/git-revisions.txt
$(verbose) for dep in $$(cat $(ERLANG_MK_RECURSIVE_DEPS_LIST)); do \
(cd $$dep; echo "$$(basename "$$dep") $$(git rev-parse HEAD) $$(git describe --tags --exact-match 2>/dev/null || git symbolic-ref -q --short HEAD)") >> $@/git-revisions.txt; \
done
$(verbose) rm $@/README.in
$(verbose) cp README.in $@/README
$(verbose) cat "$(BUILD_DOC)" >> $@/README

# TODO: Fix file timestamps to have reproducible source archives.
# $(verbose) find $@ -not -name 'git-revisions.txt' -print0 | xargs -0 touch -r $@/git-revisions.txt

$(SOURCE_DIST).tar.gz: $(SOURCE_DIST)
$(gen_verbose) cd $(dir $(SOURCE_DIST)) && \
find $(notdir $(SOURCE_DIST)) -print0 | LC_COLLATE=C sort -z | \
xargs -0 $(TAR) $(TAR_V) --no-recursion -cf - | \
$(GZIP) --best > $@

$(SOURCE_DIST).tar.bz2: $(SOURCE_DIST)
$(gen_verbose) cd $(dir $(SOURCE_DIST)) && \
find $(notdir $(SOURCE_DIST)) -print0 | LC_COLLATE=C sort -z | \
xargs -0 $(TAR) $(TAR_V) --no-recursion -cf - | \
$(BZIP2) > $@

$(SOURCE_DIST).tar.xz: $(SOURCE_DIST)
$(gen_verbose) cd $(dir $(SOURCE_DIST)) && \
find $(notdir $(SOURCE_DIST)) -print0 | LC_COLLATE=C sort -z | \
xargs -0 $(TAR) $(TAR_V) --no-recursion -cf - | \
$(XZ) > $@

$(SOURCE_DIST).zip: $(SOURCE_DIST)
$(verbose) rm -f $@
$(gen_verbose) cd $(dir $(SOURCE_DIST)) && \
find $(notdir $(SOURCE_DIST)) -print0 | LC_COLLATE=C sort -z | \
xargs -0 $(ZIP) $(ZIP_V) $@

clean:: clean-source-dist

clean-source-dist:
$(gen_verbose) rm -rf -- $(SOURCE_DIST_BASE)-*

package: dist
cp $(DIST_DIR)/*.ez $(PACKAGES_DIR)
Loading

0 comments on commit 4872179

Please sign in to comment.