Initial commit of RabbitMQ release handling bits
Everything comes from the rabbitmq-server repository. The goals of this move are: 1. separate unrelated files: the broker sources and release handling comprising plugins; 2. resolve an important dependency cycle: plugins depend on the broker to run, but the broker depends on plugins to build a release. [#130659985]
This commit is contained in:
commit
db7f0a0f38
|
@ -0,0 +1,17 @@
|
||||||
|
*~
|
||||||
|
.sw?
|
||||||
|
.*.sw?
|
||||||
|
/.erlang.mk/
|
||||||
|
/deps/
|
||||||
|
/plugins/
|
||||||
|
|
||||||
|
PACKAGES/
|
||||||
|
|
||||||
|
rabbitmq_release.d
|
||||||
|
|
||||||
|
# Source distribution.
|
||||||
|
rabbitmq-server-*/
|
||||||
|
rabbitmq-server-*.tar.gz
|
||||||
|
rabbitmq-server-*.tar.bz2
|
||||||
|
rabbitmq-server-*.tar.xz
|
||||||
|
rabbitmq-server-*.zip
|
|
@ -0,0 +1,44 @@
|
||||||
|
# Contributor Code of Conduct
|
||||||
|
|
||||||
|
As contributors and maintainers of this project, and in the interest of fostering an open
|
||||||
|
and welcoming community, we pledge to respect all people who contribute through reporting
|
||||||
|
issues, posting feature requests, updating documentation, submitting pull requests or
|
||||||
|
patches, and other activities.
|
||||||
|
|
||||||
|
We are committed to making participation in this project a harassment-free experience for
|
||||||
|
everyone, regardless of level of experience, gender, gender identity and expression,
|
||||||
|
sexual orientation, disability, personal appearance, body size, race, ethnicity, age,
|
||||||
|
religion, or nationality.
|
||||||
|
|
||||||
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
|
* The use of sexualized language or imagery
|
||||||
|
* Personal attacks
|
||||||
|
* Trolling or insulting/derogatory comments
|
||||||
|
* Public or private harassment
|
||||||
|
* Publishing other's private information, such as physical or electronic addresses,
|
||||||
|
without explicit permission
|
||||||
|
* Other unethical or unprofessional conduct
|
||||||
|
|
||||||
|
Project maintainers have the right and responsibility to remove, edit, or reject comments,
|
||||||
|
commits, code, wiki edits, issues, and other contributions that are not aligned to this
|
||||||
|
Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors
|
||||||
|
that they deem inappropriate, threatening, offensive, or harmful.
|
||||||
|
|
||||||
|
By adopting this Code of Conduct, project maintainers commit themselves to fairly and
|
||||||
|
consistently applying these principles to every aspect of managing this project. Project
|
||||||
|
maintainers who do not follow or enforce the Code of Conduct may be permanently removed
|
||||||
|
from the project team.
|
||||||
|
|
||||||
|
This Code of Conduct applies both within project spaces and in public spaces when an
|
||||||
|
individual is representing the project or its community.
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
|
||||||
|
contacting a project maintainer at [info@rabbitmq.com](mailto:info@rabbitmq.com). All complaints will
|
||||||
|
be reviewed and investigated and will result in a response that is deemed necessary and
|
||||||
|
appropriate to the circumstances. Maintainers are obligated to maintain confidentiality
|
||||||
|
with regard to the reporter of an incident.
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the
|
||||||
|
[Contributor Covenant](http://contributor-covenant.org), version 1.3.0, available at
|
||||||
|
[contributor-covenant.org/version/1/3/0/](http://contributor-covenant.org/version/1/3/0/)
|
|
@ -0,0 +1,38 @@
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
RabbitMQ projects use pull requests to discuss, collaborate on and accept code contributions.
|
||||||
|
Pull requests is the primary place of discussing code changes.
|
||||||
|
|
||||||
|
## How to Contribute
|
||||||
|
|
||||||
|
The process is fairly standard:
|
||||||
|
|
||||||
|
* Fork the repository or repositories you plan on contributing to
|
||||||
|
* Clone [RabbitMQ umbrella repository](https://github.com/rabbitmq/rabbitmq-public-umbrella)
|
||||||
|
* `cd umbrella`, `make co`
|
||||||
|
* Create a branch with a descriptive name in the relevant repositories
|
||||||
|
* Make your changes, run tests, commit with a [descriptive message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), push to your fork
|
||||||
|
* Submit pull requests with an explanation what has been changed and **why**
|
||||||
|
* Submit a filled out and signed [Contributor Agreement](https://github.com/rabbitmq/ca#how-to-submit) if needed (see below)
|
||||||
|
* Be patient. We will get to your pull request eventually
|
||||||
|
|
||||||
|
If what you are going to work on is a substantial change, please first ask the core team
|
||||||
|
of their opinion on [RabbitMQ mailing list](https://groups.google.com/forum/#!forum/rabbitmq-users).
|
||||||
|
|
||||||
|
|
||||||
|
## Code of Conduct
|
||||||
|
|
||||||
|
See [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md).
|
||||||
|
|
||||||
|
|
||||||
|
## Contributor Agreement
|
||||||
|
|
||||||
|
If you want to contribute a non-trivial change, please submit a signed copy of our
|
||||||
|
[Contributor Agreement](https://github.com/rabbitmq/ca#how-to-submit) around the time
|
||||||
|
you submit your pull request. This will make it much easier (in some cases, possible)
|
||||||
|
for the RabbitMQ team at Pivotal to merge your contribution.
|
||||||
|
|
||||||
|
|
||||||
|
## Where to Ask Questions
|
||||||
|
|
||||||
|
If something isn't clear, feel free to ask on our [mailing list](https://groups.google.com/forum/#!forum/rabbitmq-users).
|
|
@ -0,0 +1,212 @@
|
||||||
|
PROJECT = rabbitmq_release
|
||||||
|
VERSION ?= 0.0.0
|
||||||
|
|
||||||
|
# Release artifacts are put in $(PACKAGES_DIR).
|
||||||
|
PACKAGES_DIR ?= $(abspath PACKAGES)
|
||||||
|
|
||||||
|
DEPS = rabbit_common rabbit $(PLUGINS)
|
||||||
|
|
||||||
|
# List of plugins to include in a RabbitMQ release.
|
||||||
|
PLUGINS := rabbitmq_amqp1_0 \
|
||||||
|
rabbitmq_auth_backend_ldap \
|
||||||
|
rabbitmq_auth_mechanism_ssl \
|
||||||
|
rabbitmq_consistent_hash_exchange \
|
||||||
|
rabbitmq_event_exchange \
|
||||||
|
rabbitmq_federation \
|
||||||
|
rabbitmq_federation_management \
|
||||||
|
rabbitmq_jms_topic_exchange \
|
||||||
|
rabbitmq_management \
|
||||||
|
rabbitmq_management_agent \
|
||||||
|
rabbitmq_management_visualiser \
|
||||||
|
rabbitmq_mqtt \
|
||||||
|
rabbitmq_recent_history_exchange \
|
||||||
|
rabbitmq_sharding \
|
||||||
|
rabbitmq_shovel \
|
||||||
|
rabbitmq_shovel_management \
|
||||||
|
rabbitmq_stomp \
|
||||||
|
rabbitmq_top \
|
||||||
|
rabbitmq_tracing \
|
||||||
|
rabbitmq_trust_store \
|
||||||
|
rabbitmq_web_dispatch \
|
||||||
|
rabbitmq_web_stomp \
|
||||||
|
rabbitmq_web_stomp_examples
|
||||||
|
|
||||||
|
DEP_PLUGINS = rabbit_common/mk/rabbitmq-build.mk \
|
||||||
|
rabbit_common/mk/rabbitmq-run.mk \
|
||||||
|
rabbit_common/mk/rabbitmq-dist.mk \
|
||||||
|
rabbit_common/mk/rabbitmq-tools.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
|
||||||
|
|
||||||
|
# --------------------------------------------------------------------
|
||||||
|
# Distribution.
|
||||||
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
|
.PHONY: source-dist clean-source-dist
|
||||||
|
|
||||||
|
SOURCE_DIST_BASE ?= rabbitmq-server
|
||||||
|
SOURCE_DIST_SUFFIXES ?= tar.xz zip
|
||||||
|
SOURCE_DIST ?= $(PACKAGES_DIR)/$(SOURCE_DIST_BASE)-$(VERSION)
|
||||||
|
|
||||||
|
# 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 '.*.plt' \
|
||||||
|
--exclude '$(notdir $(ERLANG_MK_TMP))' \
|
||||||
|
--exclude 'ebin' \
|
||||||
|
--exclude 'packaging' \
|
||||||
|
--exclude 'erl_crash.dump' \
|
||||||
|
--exclude 'MnesiaCore.*' \
|
||||||
|
--exclude 'cover/' \
|
||||||
|
--exclude 'deps/' \
|
||||||
|
--exclude '$(notdir $(DEPS_DIR))/' \
|
||||||
|
--exclude 'plugins/' \
|
||||||
|
--exclude '$(notdir $(DIST_DIR))/' \
|
||||||
|
--exclude '/$(notdir $(PACKAGES_DIR))/' \
|
||||||
|
--exclude '/PACKAGES/' \
|
||||||
|
--exclude '/cowboy/doc/' \
|
||||||
|
--exclude '/cowboy/examples/' \
|
||||||
|
--exclude '/rabbitmq_amqp1_0/test/swiftmq/build/'\
|
||||||
|
--exclude '/rabbitmq_amqp1_0/test/swiftmq/swiftmq*'\
|
||||||
|
--exclude '/rabbitmq_mqtt/test/build/' \
|
||||||
|
--exclude '/rabbitmq_mqtt/test/test_client/'\
|
||||||
|
--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) clean-source-dist distclean-packages
|
||||||
|
|
||||||
|
$(SOURCE_DIST): $(ERLANG_MK_RECURSIVE_DEPS_LIST)
|
||||||
|
$(verbose) mkdir -p $(dir $@)
|
||||||
|
$(gen_verbose) $(RSYNC) $(RSYNC_FLAGS) $(DEPS_DIR)/rabbit/ $@/
|
||||||
|
$(verbose) sed -E -i.bak \
|
||||||
|
-e 's/[{]vsn[[:blank:]]*,[^}]+}/{vsn, "$(VERSION)"}/' \
|
||||||
|
$@/src/rabbit.app.src && \
|
||||||
|
rm $@/src/rabbit.app.src.bak
|
||||||
|
$(verbose) cat packaging/common/LICENSE.head > $@/LICENSE
|
||||||
|
$(verbose) mkdir -p $@/deps/licensing
|
||||||
|
$(verbose) for dep in $$(cat $(ERLANG_MK_RECURSIVE_DEPS_LIST) | grep -v '/rabbit$$' | LC_COLLATE=C sort); do \
|
||||||
|
$(RSYNC) $(RSYNC_FLAGS) \
|
||||||
|
$$dep \
|
||||||
|
$@/deps; \
|
||||||
|
if test -f $@/deps/$$(basename $$dep)/erlang.mk && \
|
||||||
|
test "$$(wc -l $@/deps/$$(basename $$dep)/erlang.mk | awk '{print $$1;}')" = "1" && \
|
||||||
|
grep -qs -E "^[[:blank:]]*include[[:blank:]]+(erlang\.mk|.*/erlang\.mk)$$" $@/deps/$$(basename $$dep)/erlang.mk; then \
|
||||||
|
echo "include ../../erlang.mk" > $@/deps/$$(basename $$dep)/erlang.mk; \
|
||||||
|
fi; \
|
||||||
|
sed -E -i.bak "s|^[[:blank:]]*include[[:blank:]]+\.\./.*erlang.mk$$|include ../../erlang.mk|" \
|
||||||
|
$@/deps/$$(basename $$dep)/Makefile && \
|
||||||
|
rm $@/deps/$$(basename $$dep)/Makefile.bak; \
|
||||||
|
if test -f "$$dep/license_info"; then \
|
||||||
|
cp "$$dep/license_info" "$@/deps/licensing/license_info_$$(basename "$$dep")"; \
|
||||||
|
cat "$$dep/license_info" >> $@/LICENSE; \
|
||||||
|
fi; \
|
||||||
|
find "$$dep" -maxdepth 1 -name 'LICENSE-*' -exec cp '{}' $@/deps/licensing \; ; \
|
||||||
|
done
|
||||||
|
$(verbose) cat packaging/common/LICENSE.tail >> $@/LICENSE
|
||||||
|
$(verbose) find $@/deps/licensing -name 'LICENSE-*' -exec cp '{}' $@ \;
|
||||||
|
$(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) (cd $(DEPS_DIR)/rabbit; echo "rabbit $$(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
|
||||||
|
|
||||||
|
# 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)-*
|
||||||
|
|
||||||
|
distclean:: distclean-packages
|
||||||
|
|
||||||
|
distclean-packages:
|
||||||
|
$(gen_verbose) rm -rf -- $(PACKAGES_DIR)
|
||||||
|
|
||||||
|
# --------------------------------------------------------------------
|
||||||
|
# Packaging.
|
||||||
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
|
.PHONY: packages package-deb \
|
||||||
|
package-rpm package-rpm-fedora package-rpm-suse \
|
||||||
|
package-windows package-standalone-macosx \
|
||||||
|
package-generic-unix
|
||||||
|
|
||||||
|
# This variable is exported so sub-make instances know where to find the
|
||||||
|
# archive.
|
||||||
|
PACKAGES_SOURCE_DIST_FILE ?= $(firstword $(SOURCE_DIST_FILES))
|
||||||
|
|
||||||
|
packages package-deb package-rpm package-rpm-fedora \
|
||||||
|
package-rpm-suse package-windows package-standalone-macosx \
|
||||||
|
package-generic-unix: $(PACKAGES_SOURCE_DIST_FILE)
|
||||||
|
$(verbose) $(MAKE) -C packaging $@ \
|
||||||
|
SOURCE_DIST_FILE=$(abspath $(PACKAGES_SOURCE_DIST_FILE))
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,108 @@
|
||||||
|
# Platform detection.
|
||||||
|
|
||||||
|
ifeq ($(PLATFORM),)
|
||||||
|
UNAME_S := $(shell uname -s)
|
||||||
|
|
||||||
|
ifeq ($(UNAME_S),Linux)
|
||||||
|
PLATFORM = linux
|
||||||
|
else ifeq ($(UNAME_S),Darwin)
|
||||||
|
PLATFORM = darwin
|
||||||
|
else ifeq ($(UNAME_S),SunOS)
|
||||||
|
PLATFORM = solaris
|
||||||
|
else ifeq ($(UNAME_S),GNU)
|
||||||
|
PLATFORM = gnu
|
||||||
|
else ifeq ($(UNAME_S),FreeBSD)
|
||||||
|
PLATFORM = freebsd
|
||||||
|
else ifeq ($(UNAME_S),NetBSD)
|
||||||
|
PLATFORM = netbsd
|
||||||
|
else ifeq ($(UNAME_S),OpenBSD)
|
||||||
|
PLATFORM = openbsd
|
||||||
|
else ifeq ($(UNAME_S),DragonFly)
|
||||||
|
PLATFORM = dragonfly
|
||||||
|
else ifeq ($(shell uname -o),Msys)
|
||||||
|
PLATFORM = msys2
|
||||||
|
else
|
||||||
|
$(error Unable to detect platform. Please open a ticket with the output of uname -a.)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
all: packages
|
||||||
|
@:
|
||||||
|
|
||||||
|
# --------------------------------------------------------------------
|
||||||
|
# Packaging.
|
||||||
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
|
.PHONY: packages package-deb \
|
||||||
|
package-rpm package-rpm-fedora package-rpm-suse \
|
||||||
|
package-rpm-rhel6 package-rpm-rhel7 \
|
||||||
|
package-windows package-standalone-macosx \
|
||||||
|
package-generic-unix
|
||||||
|
|
||||||
|
PACKAGES_DIR ?= ../PACKAGES
|
||||||
|
SOURCE_DIST_FILE ?= $(wildcard $(PACKAGES_DIR)/rabbitmq-server-*.tar.xz)
|
||||||
|
|
||||||
|
ifneq ($(filter-out clean,$(MAKECMDGOALS)),)
|
||||||
|
ifeq ($(SOURCE_DIST_FILE),)
|
||||||
|
$(error Cannot find source archive; please specify SOURCE_DIST_FILE)
|
||||||
|
endif
|
||||||
|
ifneq ($(words $(SOURCE_DIST_FILE)),1)
|
||||||
|
$(error Multiple source archives found; please specify SOURCE_DIST_FILE)
|
||||||
|
endif
|
||||||
|
ifeq ($(filter %.tar.xz %.txz,$(SOURCE_DIST_FILE)),)
|
||||||
|
$(error The source archive must a tar.xz archive)
|
||||||
|
endif
|
||||||
|
ifeq ($(wildcard $(SOURCE_DIST_FILE)),)
|
||||||
|
$(error The source archive must exist)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef NO_CLEAN
|
||||||
|
DO_CLEAN := clean
|
||||||
|
endif
|
||||||
|
|
||||||
|
VARS = SOURCE_DIST_FILE="$(abspath $(SOURCE_DIST_FILE))" \
|
||||||
|
PACKAGES_DIR="$(abspath $(PACKAGES_DIR))" \
|
||||||
|
SIGNING_KEY="$(SIGNING_KEY)"
|
||||||
|
|
||||||
|
packages: package-deb package-rpm package-windows package-generic-unix
|
||||||
|
@:
|
||||||
|
|
||||||
|
package-deb: $(SOURCE_DIST_FILE)
|
||||||
|
$(gen_verbose) $(MAKE) -C debs/Debian $(VARS) all $(DO_CLEAN)
|
||||||
|
|
||||||
|
package-rpm: package-rpm-rhel6 package-rpm-rhel7 package-rpm-suse
|
||||||
|
@:
|
||||||
|
|
||||||
|
package-rpm-fedora: $(SOURCE_DIST_FILE)
|
||||||
|
$(gen_verbose) $(MAKE) -C RPMS/Fedora $(VARS) all $(DO_CLEAN)
|
||||||
|
|
||||||
|
package-rpm-rhel6: $(SOURCE_DIST_FILE)
|
||||||
|
$(gen_verbose) $(MAKE) -C RPMS/Fedora $(VARS) RPM_OS=rhel6 all $(DO_CLEAN)
|
||||||
|
|
||||||
|
package-rpm-rhel7: $(SOURCE_DIST_FILE)
|
||||||
|
$(gen_verbose) $(MAKE) -C RPMS/Fedora $(VARS) RPM_OS=rhel7 all $(DO_CLEAN)
|
||||||
|
|
||||||
|
package-rpm-suse: $(SOURCE_DIST_FILE)
|
||||||
|
$(gen_verbose) $(MAKE) -C RPMS/Fedora $(VARS) RPM_OS=suse all $(DO_CLEAN)
|
||||||
|
|
||||||
|
package-windows: $(SOURCE_DIST_FILE)
|
||||||
|
$(gen_verbose) $(MAKE) -C windows $(VARS) all $(DO_CLEAN)
|
||||||
|
$(verbose) $(MAKE) -C windows-exe $(VARS) all $(DO_CLEAN)
|
||||||
|
|
||||||
|
package-generic-unix: $(SOURCE_DIST_FILE)
|
||||||
|
$(gen_verbose) $(MAKE) -C generic-unix $(VARS) all $(DO_CLEAN)
|
||||||
|
|
||||||
|
ifeq ($(PLATFORM),darwin)
|
||||||
|
packages: package-standalone-macosx
|
||||||
|
|
||||||
|
package-standalone-macosx: $(SOURCE_DIST_FILE)
|
||||||
|
$(gen_verbose) $(MAKE) -C standalone $(VARS) OS=mac all $(DO_CLEAN)
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
|
||||||
|
clean:
|
||||||
|
for subdir in debs/Debian RPMS/Fedora windows windows-exe generic-unix standalone; do \
|
||||||
|
$(MAKE) -C "$$subdir" clean; \
|
||||||
|
done
|
|
@ -0,0 +1,80 @@
|
||||||
|
SOURCE_DIST_FILE ?= $(wildcard ../../../rabbitmq-server-*.tar.xz)
|
||||||
|
|
||||||
|
ifneq ($(filter-out clean,$(MAKECMDGOALS)),)
|
||||||
|
ifeq ($(SOURCE_DIST_FILE),)
|
||||||
|
$(error Cannot find source archive; please specify SOURCE_DIST_FILE)
|
||||||
|
endif
|
||||||
|
ifneq ($(words $(SOURCE_DIST_FILE)),1)
|
||||||
|
$(error Multiple source archives found; please specify SOURCE_DIST_FILE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
VERSION ?= $(patsubst rabbitmq-server-%.tar.xz,%,$(notdir $(SOURCE_DIST_FILE)))
|
||||||
|
ifeq ($(VERSION),)
|
||||||
|
$(error Cannot determine version; please specify VERSION)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
TOP_DIR = $(shell pwd)
|
||||||
|
# Under debian we do not want to check build dependencies, since that
|
||||||
|
# only checks build-dependencies using rpms, not debs
|
||||||
|
DEFINES = --define '_topdir $(TOP_DIR)' --define '_tmppath $(TOP_DIR)/tmp' \
|
||||||
|
--define '_sysconfdir /etc' --define '_localstatedir /var'
|
||||||
|
|
||||||
|
ifndef RPM_OS
|
||||||
|
RPM_OS = fedora
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq "$(RPM_OS)" "suse"
|
||||||
|
FUNCTION_LIBRARY=
|
||||||
|
REQUIRES=/sbin/chkconfig /sbin/service
|
||||||
|
OS_DEFINES=--define '_initrddir /etc/init.d' --define 'dist .suse'
|
||||||
|
SPEC_DEFINES=--define 'group_tag Productivity/Networking/Other'
|
||||||
|
START_PROG=startproc
|
||||||
|
else
|
||||||
|
FUNCTION_LIBRARY=\# Source function library.\n. /etc/init.d/functions
|
||||||
|
REQUIRES=chkconfig initscripts
|
||||||
|
OS_DEFINES=--define '_initrddir /etc/rc.d/init.d'
|
||||||
|
ifeq "$(RPM_OS)" "rhel6"
|
||||||
|
SPEC_DEFINES=--define 'group_tag Development/Libraries' --define 'dist .el6' --define 'rhel 6'
|
||||||
|
else ifeq "$(RPM_OS)" "rhel7"
|
||||||
|
SPEC_DEFINES=--define 'group_tag Development/Libraries' --define '_unitdir /usr/lib/systemd/system' --define 'dist .el7' --define 'rhel 7'
|
||||||
|
else
|
||||||
|
SPEC_DEFINES=--define 'group_tag Development/Libraries'
|
||||||
|
endif
|
||||||
|
START_PROG=daemon
|
||||||
|
endif
|
||||||
|
|
||||||
|
unexport DEPS_DIR
|
||||||
|
unexport ERL_LIBS
|
||||||
|
|
||||||
|
.PHONY: all prepare server clean
|
||||||
|
|
||||||
|
all: clean server
|
||||||
|
@:
|
||||||
|
|
||||||
|
prepare:
|
||||||
|
mkdir -p BUILD SOURCES SPECS SRPMS RPMS tmp
|
||||||
|
cp $(SOURCE_DIST_FILE) SOURCES
|
||||||
|
cp rabbitmq-server.spec SPECS
|
||||||
|
sed -i 's|%%VERSION%%|$(VERSION)|;s|%%REQUIRES%%|$(REQUIRES)|' \
|
||||||
|
SPECS/rabbitmq-server.spec
|
||||||
|
|
||||||
|
cp rabbitmq-server.service SOURCES/rabbitmq-server.service
|
||||||
|
cp rabbitmq-server.tmpfiles SOURCES/rabbitmq-server.tmpfiles
|
||||||
|
cp rabbitmq-server.init SOURCES/rabbitmq-server.init
|
||||||
|
sed -i \
|
||||||
|
-e 's|^START_PROG=.*$$|START_PROG="$(START_PROG)"|' \
|
||||||
|
-e 's|^@FUNCTION_LIBRARY@|$(FUNCTION_LIBRARY)|' \
|
||||||
|
SOURCES/rabbitmq-server.init
|
||||||
|
cp rabbitmq-server.logrotate SOURCES/rabbitmq-server.logrotate
|
||||||
|
|
||||||
|
server: prepare
|
||||||
|
rpmbuild -ba --nodeps SPECS/rabbitmq-server.spec $(DEFINES) $(OS_DEFINES) $(SPEC_DEFINES)
|
||||||
|
|
||||||
|
if test "$(PACKAGES_DIR)"; then \
|
||||||
|
mkdir -p "$(PACKAGES_DIR)"; \
|
||||||
|
mv SRPMS/*.rpm RPMS/noarch/*.rpm "$(PACKAGES_DIR)"; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf SOURCES SPECS RPMS SRPMS BUILD tmp
|
|
@ -0,0 +1,184 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# rabbitmq-server RabbitMQ broker
|
||||||
|
#
|
||||||
|
# chkconfig: - 80 05
|
||||||
|
# description: Enable AMQP service provided by RabbitMQ
|
||||||
|
#
|
||||||
|
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: rabbitmq-server
|
||||||
|
# Required-Start: $remote_fs $network
|
||||||
|
# Required-Stop: $remote_fs $network
|
||||||
|
# Default-Start: 3 5
|
||||||
|
# Default-Stop: 0 1 2 6
|
||||||
|
# Description: RabbitMQ broker
|
||||||
|
# Short-Description: Enable AMQP service provided by RabbitMQ broker
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
@FUNCTION_LIBRARY@
|
||||||
|
|
||||||
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
|
NAME=rabbitmq-server
|
||||||
|
DAEMON=/usr/sbin/${NAME}
|
||||||
|
CONTROL=/usr/sbin/rabbitmqctl
|
||||||
|
DESC=rabbitmq-server
|
||||||
|
USER=rabbitmq
|
||||||
|
ROTATE_SUFFIX=
|
||||||
|
PID_FILE=/var/run/rabbitmq/pid
|
||||||
|
RABBITMQ_ENV=/usr/lib/rabbitmq/bin/rabbitmq-env
|
||||||
|
|
||||||
|
START_PROG= # Set when building package
|
||||||
|
LOCK_FILE=/var/lock/subsys/$NAME
|
||||||
|
|
||||||
|
test -x $DAEMON || exit 0
|
||||||
|
test -x $CONTROL || exit 0
|
||||||
|
|
||||||
|
RETVAL=0
|
||||||
|
set -e
|
||||||
|
|
||||||
|
[ -f /etc/default/${NAME} ] && . /etc/default/${NAME}
|
||||||
|
|
||||||
|
RABBITMQ_SCRIPTS_DIR=$(dirname "$RABBITMQ_ENV")
|
||||||
|
. "$RABBITMQ_ENV"
|
||||||
|
|
||||||
|
ensure_pid_dir () {
|
||||||
|
PID_DIR=`dirname ${PID_FILE}`
|
||||||
|
if [ ! -d ${PID_DIR} ] ; then
|
||||||
|
mkdir -p ${PID_DIR}
|
||||||
|
chown -R ${USER}:${USER} ${PID_DIR}
|
||||||
|
chmod 755 ${PID_DIR}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
remove_pid () {
|
||||||
|
rm -f ${PID_FILE}
|
||||||
|
rmdir `dirname ${PID_FILE}` || :
|
||||||
|
}
|
||||||
|
|
||||||
|
start_rabbitmq () {
|
||||||
|
status_rabbitmq quiet
|
||||||
|
if [ $RETVAL = 0 ] ; then
|
||||||
|
echo RabbitMQ is currently running
|
||||||
|
else
|
||||||
|
RETVAL=0
|
||||||
|
ensure_pid_dir
|
||||||
|
set +e
|
||||||
|
RABBITMQ_PID_FILE=$PID_FILE $START_PROG $DAEMON \
|
||||||
|
> "${RABBITMQ_LOG_BASE}/startup_log" \
|
||||||
|
2> "${RABBITMQ_LOG_BASE}/startup_err" \
|
||||||
|
0<&- &
|
||||||
|
$CONTROL wait $PID_FILE >/dev/null 2>&1
|
||||||
|
RETVAL=$?
|
||||||
|
set -e
|
||||||
|
case "$RETVAL" in
|
||||||
|
0)
|
||||||
|
echo SUCCESS
|
||||||
|
if [ -n "$LOCK_FILE" ] ; then
|
||||||
|
touch $LOCK_FILE
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
remove_pid
|
||||||
|
echo FAILED - check ${RABBITMQ_LOG_BASE}/startup_\{log, _err\}
|
||||||
|
RETVAL=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
stop_rabbitmq () {
|
||||||
|
status_rabbitmq quiet
|
||||||
|
if [ $RETVAL = 0 ] ; then
|
||||||
|
set +e
|
||||||
|
$CONTROL stop ${PID_FILE} \
|
||||||
|
> ${RABBITMQ_LOG_BASE}/shutdown_log \
|
||||||
|
2> ${RABBITMQ_LOG_BASE}/shutdown_err
|
||||||
|
RETVAL=$?
|
||||||
|
set -e
|
||||||
|
if [ $RETVAL = 0 ] ; then
|
||||||
|
remove_pid
|
||||||
|
if [ -n "$LOCK_FILE" ] ; then
|
||||||
|
rm -f $LOCK_FILE
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo FAILED - check ${RABBITMQ_LOG_BASE}/shutdown_log, _err
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo RabbitMQ is not running
|
||||||
|
RETVAL=0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
status_rabbitmq() {
|
||||||
|
set +e
|
||||||
|
if [ "$1" != "quiet" ] ; then
|
||||||
|
$CONTROL status 2>&1
|
||||||
|
else
|
||||||
|
$CONTROL status > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
if [ $? != 0 ] ; then
|
||||||
|
RETVAL=3
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
}
|
||||||
|
|
||||||
|
rotate_logs_rabbitmq() {
|
||||||
|
set +e
|
||||||
|
$CONTROL rotate_logs ${ROTATE_SUFFIX}
|
||||||
|
if [ $? != 0 ] ; then
|
||||||
|
RETVAL=1
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
}
|
||||||
|
|
||||||
|
restart_running_rabbitmq () {
|
||||||
|
status_rabbitmq quiet
|
||||||
|
if [ $RETVAL = 0 ] ; then
|
||||||
|
restart_rabbitmq
|
||||||
|
else
|
||||||
|
echo RabbitMQ is not runnning
|
||||||
|
RETVAL=0
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
restart_rabbitmq() {
|
||||||
|
stop_rabbitmq
|
||||||
|
start_rabbitmq
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
echo -n "Starting $DESC: "
|
||||||
|
start_rabbitmq
|
||||||
|
echo "$NAME."
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
echo -n "Stopping $DESC: "
|
||||||
|
stop_rabbitmq
|
||||||
|
echo "$NAME."
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status_rabbitmq
|
||||||
|
;;
|
||||||
|
rotate-logs)
|
||||||
|
echo -n "Rotating log files for $DESC: "
|
||||||
|
rotate_logs_rabbitmq
|
||||||
|
;;
|
||||||
|
force-reload|reload|restart)
|
||||||
|
echo -n "Restarting $DESC: "
|
||||||
|
restart_rabbitmq
|
||||||
|
echo "$NAME."
|
||||||
|
;;
|
||||||
|
try-restart)
|
||||||
|
echo -n "Restarting $DESC: "
|
||||||
|
restart_running_rabbitmq
|
||||||
|
echo "$NAME."
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|status|rotate-logs|restart|condrestart|try-restart|reload|force-reload}" >&2
|
||||||
|
RETVAL=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $RETVAL
|
|
@ -0,0 +1,12 @@
|
||||||
|
/var/log/rabbitmq/*.log {
|
||||||
|
weekly
|
||||||
|
missingok
|
||||||
|
rotate 20
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
notifempty
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
/usr/sbin/rabbitmqctl rotate_logs > /dev/null
|
||||||
|
endscript
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
[Unit]
|
||||||
|
Description=RabbitMQ broker
|
||||||
|
After=syslog.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=notify
|
||||||
|
User=rabbitmq
|
||||||
|
Group=rabbitmq
|
||||||
|
WorkingDirectory=/var/lib/rabbitmq
|
||||||
|
ExecStart=/usr/sbin/rabbitmq-server
|
||||||
|
ExecStop=/usr/sbin/rabbitmqctl stop
|
||||||
|
NotifyAccess=all
|
||||||
|
TimeoutStartSec=3600
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,415 @@
|
||||||
|
%define debug_package %{nil}
|
||||||
|
%define erlang_minver R16B-03
|
||||||
|
|
||||||
|
Name: rabbitmq-server
|
||||||
|
Version: %%VERSION%%
|
||||||
|
Release: 1%{?dist}
|
||||||
|
License: MPLv1.1 and MIT and ASL 2.0 and BSD
|
||||||
|
Group: %{group_tag}
|
||||||
|
Source: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{version}.tar.xz
|
||||||
|
Source1: rabbitmq-server.init
|
||||||
|
Source2: rabbitmq-server.logrotate
|
||||||
|
Source3: rabbitmq-server.service
|
||||||
|
Source4: rabbitmq-server.tmpfiles
|
||||||
|
URL: http://www.rabbitmq.com/
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRequires: erlang >= %{erlang_minver}, python-simplejson, xmlto, libxslt, gzip, sed, zip, rsync
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
|
BuildRequires: systemd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Requires: erlang >= %{erlang_minver}, logrotate, socat
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%{_arch}-root
|
||||||
|
Summary: The RabbitMQ server
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
|
Requires(pre): systemd
|
||||||
|
Requires(post): systemd
|
||||||
|
Requires(preun): systemd
|
||||||
|
%else
|
||||||
|
Requires(post): %%REQUIRES%%
|
||||||
|
Requires(pre): %%REQUIRES%%
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description
|
||||||
|
RabbitMQ is an open source multi-protocol messaging broker.
|
||||||
|
|
||||||
|
# We want to install into /usr/lib, even on 64-bit platforms
|
||||||
|
%define _rabbit_libdir %{_exec_prefix}/lib/rabbitmq
|
||||||
|
%define _rabbit_erllibdir %{_rabbit_libdir}/lib/rabbitmq_server-%{version}
|
||||||
|
%define _rabbit_server_ocf scripts/rabbitmq-server.ocf
|
||||||
|
%define _plugins_state_dir %{_localstatedir}/lib/rabbitmq/plugins
|
||||||
|
%define _rabbit_server_ha_ocf scripts/rabbitmq-server-ha.ocf
|
||||||
|
|
||||||
|
|
||||||
|
%define _maindir %{buildroot}%{_rabbit_erllibdir}
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
cp -a docs/README-for-packages %{_builddir}/rabbitmq-server-%{version}/README
|
||||||
|
make %{?_smp_mflags} dist manpages
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
make install install-bin install-man DESTDIR=%{buildroot} PREFIX=%{_exec_prefix} RMQ_ROOTDIR=%{_rabbit_libdir} MANDIR=%{_mandir}
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_localstatedir}/lib/rabbitmq/mnesia
|
||||||
|
mkdir -p %{buildroot}%{_localstatedir}/log/rabbitmq
|
||||||
|
|
||||||
|
#Copy all necessary lib files etc.
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
|
install -p -D -m 0644 %{S:3} %{buildroot}%{_unitdir}/%{name}.service
|
||||||
|
%else
|
||||||
|
install -p -D -m 0755 %{S:1} %{buildroot}%{_initrddir}/rabbitmq-server
|
||||||
|
%endif
|
||||||
|
|
||||||
|
install -p -D -m 0755 %{_rabbit_server_ocf} %{buildroot}%{_exec_prefix}/lib/ocf/resource.d/rabbitmq/rabbitmq-server
|
||||||
|
install -p -D -m 0755 %{_rabbit_server_ha_ocf} %{buildroot}%{_exec_prefix}/lib/ocf/resource.d/rabbitmq/rabbitmq-server-ha
|
||||||
|
install -p -D -m 0644 %{S:2} %{buildroot}%{_sysconfdir}/logrotate.d/rabbitmq-server
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/rabbitmq
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_sbindir}
|
||||||
|
sed -e 's|@SU_RABBITMQ_SH_C@|su rabbitmq -s /bin/sh -c|' \
|
||||||
|
-e 's|@STDOUT_STDERR_REDIRECTION@||' \
|
||||||
|
< scripts/rabbitmq-script-wrapper \
|
||||||
|
> %{buildroot}%{_sbindir}/rabbitmqctl
|
||||||
|
chmod 0755 %{buildroot}%{_sbindir}/rabbitmqctl
|
||||||
|
for script in rabbitmq-server rabbitmq-plugins; do \
|
||||||
|
cp -a %{buildroot}%{_sbindir}/rabbitmqctl \
|
||||||
|
%{buildroot}%{_sbindir}/$script; \
|
||||||
|
done
|
||||||
|
|
||||||
|
%if 0%{?fedora} > 14 || 0%{?rhel} >= 7
|
||||||
|
install -D -p -m 0644 %{SOURCE4} %{buildroot}%{_prefix}/lib/tmpfiles.d/%{name}.conf
|
||||||
|
%endif
|
||||||
|
|
||||||
|
rm %{_maindir}/LICENSE* %{_maindir}/INSTALL
|
||||||
|
|
||||||
|
#Build the list of files
|
||||||
|
echo '%defattr(-,root,root, -)' >%{_builddir}/%{name}.files
|
||||||
|
find %{buildroot} -path %{buildroot}%{_sysconfdir} -prune -o '!' -type d -printf "/%%P\n" >>%{_builddir}/%{name}.files
|
||||||
|
|
||||||
|
%pre
|
||||||
|
|
||||||
|
if [ $1 -gt 1 ]; then
|
||||||
|
# Upgrade - stop previous instance of rabbitmq-server init.d (this
|
||||||
|
# will also activate systemd if it was used) script.
|
||||||
|
/sbin/service rabbitmq-server stop
|
||||||
|
fi
|
||||||
|
|
||||||
|
# create rabbitmq group
|
||||||
|
if ! getent group rabbitmq >/dev/null; then
|
||||||
|
groupadd -r rabbitmq
|
||||||
|
fi
|
||||||
|
|
||||||
|
# create rabbitmq user
|
||||||
|
if ! getent passwd rabbitmq >/dev/null; then
|
||||||
|
useradd -r -g rabbitmq -d %{_localstatedir}/lib/rabbitmq rabbitmq \
|
||||||
|
-c "RabbitMQ messaging server"
|
||||||
|
fi
|
||||||
|
|
||||||
|
%post
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
|
# %%systemd_post %%{name}.service
|
||||||
|
# manual expansion of systemd_post as this doesn't appear to
|
||||||
|
# expand correctly on debian machines
|
||||||
|
if [ $1 -eq 1 ] ; then
|
||||||
|
# Initial installation
|
||||||
|
systemctl preset %{name}.service >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
/bin/systemctl daemon-reload
|
||||||
|
%else
|
||||||
|
/sbin/chkconfig --add %{name}
|
||||||
|
%endif
|
||||||
|
if [ -f %{_sysconfdir}/rabbitmq/rabbitmq.conf ] && [ ! -f %{_sysconfdir}/rabbitmq/rabbitmq-env.conf ]; then
|
||||||
|
mv %{_sysconfdir}/rabbitmq/rabbitmq.conf %{_sysconfdir}/rabbitmq/rabbitmq-env.conf
|
||||||
|
fi
|
||||||
|
chmod -R o-rwx,g-w %{_localstatedir}/lib/rabbitmq/mnesia
|
||||||
|
|
||||||
|
%preun
|
||||||
|
if [ $1 = 0 ]; then
|
||||||
|
#Complete uninstall
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
|
systemctl stop rabbitmq-server
|
||||||
|
%else
|
||||||
|
/sbin/service rabbitmq-server stop
|
||||||
|
/sbin/chkconfig --del rabbitmq-server
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# We do not remove /var/log and /var/lib directories
|
||||||
|
# Leave rabbitmq user and group
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Clean out plugin activation state, both on uninstall and upgrade
|
||||||
|
rm -rf %{_plugins_state_dir}
|
||||||
|
for ext in rel script boot ; do
|
||||||
|
rm -f %{_rabbit_erllibdir}/ebin/rabbit.$ext
|
||||||
|
done
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||||
|
# %%systemd_postun_with_restart %%{name}.service
|
||||||
|
# manual expansion of systemd_postun_with_restart as this doesn't appear to
|
||||||
|
# expand correctly on debian machines
|
||||||
|
if [ $1 -ge 1 ] ; then
|
||||||
|
# Package upgrade, not uninstall
|
||||||
|
systemctl try-restart %{name}.service >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
|
%else
|
||||||
|
if [ $1 -gt 1 ]; then
|
||||||
|
/sbin/service %{name} try-restart
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?fedora} > 17 || 0%{?rhel} >= 7
|
||||||
|
# For prior versions older than this, do a conversion
|
||||||
|
# from sysv to systemd
|
||||||
|
%triggerun -- %{name} < 3.6.5
|
||||||
|
# Save the current service runlevel info
|
||||||
|
# User must manually run systemd-sysv-convert --apply opensips
|
||||||
|
# to migrate them to systemd targets
|
||||||
|
/usr/bin/systemd-sysv-convert --save %{name} >/dev/null 2>&1 ||:
|
||||||
|
|
||||||
|
# Run these because the SysV package being removed won't do them
|
||||||
|
/sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
|
||||||
|
/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files -f ../%{name}.files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%attr(0755, rabbitmq, rabbitmq) %dir %{_localstatedir}/lib/rabbitmq
|
||||||
|
%attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/lib/rabbitmq/mnesia
|
||||||
|
%attr(0755, rabbitmq, rabbitmq) %dir %{_localstatedir}/log/rabbitmq
|
||||||
|
%dir %{_sysconfdir}/rabbitmq
|
||||||
|
|
||||||
|
%if 0%{?rhel} < 7
|
||||||
|
%{_initrddir}/rabbitmq-server
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%config(noreplace) %{_sysconfdir}/logrotate.d/rabbitmq-server
|
||||||
|
%doc LICENSE*
|
||||||
|
%doc README
|
||||||
|
%doc docs/rabbitmq.config.example
|
||||||
|
%doc docs/set_rabbitmq_policy.sh.example
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Aug 5 2016 michael@rabbitmq.com 3.6.5-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Fri Jul 29 2016 michael@rabbitmq.com 3.6.4-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Wed Jul 6 2016 michael@rabbitmq.com 3.6.3-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Thu May 19 2016 michael@rabbitmq.com 3.6.2-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Mar 1 2016 michael@rabbitmq.com 3.6.1-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Dec 22 2015 michael@rabbitmq.com 3.6.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Dec 15 2015 michael@rabbitmq.com 3.5.7-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Wed Oct 7 2015 michael@rabbitmq.com 3.5.6-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Thu Sep 24 2015 jean-sebastien@rabbitmq.com 3.5.5-3
|
||||||
|
- Fix bashism in rabbitmq-script-wrapper
|
||||||
|
|
||||||
|
* Thu Sep 24 2015 jean-sebastien@rabbitmq.com 3.5.5-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Jul 21 2015 michael@rabbitmq.com 3.5.4-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Fri May 22 2015 jean-sebastien@rabbitmq.com 3.5.3-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue May 12 2015 jean-sebastien@rabbitmq.com 3.5.2-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Thu Apr 2 2015 michael@rabbitmq.com 3.5.1-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Wed Mar 11 2015 jean-sebastien@rabbitmq.com 3.5.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Wed Feb 11 2015 michael@rabbitmq.com 3.4.4-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Jan 6 2015 jean-sebastien@rabbitmq.com 3.4.3-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Wed Nov 26 2014 simon@rabbitmq.com 3.4.2-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Wed Oct 29 2014 simon@rabbitmq.com 3.4.1-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Oct 21 2014 simon@rabbitmq.com 3.4.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Mon Aug 11 2014 simon@rabbitmq.com 3.3.5-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Jun 24 2014 simon@rabbitmq.com 3.3.4-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Mon Jun 16 2014 simon@rabbitmq.com 3.3.3-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Mon Jun 9 2014 simon@rabbitmq.com 3.3.2-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Apr 29 2014 simon@rabbitmq.com 3.3.1-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Wed Apr 2 2014 simon@rabbitmq.com 3.3.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Mon Mar 3 2014 simon@rabbitmq.com 3.2.4-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Thu Jan 23 2014 emile@rabbitmq.com 3.2.3-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Dec 10 2013 emile@rabbitmq.com 3.2.2-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Wed Oct 23 2013 emile@rabbitmq.com 3.2.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Thu Aug 15 2013 simon@rabbitmq.com 3.1.5-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Jun 25 2013 tim@rabbitmq.com 3.1.3-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Mon Jun 24 2013 tim@rabbitmq.com 3.1.2-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Mon May 20 2013 tim@rabbitmq.com 3.1.1-1
|
||||||
|
- Test release
|
||||||
|
|
||||||
|
* Wed May 1 2013 simon@rabbitmq.com 3.1.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Dec 11 2012 simon@rabbitmq.com 3.0.1-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Fri Nov 16 2012 simon@rabbitmq.com 3.0.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Fri Dec 16 2011 steve@rabbitmq.com 2.7.1-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Nov 8 2011 steve@rabbitmq.com 2.7.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Fri Sep 9 2011 tim@rabbitmq.com 2.6.1-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Fri Aug 26 2011 tim@rabbitmq.com 2.6.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Mon Jun 27 2011 simon@rabbitmq.com 2.5.1-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Thu Jun 9 2011 jerryk@vmware.com 2.5.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Thu Apr 7 2011 Alexandru Scvortov <alexandru@rabbitmq.com> 2.4.1-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Mar 22 2011 Alexandru Scvortov <alexandru@rabbitmq.com> 2.4.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Thu Feb 3 2011 simon@rabbitmq.com 2.3.1-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Feb 1 2011 simon@rabbitmq.com 2.3.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Mon Nov 29 2010 rob@rabbitmq.com 2.2.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Oct 19 2010 vlad@rabbitmq.com 2.1.1-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Sep 14 2010 marek@rabbitmq.com 2.1.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Mon Aug 23 2010 mikeb@rabbitmq.com 2.0.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Wed Jul 14 2010 Emile Joubert <emile@rabbitmq.com> 1.8.1-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Tue Jun 15 2010 Matthew Sackman <matthew@rabbitmq.com> 1.8.0-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Mon Feb 15 2010 Matthew Sackman <matthew@lshift.net> 1.7.2-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Fri Jan 22 2010 Matthew Sackman <matthew@lshift.net> 1.7.1-1
|
||||||
|
- New Upstream Release
|
||||||
|
|
||||||
|
* Mon Oct 5 2009 David Wragg <dpw@lshift.net> 1.7.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Wed Jun 17 2009 Matthias Radestock <matthias@lshift.net> 1.6.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Tue May 19 2009 Matthias Radestock <matthias@lshift.net> 1.5.5-1
|
||||||
|
- Maintenance release for the 1.5.x series
|
||||||
|
|
||||||
|
* Mon Apr 6 2009 Matthias Radestock <matthias@lshift.net> 1.5.4-1
|
||||||
|
- Maintenance release for the 1.5.x series
|
||||||
|
|
||||||
|
* Tue Feb 24 2009 Tony Garnock-Jones <tonyg@lshift.net> 1.5.3-1
|
||||||
|
- Maintenance release for the 1.5.x series
|
||||||
|
|
||||||
|
* Mon Feb 23 2009 Tony Garnock-Jones <tonyg@lshift.net> 1.5.2-1
|
||||||
|
- Maintenance release for the 1.5.x series
|
||||||
|
|
||||||
|
* Mon Jan 19 2009 Ben Hood <0x6e6562@gmail.com> 1.5.1-1
|
||||||
|
- Maintenance release for the 1.5.x series
|
||||||
|
|
||||||
|
* Wed Dec 17 2008 Matthias Radestock <matthias@lshift.net> 1.5.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Thu Jul 24 2008 Tony Garnock-Jones <tonyg@lshift.net> 1.4.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Mon Mar 3 2008 Adrien Pierard <adrian@lshift.net> 1.3.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Wed Sep 26 2007 Simon MacMullen <simon@lshift.net> 1.2.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Wed Aug 29 2007 Simon MacMullen <simon@lshift.net> 1.1.1-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Mon Jul 30 2007 Simon MacMullen <simon@lshift.net> 1.1.0-1.alpha
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Tue Jun 12 2007 Hubert Plociniczak <hubert@lshift.net> 1.0.0-1.20070607
|
||||||
|
- Building from source tarball, added starting script, stopping
|
||||||
|
|
||||||
|
* Mon May 21 2007 Hubert Plociniczak <hubert@lshift.net> 1.0.0-1.alpha
|
||||||
|
- Initial build of server library of RabbitMQ package
|
|
@ -0,0 +1 @@
|
||||||
|
D /var/run/rabbitmq 0755 rabbitmq rabbitmq -
|
|
@ -0,0 +1,5 @@
|
||||||
|
This package, the RabbitMQ server is licensed under the MPL.
|
||||||
|
|
||||||
|
If you have any questions regarding licensing, please contact us at
|
||||||
|
info@rabbitmq.com.
|
||||||
|
|
|
@ -0,0 +1,516 @@
|
||||||
|
|
||||||
|
The MIT license is as follows:
|
||||||
|
|
||||||
|
"Permission is hereby granted, free of charge, to any person
|
||||||
|
obtaining a copy of this file (the Software), to deal in the
|
||||||
|
Software without restriction, including without limitation the
|
||||||
|
rights to use, copy, modify, merge, publish, distribute,
|
||||||
|
sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE."
|
||||||
|
|
||||||
|
|
||||||
|
The BSD 2-Clause license is as follows:
|
||||||
|
|
||||||
|
"Redistribution and use in source and binary forms, with or
|
||||||
|
without modification, are permitted provided that the
|
||||||
|
following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials
|
||||||
|
provided with the distribution.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||||
|
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||||
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
|
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||||
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||||
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||||
|
|
||||||
|
|
||||||
|
The rest of this package is licensed under the Mozilla Public License 1.1
|
||||||
|
Authors and Copyright are as described below:
|
||||||
|
|
||||||
|
The Initial Developer of the Original Code is GoPivotal, Inc.
|
||||||
|
Copyright (c) 2007-2015 Pivotal Software, Inc. All rights reserved.
|
||||||
|
|
||||||
|
|
||||||
|
MOZILLA PUBLIC LICENSE
|
||||||
|
Version 1.1
|
||||||
|
|
||||||
|
---------------
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
1.0.1. "Commercial Use" means distribution or otherwise making the
|
||||||
|
Covered Code available to a third party.
|
||||||
|
|
||||||
|
1.1. "Contributor" means each entity that creates or contributes to
|
||||||
|
the creation of Modifications.
|
||||||
|
|
||||||
|
1.2. "Contributor Version" means the combination of the Original
|
||||||
|
Code, prior Modifications used by a Contributor, and the Modifications
|
||||||
|
made by that particular Contributor.
|
||||||
|
|
||||||
|
1.3. "Covered Code" means the Original Code or Modifications or the
|
||||||
|
combination of the Original Code and Modifications, in each case
|
||||||
|
including portions thereof.
|
||||||
|
|
||||||
|
1.4. "Electronic Distribution Mechanism" means a mechanism generally
|
||||||
|
accepted in the software development community for the electronic
|
||||||
|
transfer of data.
|
||||||
|
|
||||||
|
1.5. "Executable" means Covered Code in any form other than Source
|
||||||
|
Code.
|
||||||
|
|
||||||
|
1.6. "Initial Developer" means the individual or entity identified
|
||||||
|
as the Initial Developer in the Source Code notice required by Exhibit
|
||||||
|
A.
|
||||||
|
|
||||||
|
1.7. "Larger Work" means a work which combines Covered Code or
|
||||||
|
portions thereof with code not governed by the terms of this License.
|
||||||
|
|
||||||
|
1.8. "License" means this document.
|
||||||
|
|
||||||
|
1.8.1. "Licensable" means having the right to grant, to the maximum
|
||||||
|
extent possible, whether at the time of the initial grant or
|
||||||
|
subsequently acquired, any and all of the rights conveyed herein.
|
||||||
|
|
||||||
|
1.9. "Modifications" means any addition to or deletion from the
|
||||||
|
substance or structure of either the Original Code or any previous
|
||||||
|
Modifications. When Covered Code is released as a series of files, a
|
||||||
|
Modification is:
|
||||||
|
A. Any addition to or deletion from the contents of a file
|
||||||
|
containing Original Code or previous Modifications.
|
||||||
|
|
||||||
|
B. Any new file that contains any part of the Original Code or
|
||||||
|
previous Modifications.
|
||||||
|
|
||||||
|
1.10. "Original Code" means Source Code of computer software code
|
||||||
|
which is described in the Source Code notice required by Exhibit A as
|
||||||
|
Original Code, and which, at the time of its release under this
|
||||||
|
License is not already Covered Code governed by this License.
|
||||||
|
|
||||||
|
1.10.1. "Patent Claims" means any patent claim(s), now owned or
|
||||||
|
hereafter acquired, including without limitation, method, process,
|
||||||
|
and apparatus claims, in any patent Licensable by grantor.
|
||||||
|
|
||||||
|
1.11. "Source Code" means the preferred form of the Covered Code for
|
||||||
|
making modifications to it, including all modules it contains, plus
|
||||||
|
any associated interface definition files, scripts used to control
|
||||||
|
compilation and installation of an Executable, or source code
|
||||||
|
differential comparisons against either the Original Code or another
|
||||||
|
well known, available Covered Code of the Contributor's choice. The
|
||||||
|
Source Code can be in a compressed or archival form, provided the
|
||||||
|
appropriate decompression or de-archiving software is widely available
|
||||||
|
for no charge.
|
||||||
|
|
||||||
|
1.12. "You" (or "Your") means an individual or a legal entity
|
||||||
|
exercising rights under, and complying with all of the terms of, this
|
||||||
|
License or a future version of this License issued under Section 6.1.
|
||||||
|
For legal entities, "You" includes any entity which controls, is
|
||||||
|
controlled by, or is under common control with You. For purposes of
|
||||||
|
this definition, "control" means (a) the power, direct or indirect,
|
||||||
|
to cause the direction or management of such entity, whether by
|
||||||
|
contract or otherwise, or (b) ownership of more than fifty percent
|
||||||
|
(50%) of the outstanding shares or beneficial ownership of such
|
||||||
|
entity.
|
||||||
|
|
||||||
|
2. Source Code License.
|
||||||
|
|
||||||
|
2.1. The Initial Developer Grant.
|
||||||
|
The Initial Developer hereby grants You a world-wide, royalty-free,
|
||||||
|
non-exclusive license, subject to third party intellectual property
|
||||||
|
claims:
|
||||||
|
(a) under intellectual property rights (other than patent or
|
||||||
|
trademark) Licensable by Initial Developer to use, reproduce,
|
||||||
|
modify, display, perform, sublicense and distribute the Original
|
||||||
|
Code (or portions thereof) with or without Modifications, and/or
|
||||||
|
as part of a Larger Work; and
|
||||||
|
|
||||||
|
(b) under Patents Claims infringed by the making, using or
|
||||||
|
selling of Original Code, to make, have made, use, practice,
|
||||||
|
sell, and offer for sale, and/or otherwise dispose of the
|
||||||
|
Original Code (or portions thereof).
|
||||||
|
|
||||||
|
(c) the licenses granted in this Section 2.1(a) and (b) are
|
||||||
|
effective on the date Initial Developer first distributes
|
||||||
|
Original Code under the terms of this License.
|
||||||
|
|
||||||
|
(d) Notwithstanding Section 2.1(b) above, no patent license is
|
||||||
|
granted: 1) for code that You delete from the Original Code; 2)
|
||||||
|
separate from the Original Code; or 3) for infringements caused
|
||||||
|
by: i) the modification of the Original Code or ii) the
|
||||||
|
combination of the Original Code with other software or devices.
|
||||||
|
|
||||||
|
2.2. Contributor Grant.
|
||||||
|
Subject to third party intellectual property claims, each Contributor
|
||||||
|
hereby grants You a world-wide, royalty-free, non-exclusive license
|
||||||
|
|
||||||
|
(a) under intellectual property rights (other than patent or
|
||||||
|
trademark) Licensable by Contributor, to use, reproduce, modify,
|
||||||
|
display, perform, sublicense and distribute the Modifications
|
||||||
|
created by such Contributor (or portions thereof) either on an
|
||||||
|
unmodified basis, with other Modifications, as Covered Code
|
||||||
|
and/or as part of a Larger Work; and
|
||||||
|
|
||||||
|
(b) under Patent Claims infringed by the making, using, or
|
||||||
|
selling of Modifications made by that Contributor either alone
|
||||||
|
and/or in combination with its Contributor Version (or portions
|
||||||
|
of such combination), to make, use, sell, offer for sale, have
|
||||||
|
made, and/or otherwise dispose of: 1) Modifications made by that
|
||||||
|
Contributor (or portions thereof); and 2) the combination of
|
||||||
|
Modifications made by that Contributor with its Contributor
|
||||||
|
Version (or portions of such combination).
|
||||||
|
|
||||||
|
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are
|
||||||
|
effective on the date Contributor first makes Commercial Use of
|
||||||
|
the Covered Code.
|
||||||
|
|
||||||
|
(d) Notwithstanding Section 2.2(b) above, no patent license is
|
||||||
|
granted: 1) for any code that Contributor has deleted from the
|
||||||
|
Contributor Version; 2) separate from the Contributor Version;
|
||||||
|
3) for infringements caused by: i) third party modifications of
|
||||||
|
Contributor Version or ii) the combination of Modifications made
|
||||||
|
by that Contributor with other software (except as part of the
|
||||||
|
Contributor Version) or other devices; or 4) under Patent Claims
|
||||||
|
infringed by Covered Code in the absence of Modifications made by
|
||||||
|
that Contributor.
|
||||||
|
|
||||||
|
3. Distribution Obligations.
|
||||||
|
|
||||||
|
3.1. Application of License.
|
||||||
|
The Modifications which You create or to which You contribute are
|
||||||
|
governed by the terms of this License, including without limitation
|
||||||
|
Section 2.2. The Source Code version of Covered Code may be
|
||||||
|
distributed only under the terms of this License or a future version
|
||||||
|
of this License released under Section 6.1, and You must include a
|
||||||
|
copy of this License with every copy of the Source Code You
|
||||||
|
distribute. You may not offer or impose any terms on any Source Code
|
||||||
|
version that alters or restricts the applicable version of this
|
||||||
|
License or the recipients' rights hereunder. However, You may include
|
||||||
|
an additional document offering the additional rights described in
|
||||||
|
Section 3.5.
|
||||||
|
|
||||||
|
3.2. Availability of Source Code.
|
||||||
|
Any Modification which You create or to which You contribute must be
|
||||||
|
made available in Source Code form under the terms of this License
|
||||||
|
either on the same media as an Executable version or via an accepted
|
||||||
|
Electronic Distribution Mechanism to anyone to whom you made an
|
||||||
|
Executable version available; and if made available via Electronic
|
||||||
|
Distribution Mechanism, must remain available for at least twelve (12)
|
||||||
|
months after the date it initially became available, or at least six
|
||||||
|
(6) months after a subsequent version of that particular Modification
|
||||||
|
has been made available to such recipients. You are responsible for
|
||||||
|
ensuring that the Source Code version remains available even if the
|
||||||
|
Electronic Distribution Mechanism is maintained by a third party.
|
||||||
|
|
||||||
|
3.3. Description of Modifications.
|
||||||
|
You must cause all Covered Code to which You contribute to contain a
|
||||||
|
file documenting the changes You made to create that Covered Code and
|
||||||
|
the date of any change. You must include a prominent statement that
|
||||||
|
the Modification is derived, directly or indirectly, from Original
|
||||||
|
Code provided by the Initial Developer and including the name of the
|
||||||
|
Initial Developer in (a) the Source Code, and (b) in any notice in an
|
||||||
|
Executable version or related documentation in which You describe the
|
||||||
|
origin or ownership of the Covered Code.
|
||||||
|
|
||||||
|
3.4. Intellectual Property Matters
|
||||||
|
(a) Third Party Claims.
|
||||||
|
If Contributor has knowledge that a license under a third party's
|
||||||
|
intellectual property rights is required to exercise the rights
|
||||||
|
granted by such Contributor under Sections 2.1 or 2.2,
|
||||||
|
Contributor must include a text file with the Source Code
|
||||||
|
distribution titled "LEGAL" which describes the claim and the
|
||||||
|
party making the claim in sufficient detail that a recipient will
|
||||||
|
know whom to contact. If Contributor obtains such knowledge after
|
||||||
|
the Modification is made available as described in Section 3.2,
|
||||||
|
Contributor shall promptly modify the LEGAL file in all copies
|
||||||
|
Contributor makes available thereafter and shall take other steps
|
||||||
|
(such as notifying appropriate mailing lists or newsgroups)
|
||||||
|
reasonably calculated to inform those who received the Covered
|
||||||
|
Code that new knowledge has been obtained.
|
||||||
|
|
||||||
|
(b) Contributor APIs.
|
||||||
|
If Contributor's Modifications include an application programming
|
||||||
|
interface and Contributor has knowledge of patent licenses which
|
||||||
|
are reasonably necessary to implement that API, Contributor must
|
||||||
|
also include this information in the LEGAL file.
|
||||||
|
|
||||||
|
(c) Representations.
|
||||||
|
Contributor represents that, except as disclosed pursuant to
|
||||||
|
Section 3.4(a) above, Contributor believes that Contributor's
|
||||||
|
Modifications are Contributor's original creation(s) and/or
|
||||||
|
Contributor has sufficient rights to grant the rights conveyed by
|
||||||
|
this License.
|
||||||
|
|
||||||
|
3.5. Required Notices.
|
||||||
|
You must duplicate the notice in Exhibit A in each file of the Source
|
||||||
|
Code. If it is not possible to put such notice in a particular Source
|
||||||
|
Code file due to its structure, then You must include such notice in a
|
||||||
|
location (such as a relevant directory) where a user would be likely
|
||||||
|
to look for such a notice. If You created one or more Modification(s)
|
||||||
|
You may add your name as a Contributor to the notice described in
|
||||||
|
Exhibit A. You must also duplicate this License in any documentation
|
||||||
|
for the Source Code where You describe recipients' rights or ownership
|
||||||
|
rights relating to Covered Code. You may choose to offer, and to
|
||||||
|
charge a fee for, warranty, support, indemnity or liability
|
||||||
|
obligations to one or more recipients of Covered Code. However, You
|
||||||
|
may do so only on Your own behalf, and not on behalf of the Initial
|
||||||
|
Developer or any Contributor. You must make it absolutely clear than
|
||||||
|
any such warranty, support, indemnity or liability obligation is
|
||||||
|
offered by You alone, and You hereby agree to indemnify the Initial
|
||||||
|
Developer and every Contributor for any liability incurred by the
|
||||||
|
Initial Developer or such Contributor as a result of warranty,
|
||||||
|
support, indemnity or liability terms You offer.
|
||||||
|
|
||||||
|
3.6. Distribution of Executable Versions.
|
||||||
|
You may distribute Covered Code in Executable form only if the
|
||||||
|
requirements of Section 3.1-3.5 have been met for that Covered Code,
|
||||||
|
and if You include a notice stating that the Source Code version of
|
||||||
|
the Covered Code is available under the terms of this License,
|
||||||
|
including a description of how and where You have fulfilled the
|
||||||
|
obligations of Section 3.2. The notice must be conspicuously included
|
||||||
|
in any notice in an Executable version, related documentation or
|
||||||
|
collateral in which You describe recipients' rights relating to the
|
||||||
|
Covered Code. You may distribute the Executable version of Covered
|
||||||
|
Code or ownership rights under a license of Your choice, which may
|
||||||
|
contain terms different from this License, provided that You are in
|
||||||
|
compliance with the terms of this License and that the license for the
|
||||||
|
Executable version does not attempt to limit or alter the recipient's
|
||||||
|
rights in the Source Code version from the rights set forth in this
|
||||||
|
License. If You distribute the Executable version under a different
|
||||||
|
license You must make it absolutely clear that any terms which differ
|
||||||
|
from this License are offered by You alone, not by the Initial
|
||||||
|
Developer or any Contributor. You hereby agree to indemnify the
|
||||||
|
Initial Developer and every Contributor for any liability incurred by
|
||||||
|
the Initial Developer or such Contributor as a result of any such
|
||||||
|
terms You offer.
|
||||||
|
|
||||||
|
3.7. Larger Works.
|
||||||
|
You may create a Larger Work by combining Covered Code with other code
|
||||||
|
not governed by the terms of this License and distribute the Larger
|
||||||
|
Work as a single product. In such a case, You must make sure the
|
||||||
|
requirements of this License are fulfilled for the Covered Code.
|
||||||
|
|
||||||
|
4. Inability to Comply Due to Statute or Regulation.
|
||||||
|
|
||||||
|
If it is impossible for You to comply with any of the terms of this
|
||||||
|
License with respect to some or all of the Covered Code due to
|
||||||
|
statute, judicial order, or regulation then You must: (a) comply with
|
||||||
|
the terms of this License to the maximum extent possible; and (b)
|
||||||
|
describe the limitations and the code they affect. Such description
|
||||||
|
must be included in the LEGAL file described in Section 3.4 and must
|
||||||
|
be included with all distributions of the Source Code. Except to the
|
||||||
|
extent prohibited by statute or regulation, such description must be
|
||||||
|
sufficiently detailed for a recipient of ordinary skill to be able to
|
||||||
|
understand it.
|
||||||
|
|
||||||
|
5. Application of this License.
|
||||||
|
|
||||||
|
This License applies to code to which the Initial Developer has
|
||||||
|
attached the notice in Exhibit A and to related Covered Code.
|
||||||
|
|
||||||
|
6. Versions of the License.
|
||||||
|
|
||||||
|
6.1. New Versions.
|
||||||
|
Netscape Communications Corporation ("Netscape") may publish revised
|
||||||
|
and/or new versions of the License from time to time. Each version
|
||||||
|
will be given a distinguishing version number.
|
||||||
|
|
||||||
|
6.2. Effect of New Versions.
|
||||||
|
Once Covered Code has been published under a particular version of the
|
||||||
|
License, You may always continue to use it under the terms of that
|
||||||
|
version. You may also choose to use such Covered Code under the terms
|
||||||
|
of any subsequent version of the License published by Netscape. No one
|
||||||
|
other than Netscape has the right to modify the terms applicable to
|
||||||
|
Covered Code created under this License.
|
||||||
|
|
||||||
|
6.3. Derivative Works.
|
||||||
|
If You create or use a modified version of this License (which you may
|
||||||
|
only do in order to apply it to code which is not already Covered Code
|
||||||
|
governed by this License), You must (a) rename Your license so that
|
||||||
|
the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
|
||||||
|
"MPL", "NPL" or any confusingly similar phrase do not appear in your
|
||||||
|
license (except to note that your license differs from this License)
|
||||||
|
and (b) otherwise make it clear that Your version of the license
|
||||||
|
contains terms which differ from the Mozilla Public License and
|
||||||
|
Netscape Public License. (Filling in the name of the Initial
|
||||||
|
Developer, Original Code or Contributor in the notice described in
|
||||||
|
Exhibit A shall not of themselves be deemed to be modifications of
|
||||||
|
this License.)
|
||||||
|
|
||||||
|
7. DISCLAIMER OF WARRANTY.
|
||||||
|
|
||||||
|
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
||||||
|
WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
|
||||||
|
DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
|
||||||
|
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
|
||||||
|
IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
|
||||||
|
YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
|
||||||
|
COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
|
||||||
|
OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
|
||||||
|
ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||||
|
|
||||||
|
8. TERMINATION.
|
||||||
|
|
||||||
|
8.1. This License and the rights granted hereunder will terminate
|
||||||
|
automatically if You fail to comply with terms herein and fail to cure
|
||||||
|
such breach within 30 days of becoming aware of the breach. All
|
||||||
|
sublicenses to the Covered Code which are properly granted shall
|
||||||
|
survive any termination of this License. Provisions which, by their
|
||||||
|
nature, must remain in effect beyond the termination of this License
|
||||||
|
shall survive.
|
||||||
|
|
||||||
|
8.2. If You initiate litigation by asserting a patent infringement
|
||||||
|
claim (excluding declatory judgment actions) against Initial Developer
|
||||||
|
or a Contributor (the Initial Developer or Contributor against whom
|
||||||
|
You file such action is referred to as "Participant") alleging that:
|
||||||
|
|
||||||
|
(a) such Participant's Contributor Version directly or indirectly
|
||||||
|
infringes any patent, then any and all rights granted by such
|
||||||
|
Participant to You under Sections 2.1 and/or 2.2 of this License
|
||||||
|
shall, upon 60 days notice from Participant terminate prospectively,
|
||||||
|
unless if within 60 days after receipt of notice You either: (i)
|
||||||
|
agree in writing to pay Participant a mutually agreeable reasonable
|
||||||
|
royalty for Your past and future use of Modifications made by such
|
||||||
|
Participant, or (ii) withdraw Your litigation claim with respect to
|
||||||
|
the Contributor Version against such Participant. If within 60 days
|
||||||
|
of notice, a reasonable royalty and payment arrangement are not
|
||||||
|
mutually agreed upon in writing by the parties or the litigation claim
|
||||||
|
is not withdrawn, the rights granted by Participant to You under
|
||||||
|
Sections 2.1 and/or 2.2 automatically terminate at the expiration of
|
||||||
|
the 60 day notice period specified above.
|
||||||
|
|
||||||
|
(b) any software, hardware, or device, other than such Participant's
|
||||||
|
Contributor Version, directly or indirectly infringes any patent, then
|
||||||
|
any rights granted to You by such Participant under Sections 2.1(b)
|
||||||
|
and 2.2(b) are revoked effective as of the date You first made, used,
|
||||||
|
sold, distributed, or had made, Modifications made by that
|
||||||
|
Participant.
|
||||||
|
|
||||||
|
8.3. If You assert a patent infringement claim against Participant
|
||||||
|
alleging that such Participant's Contributor Version directly or
|
||||||
|
indirectly infringes any patent where such claim is resolved (such as
|
||||||
|
by license or settlement) prior to the initiation of patent
|
||||||
|
infringement litigation, then the reasonable value of the licenses
|
||||||
|
granted by such Participant under Sections 2.1 or 2.2 shall be taken
|
||||||
|
into account in determining the amount or value of any payment or
|
||||||
|
license.
|
||||||
|
|
||||||
|
8.4. In the event of termination under Sections 8.1 or 8.2 above,
|
||||||
|
all end user license agreements (excluding distributors and resellers)
|
||||||
|
which have been validly granted by You or any distributor hereunder
|
||||||
|
prior to termination shall survive termination.
|
||||||
|
|
||||||
|
9. LIMITATION OF LIABILITY.
|
||||||
|
|
||||||
|
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
|
||||||
|
(INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
|
||||||
|
DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
|
||||||
|
OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
|
||||||
|
ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
|
||||||
|
CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
|
||||||
|
WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
|
||||||
|
COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
|
||||||
|
INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
|
||||||
|
LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
|
||||||
|
RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
|
||||||
|
PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
|
||||||
|
EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
|
||||||
|
THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||||
|
|
||||||
|
10. U.S. GOVERNMENT END USERS.
|
||||||
|
|
||||||
|
The Covered Code is a "commercial item," as that term is defined in
|
||||||
|
48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
|
||||||
|
software" and "commercial computer software documentation," as such
|
||||||
|
terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
|
||||||
|
C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
|
||||||
|
all U.S. Government End Users acquire Covered Code with only those
|
||||||
|
rights set forth herein.
|
||||||
|
|
||||||
|
11. MISCELLANEOUS.
|
||||||
|
|
||||||
|
This License represents the complete agreement concerning subject
|
||||||
|
matter hereof. If any provision of this License is held to be
|
||||||
|
unenforceable, such provision shall be reformed only to the extent
|
||||||
|
necessary to make it enforceable. This License shall be governed by
|
||||||
|
California law provisions (except to the extent applicable law, if
|
||||||
|
any, provides otherwise), excluding its conflict-of-law provisions.
|
||||||
|
With respect to disputes in which at least one party is a citizen of,
|
||||||
|
or an entity chartered or registered to do business in the United
|
||||||
|
States of America, any litigation relating to this License shall be
|
||||||
|
subject to the jurisdiction of the Federal Courts of the Northern
|
||||||
|
District of California, with venue lying in Santa Clara County,
|
||||||
|
California, with the losing party responsible for costs, including
|
||||||
|
without limitation, court costs and reasonable attorneys' fees and
|
||||||
|
expenses. The application of the United Nations Convention on
|
||||||
|
Contracts for the International Sale of Goods is expressly excluded.
|
||||||
|
Any law or regulation which provides that the language of a contract
|
||||||
|
shall be construed against the drafter shall not apply to this
|
||||||
|
License.
|
||||||
|
|
||||||
|
12. RESPONSIBILITY FOR CLAIMS.
|
||||||
|
|
||||||
|
As between Initial Developer and the Contributors, each party is
|
||||||
|
responsible for claims and damages arising, directly or indirectly,
|
||||||
|
out of its utilization of rights under this License and You agree to
|
||||||
|
work with Initial Developer and Contributors to distribute such
|
||||||
|
responsibility on an equitable basis. Nothing herein is intended or
|
||||||
|
shall be deemed to constitute any admission of liability.
|
||||||
|
|
||||||
|
13. MULTIPLE-LICENSED CODE.
|
||||||
|
|
||||||
|
Initial Developer may designate portions of the Covered Code as
|
||||||
|
"Multiple-Licensed". "Multiple-Licensed" means that the Initial
|
||||||
|
Developer permits you to utilize portions of the Covered Code under
|
||||||
|
Your choice of the NPL or the alternative licenses, if any, specified
|
||||||
|
by the Initial Developer in the file described in Exhibit A.
|
||||||
|
|
||||||
|
EXHIBIT A -Mozilla Public License.
|
||||||
|
|
||||||
|
``The contents of this file are subject to the Mozilla Public License
|
||||||
|
Version 1.1 (the "License"); you may not use this file except in
|
||||||
|
compliance with the License. You may obtain a copy of the License at
|
||||||
|
http://www.mozilla.org/MPL/
|
||||||
|
|
||||||
|
Software distributed under the License is distributed on an "AS IS"
|
||||||
|
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||||
|
License for the specific language governing rights and limitations
|
||||||
|
under the License.
|
||||||
|
|
||||||
|
The Original Code is RabbitMQ.
|
||||||
|
|
||||||
|
The Initial Developer of the Original Code is GoPivotal, Inc.
|
||||||
|
Copyright (c) 2007-2015 Pivotal Software, Inc. All rights reserved.''
|
||||||
|
|
||||||
|
[NOTE: The text of this Exhibit A may differ slightly from the text of
|
||||||
|
the notices in the Source Code files of the Original Code. You should
|
||||||
|
use the text of this Exhibit A rather than the text found in the
|
||||||
|
Original Code Source Code for Your Modifications.]
|
|
@ -0,0 +1,3 @@
|
||||||
|
/debian/postrm
|
||||||
|
/debian/stamp-makefile-build
|
||||||
|
/rabbitmq-server_*
|
|
@ -0,0 +1,57 @@
|
||||||
|
SOURCE_DIST_FILE ?= $(wildcard ../../../rabbitmq-server-*.tar.xz)
|
||||||
|
|
||||||
|
ifneq ($(filter-out clean,$(MAKECMDGOALS)),)
|
||||||
|
ifeq ($(SOURCE_DIST_FILE),)
|
||||||
|
$(error Cannot find source archive; please specify SOURCE_DIST_FILE)
|
||||||
|
endif
|
||||||
|
ifneq ($(words $(SOURCE_DIST_FILE)),1)
|
||||||
|
$(error Multile source archives found; please specify SOURCE_DIST_FILE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
VERSION ?= $(patsubst rabbitmq-server-%.tar.xz,%,$(notdir $(SOURCE_DIST_FILE)))
|
||||||
|
ifeq ($(VERSION),)
|
||||||
|
$(error Cannot determine version; please specify VERSION)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
DEBIAN_ORIG_TARBALL = rabbitmq-server_$(VERSION).orig.tar.xz
|
||||||
|
UNPACKED_DIR = rabbitmq-server-$(VERSION)
|
||||||
|
PACKAGENAME = rabbitmq-server
|
||||||
|
|
||||||
|
ifneq "$(UNOFFICIAL_RELEASE)" ""
|
||||||
|
SIGNING=-us -uc
|
||||||
|
else
|
||||||
|
SIGNING=-k$(SIGNING_KEY)
|
||||||
|
endif
|
||||||
|
|
||||||
|
unexport DEPS_DIR
|
||||||
|
unexport ERL_LIBS
|
||||||
|
|
||||||
|
all: package
|
||||||
|
@:
|
||||||
|
|
||||||
|
package: clean
|
||||||
|
cp -a $(SOURCE_DIST_FILE) $(DEBIAN_ORIG_TARBALL)
|
||||||
|
xzcat $(DEBIAN_ORIG_TARBALL) | tar -xf -
|
||||||
|
cp -a debian $(UNPACKED_DIR)
|
||||||
|
rsync -a \
|
||||||
|
--exclude '.sw?' --exclude '.*.sw?' \
|
||||||
|
--exclude '.git*' \
|
||||||
|
--delete --delete-excluded \
|
||||||
|
debian/ $(UNPACKED_DIR)/debian/
|
||||||
|
UNOFFICIAL_RELEASE=$(UNOFFICIAL_RELEASE) VERSION=$(VERSION) ./check-changelog.sh rabbitmq-server $(UNPACKED_DIR)
|
||||||
|
cd $(UNPACKED_DIR); GNUPGHOME=$(GNUPG_PATH)/.gnupg dpkg-buildpackage -sa $(SIGNING)
|
||||||
|
rm -rf $(UNPACKED_DIR)
|
||||||
|
|
||||||
|
if test "$(PACKAGES_DIR)"; then \
|
||||||
|
mkdir -p "$(PACKAGES_DIR)"; \
|
||||||
|
mv $(PACKAGENAME)_$(VERSION)* "$(PACKAGES_DIR)"; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(UNPACKED_DIR)
|
||||||
|
rm -f $(DEBIAN_ORIG_TARBALL)
|
||||||
|
rm -f $(PACKAGENAME)_*.debian.tar.gz
|
||||||
|
rm -f $(PACKAGENAME)_*.dsc
|
||||||
|
rm -f $(PACKAGENAME)_*_*.changes
|
||||||
|
rm -f $(PACKAGENAME)_*_*.deb
|
|
@ -0,0 +1,9 @@
|
||||||
|
# This file contains additional comments for the debian/changelog to be
|
||||||
|
# appended within the current version's changelog entry.
|
||||||
|
# Each line will be a separate comment. Do not begin with an *, dch will
|
||||||
|
# add that.
|
||||||
|
# For comments longer than one line do not put a line break and dch will
|
||||||
|
# neatly format it.
|
||||||
|
# Shell comments are ignored.
|
||||||
|
#
|
||||||
|
Changed Uploaders from Emile Joubert to Blair Hester
|
|
@ -0,0 +1,11 @@
|
||||||
|
# This file contains additional comments for the debian/changelog to be
|
||||||
|
# appended within the current version's changelog entry.
|
||||||
|
# Each line will be a separate comment. Do not begin with an *, dch will
|
||||||
|
# add that.
|
||||||
|
# For comments longer than one line do not put a line break and dch will
|
||||||
|
# neatly format it.
|
||||||
|
# Shell comments are ignored.
|
||||||
|
#
|
||||||
|
# Examples:
|
||||||
|
#Remove parts made of undercooked chicken
|
||||||
|
#This is a long line which is the beginning of a long two line comment which I am sure is going to be needed if the script cannot handle it
|
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PACKAGE_NAME=$1
|
||||||
|
cd $2
|
||||||
|
|
||||||
|
CHANGELOG_VERSION=$(dpkg-parsechangelog | sed -n 's/^Version: \(.*\)-[^-]*$/\1/p')
|
||||||
|
|
||||||
|
if [ "${CHANGELOG_VERSION}" != "${VERSION}" ]; then
|
||||||
|
if [ -n "${UNOFFICIAL_RELEASE}" ]; then
|
||||||
|
echo "${PACKAGE_NAME} (${VERSION}-1) unstable; urgency=low" > debian/changelog.tmp
|
||||||
|
echo >> debian/changelog.tmp
|
||||||
|
echo " * Unofficial release" >> debian/changelog.tmp
|
||||||
|
echo >> debian/changelog.tmp
|
||||||
|
echo " -- Nobody <nobody@example.com> $(date -R)" >> debian/changelog.tmp
|
||||||
|
echo >> debian/changelog.tmp
|
||||||
|
cat debian/changelog >> debian/changelog.tmp
|
||||||
|
mv -f debian/changelog.tmp debian/changelog
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo
|
||||||
|
echo There is no entry in debian/changelog for version ${VERSION}!
|
||||||
|
echo Please create a changelog entry, or set the variable
|
||||||
|
echo UNOFFICIAL_RELEASE to automatically create one.
|
||||||
|
echo
|
||||||
|
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
|
@ -0,0 +1,427 @@
|
||||||
|
rabbitmq-server (3.6.5-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Michael Klishin <michael@rabbitmq.com> Fri, 05 Aug 2016 14:20:47 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.6.4-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Michael Klishin <michael@rabbitmq.com> Fri, 29 Jul 2016 11:40:53 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.6.3-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Michael Klishin <michael@rabbitmq.com> Wed, 06 Jul 2016 19:19:21 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.6.2-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Michael Klishin <michael@rabbitmq.com> Thu, 19 May 2016 09:20:06 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.6.1-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Michael Klishin <michael@rabbitmq.com> Tue, 01 Mar 2016 13:19:57 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (3.6.0-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Michael Klishin <michael@rabbitmq.com> Tue, 22 Dec 2015 13:21:56 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (3.5.7-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Michael Klishin <michael@rabbitmq.com> Tue, 15 Dec 2015 10:10:46 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (3.5.6-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Michael Klishin <michael@rabbitmq.com> Wed, 07 Oct 2015 13:31:24 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.5.5-3) unstable; urgency=low
|
||||||
|
|
||||||
|
* Fix bashism in rabbitmq-script-wrapper
|
||||||
|
|
||||||
|
-- Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> Thu, 24 Sep 2015 19:18:17 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.5.5-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> Thu, 24 Sep 2015 10:57:25 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.5.4-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Michael Klishin <michael@rabbitmq.com> Tue, 21 Jul 2015 20:25:48 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.5.3-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> Fri, 22 May 2015 11:04:17 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.5.2-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> Tue, 12 May 2015 16:21:44 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.5.1-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Michael Klishin <michael@rabbitmq.com> Thu, 02 Apr 2015 10:17:30 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.5.0-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> Wed, 11 Mar 2015 13:56:19 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (3.4.4-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Michael Klishin <michael@rabbitmq.com> Wed, 11 Feb 2015 12:05:01 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (3.4.3-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> Tue, 06 Jan 2015 15:58:45 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (3.4.2-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Wed, 26 Nov 2014 12:11:12 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (3.4.1-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Wed, 29 Oct 2014 13:31:10 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (3.4.0-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Tue, 21 Oct 2014 14:21:36 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.3.5-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
* Changed Uploaders from Emile Joubert to Blair Hester
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Mon, 11 Aug 2014 12:23:31 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.3.4-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Tue, 24 Jun 2014 12:50:29 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.3.3-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Mon, 16 Jun 2014 13:00:00 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.3.2-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Mon, 09 Jun 2014 10:25:22 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.3.1-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Tue, 29 Apr 2014 11:49:23 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.3.0-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Wed, 02 Apr 2014 14:23:14 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.2.4-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Mon, 03 Mar 2014 14:50:18 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (3.2.3-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Emile Joubert <emile@rabbitmq.com> Thu, 23 Jan 2014 14:46:37 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (3.2.2-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Emile Joubert <emile@rabbitmq.com> Tue, 10 Dec 2013 16:08:08 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (3.2.0-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Emile Joubert <emile@rabbitmq.com> Wed, 23 Oct 2013 12:44:10 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.1.5-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Thu, 15 Aug 2013 11:03:13 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.1.3-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Tim Watson <tim@rabbitmq.com> Tue, 25 Jun 2013 15:01:12 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.1.2-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Tim Watson <tim@rabbitmq.com> Mon, 24 Jun 2013 11:16:41 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.1.1-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Test release
|
||||||
|
|
||||||
|
-- Tim Watson <tim@rabbitmq.com> Mon, 20 May 2013 16:21:20 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.1.0-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Wed, 01 May 2013 11:57:58 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (3.0.1-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Tue, 11 Dec 2012 11:29:55 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (3.0.0-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Fri, 16 Nov 2012 14:15:29 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (2.7.1-1) natty; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Steve Powell <steve@rabbitmq.com> Fri, 16 Dec 2011 12:12:36 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (2.7.0-1) natty; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Steve Powell <steve@rabbitmq.com> Tue, 08 Nov 2011 16:47:50 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (2.6.1-1) natty; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Tim <tim@rabbitmq.com> Fri, 09 Sep 2011 14:38:45 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (2.6.0-1) natty; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Tim <tim@rabbitmq.com> Fri, 26 Aug 2011 16:29:40 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (2.5.1-1) lucid; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Mon, 27 Jun 2011 11:21:49 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (2.5.0-1) lucid; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- <jerryk@vmware.com> Thu, 09 Jun 2011 07:20:29 -0700
|
||||||
|
|
||||||
|
rabbitmq-server (2.4.1-1) lucid; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Alexandru Scvortov <alexandru@rabbitmq.com> Thu, 07 Apr 2011 16:49:22 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (2.4.0-1) lucid; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Alexandru Scvortov <alexandru@rabbitmq.com> Tue, 22 Mar 2011 17:34:31 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (2.3.1-1) lucid; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Thu, 03 Feb 2011 12:43:56 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (2.3.0-1) lucid; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@rabbitmq.com> Tue, 01 Feb 2011 12:52:16 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (2.2.0-1) lucid; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Rob Harrop <rob@rabbitmq.com> Mon, 29 Nov 2010 12:24:48 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (2.1.1-1) lucid; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Vlad Alexandru Ionescu <vlad@rabbitmq.com> Tue, 19 Oct 2010 17:20:10 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (2.1.0-1) lucid; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Marek Majkowski <marek@rabbitmq.com> Tue, 14 Sep 2010 14:20:17 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (2.0.0-1) karmic; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Michael Bridgen <mikeb@rabbitmq.com> Mon, 23 Aug 2010 14:55:39 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (1.8.1-1) lucid; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Emile Joubert <emile@rabbitmq.com> Wed, 14 Jul 2010 15:05:24 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (1.8.0-1) intrepid; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Matthew Sackman <matthew@rabbitmq.com> Tue, 15 Jun 2010 12:48:48 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (1.7.2-1) intrepid; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Matthew Sackman <matthew@lshift.net> Mon, 15 Feb 2010 15:54:47 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (1.7.1-1) intrepid; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Matthew Sackman <matthew@lshift.net> Fri, 22 Jan 2010 14:14:29 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (1.7.0-1) intrepid; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- David Wragg <dpw@lshift.net> Mon, 05 Oct 2009 13:44:41 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (1.6.0-1) hardy; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Matthias Radestock <matthias@lshift.net> Tue, 16 Jun 2009 15:02:58 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (1.5.5-1) hardy; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Matthias Radestock <matthias@lshift.net> Tue, 19 May 2009 09:57:54 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (1.5.4-1) hardy; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Matthias Radestock <matthias@lshift.net> Mon, 06 Apr 2009 09:19:32 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (1.5.3-1) hardy; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Tony Garnock-Jones <tonyg@lshift.net> Tue, 24 Feb 2009 18:23:33 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (1.5.2-1) hardy; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Tony Garnock-Jones <tonyg@lshift.net> Mon, 23 Feb 2009 16:03:38 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (1.5.1-1) hardy; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@lshift.net> Mon, 19 Jan 2009 15:46:13 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (1.5.0-1) testing; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Matthias Radestock <matthias@lshift.net> Wed, 17 Dec 2008 18:23:47 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (1.4.0-1) testing; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Tony Garnock-Jones <tonyg@lshift.net> Thu, 24 Jul 2008 13:21:48 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (1.3.0-1) testing; urgency=low
|
||||||
|
|
||||||
|
* New Upstream Release
|
||||||
|
|
||||||
|
-- Adrien Pierard <adrien@lshift.net> Mon, 03 Mar 2008 15:34:38 +0000
|
||||||
|
|
||||||
|
rabbitmq-server (1.2.0-2) testing; urgency=low
|
||||||
|
|
||||||
|
* Fixed rabbitmqctl wrapper script
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@lshift.net> Fri, 05 Oct 2007 11:55:00 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (1.2.0-1) testing; urgency=low
|
||||||
|
|
||||||
|
* New upstream release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@lshift.net> Wed, 26 Sep 2007 11:49:26 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (1.1.1-1) testing; urgency=low
|
||||||
|
|
||||||
|
* New upstream release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@lshift.net> Wed, 29 Aug 2007 12:03:15 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (1.1.0-alpha-2) testing; urgency=low
|
||||||
|
|
||||||
|
* Fixed erlang-nox dependency
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@lshift.net> Thu, 02 Aug 2007 11:27:13 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (1.1.0-alpha-1) testing; urgency=low
|
||||||
|
|
||||||
|
* New upstream release
|
||||||
|
|
||||||
|
-- Simon MacMullen <simon@lshift.net> Fri, 20 Jul 2007 18:17:33 +0100
|
||||||
|
|
||||||
|
rabbitmq-server (1.0.0-alpha-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* Initial release
|
||||||
|
|
||||||
|
-- Tony Garnock-Jones <tonyg@shortstop.lshift.net> Wed, 31 Jan 2007 19:06:33 +0000
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
9
|
|
@ -0,0 +1,24 @@
|
||||||
|
Source: rabbitmq-server
|
||||||
|
Section: net
|
||||||
|
Priority: extra
|
||||||
|
Maintainer: RabbitMQ Team <info@rabbitmq.com>
|
||||||
|
Uploaders: Michael Klishin <michael@rabbitmq.com>,
|
||||||
|
Karl Nilsson <knilsson@rabbitmq.com>,
|
||||||
|
Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com>
|
||||||
|
Build-Depends: debhelper (>= 9),
|
||||||
|
dh-systemd (>= 1.5),
|
||||||
|
erlang-dev,
|
||||||
|
python-simplejson,
|
||||||
|
xmlto,
|
||||||
|
xsltproc,
|
||||||
|
erlang-nox (>= 1:16.b.3) | esl-erlang,
|
||||||
|
zip,
|
||||||
|
rsync
|
||||||
|
Standards-Version: 3.9.4
|
||||||
|
|
||||||
|
Package: rabbitmq-server
|
||||||
|
Architecture: all
|
||||||
|
Depends: erlang-nox (>= 1:16.b.3) | esl-erlang, adduser, logrotate, socat, init-system-helpers (>= 1.13~)
|
||||||
|
Description: Multi-protocol messaging broker
|
||||||
|
RabbitMQ is an open source multi-protocol messaging broker.
|
||||||
|
Homepage: http://www.rabbitmq.com/
|
|
@ -0,0 +1,52 @@
|
||||||
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: rabbitmq-server
|
||||||
|
Upstream-Contact: Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com>
|
||||||
|
Source: https://github.com/rabbitmq/rabbitmq-server
|
||||||
|
|
||||||
|
Files: *
|
||||||
|
Copyright: 2007-2015 Pivotal Software, Inc.
|
||||||
|
License: MPL-1.1
|
||||||
|
|
||||||
|
Files: src/mochinum.erl deps/rabbit_common/src/mochijson2.erl
|
||||||
|
Copyright: 2007 Mochi Media, Inc.
|
||||||
|
License: MIT
|
||||||
|
|
||||||
|
License: MPL-1.1
|
||||||
|
The contents of this file are subject to the Mozilla Public License
|
||||||
|
Version 1.1 (the "License"); you may not use this file except in
|
||||||
|
compliance with the License. You may obtain a copy of the License at
|
||||||
|
http://www.mozilla.org/MPL/
|
||||||
|
.
|
||||||
|
Software distributed under the License is distributed on an "AS IS"
|
||||||
|
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||||
|
the License for the specific language governing rights and limitations
|
||||||
|
under the License
|
||||||
|
.
|
||||||
|
The Original Code is RabbitMQ
|
||||||
|
.
|
||||||
|
The Initial Developer of the Original Code is Pivotal Software, Inc.
|
||||||
|
Copyright (c) 2007-2015 Pivotal Software, Inc. All rights reserved.
|
||||||
|
|
||||||
|
License: MIT
|
||||||
|
This is the MIT license
|
||||||
|
.
|
||||||
|
Copyright (c) 2007 Mochi Media, Inc
|
||||||
|
.
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions
|
||||||
|
:
|
||||||
|
The above copyright notice and this permission notice shall be included
|
||||||
|
in all copies or substantial portions of the Software
|
||||||
|
.
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||||
|
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||||
|
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||||
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -0,0 +1,9 @@
|
||||||
|
usr/lib/rabbitmq/bin
|
||||||
|
usr/lib/erlang/lib
|
||||||
|
usr/sbin
|
||||||
|
usr/share/man
|
||||||
|
var/lib/rabbitmq/mnesia
|
||||||
|
var/log/rabbitmq
|
||||||
|
etc/logrotate.d
|
||||||
|
etc/rabbitmq
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# postinst script for rabbitmq
|
||||||
|
#
|
||||||
|
# see: dh_installdeb(1)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# summary of how this script can be called:
|
||||||
|
# * <postinst> `configure' <most-recently-configured-version>
|
||||||
|
# * <old-postinst> `abort-upgrade' <new version>
|
||||||
|
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||||
|
# <new-version>
|
||||||
|
# * <postinst> `abort-remove'
|
||||||
|
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||||
|
# <failed-install-package> <version> `removing'
|
||||||
|
# <conflicting-package> <version>
|
||||||
|
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||||
|
# the debian-policy package
|
||||||
|
|
||||||
|
|
||||||
|
# create rabbitmq group
|
||||||
|
if ! getent group rabbitmq >/dev/null; then
|
||||||
|
addgroup --system rabbitmq
|
||||||
|
fi
|
||||||
|
|
||||||
|
# create rabbitmq user
|
||||||
|
if ! getent passwd rabbitmq >/dev/null; then
|
||||||
|
adduser --system --ingroup rabbitmq --home /var/lib/rabbitmq \
|
||||||
|
--no-create-home --gecos "RabbitMQ messaging server" \
|
||||||
|
--disabled-login rabbitmq
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R rabbitmq:rabbitmq /var/lib/rabbitmq
|
||||||
|
chown -R rabbitmq:rabbitmq /var/log/rabbitmq
|
||||||
|
chmod 750 /var/lib/rabbitmq/mnesia
|
||||||
|
chmod -R o-rwx,g-w /var/lib/rabbitmq/mnesia
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
configure)
|
||||||
|
if [ -f /etc/rabbitmq/rabbitmq.conf ] && \
|
||||||
|
[ ! -f /etc/rabbitmq/rabbitmq-env.conf ]; then
|
||||||
|
mv /etc/rabbitmq/rabbitmq.conf /etc/rabbitmq/rabbitmq-env.conf
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "postinst called with unknown argument \`$1'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# dh_installdeb will replace this with shell code automatically
|
||||||
|
# generated by other debhelper scripts.
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# postrm script for rabbitmq
|
||||||
|
#
|
||||||
|
# see: dh_installdeb(1)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# summary of how this script can be called:
|
||||||
|
# * <postrm> `remove'
|
||||||
|
# * <postrm> `purge'
|
||||||
|
# * <old-postrm> `upgrade' <new-version>
|
||||||
|
# * <new-postrm> `failed-upgrade' <old-version>
|
||||||
|
# * <new-postrm> `abort-install'
|
||||||
|
# * <new-postrm> `abort-install' <old-version>
|
||||||
|
# * <new-postrm> `abort-upgrade' <old-version>
|
||||||
|
# * <disappearer's-postrm> `disappear' <overwriter>
|
||||||
|
# <overwriter-version>
|
||||||
|
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||||
|
# the debian-policy package
|
||||||
|
|
||||||
|
remove_plugin_traces() {
|
||||||
|
# Remove traces of plugins
|
||||||
|
rm -rf /var/lib/rabbitmq/plugins-scratch
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
purge)
|
||||||
|
rm -f /etc/default/rabbitmq
|
||||||
|
if [ -d /var/lib/rabbitmq ]; then
|
||||||
|
rm -r /var/lib/rabbitmq
|
||||||
|
fi
|
||||||
|
if [ -d /var/log/rabbitmq ]; then
|
||||||
|
rm -r /var/log/rabbitmq
|
||||||
|
fi
|
||||||
|
if [ -d /etc/rabbitmq ]; then
|
||||||
|
rm -r /etc/rabbitmq
|
||||||
|
fi
|
||||||
|
remove_plugin_traces
|
||||||
|
if getent passwd rabbitmq >/dev/null; then
|
||||||
|
# Stop epmd if run by the rabbitmq user
|
||||||
|
pkill -u rabbitmq epmd || :
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
remove|upgrade)
|
||||||
|
remove_plugin_traces
|
||||||
|
;;
|
||||||
|
|
||||||
|
failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "postrm called with unknown argument \`$1'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# dh_installdeb will replace this with shell code automatically
|
||||||
|
# generated by other debhelper scripts.
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
# This file is sourced by /etc/init.d/rabbitmq-server. Its primary
|
||||||
|
# reason for existing is to allow adjustment of system limits for the
|
||||||
|
# rabbitmq-server process.
|
||||||
|
#
|
||||||
|
# Maximum number of open file handles. This will need to be increased
|
||||||
|
# to handle many simultaneous connections. Refer to the system
|
||||||
|
# documentation for ulimit (in man bash) for more information.
|
||||||
|
#
|
||||||
|
#ulimit -n 1024
|
|
@ -0,0 +1,2 @@
|
||||||
|
docs/rabbitmq.config.example
|
||||||
|
docs/set_rabbitmq_policy.sh.example
|
|
@ -0,0 +1,191 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# rabbitmq-server RabbitMQ broker
|
||||||
|
#
|
||||||
|
# chkconfig: - 80 05
|
||||||
|
# description: Manages RabbitMQ server
|
||||||
|
#
|
||||||
|
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: rabbitmq-server
|
||||||
|
# Required-Start: $remote_fs $network
|
||||||
|
# Required-Stop: $remote_fs $network
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Description: RabbitMQ broker
|
||||||
|
# Short-Description: Manages RabbitMQ server
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
|
NAME=rabbitmq-server
|
||||||
|
DAEMON=/usr/sbin/${NAME}
|
||||||
|
CONTROL=/usr/sbin/rabbitmqctl
|
||||||
|
DESC="message broker"
|
||||||
|
USER=rabbitmq
|
||||||
|
ROTATE_SUFFIX=
|
||||||
|
PID_FILE=/var/run/rabbitmq/pid
|
||||||
|
RABBITMQ_ENV=/usr/lib/rabbitmq/bin/rabbitmq-env
|
||||||
|
|
||||||
|
test -x $DAEMON || exit 0
|
||||||
|
test -x $CONTROL || exit 0
|
||||||
|
|
||||||
|
RETVAL=0
|
||||||
|
set -e
|
||||||
|
|
||||||
|
[ -f /etc/default/${NAME} ] && . /etc/default/${NAME}
|
||||||
|
|
||||||
|
RABBITMQ_SCRIPTS_DIR=$(dirname "$RABBITMQ_ENV")
|
||||||
|
. "$RABBITMQ_ENV"
|
||||||
|
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
. /lib/init/vars.sh
|
||||||
|
|
||||||
|
ensure_pid_dir () {
|
||||||
|
PID_DIR=`dirname ${PID_FILE}`
|
||||||
|
if [ ! -d ${PID_DIR} ] ; then
|
||||||
|
mkdir -p ${PID_DIR}
|
||||||
|
chown -R ${USER}:${USER} ${PID_DIR}
|
||||||
|
chmod 755 ${PID_DIR}
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
remove_pid () {
|
||||||
|
rm -f ${PID_FILE}
|
||||||
|
rmdir `dirname ${PID_FILE}` || :
|
||||||
|
}
|
||||||
|
|
||||||
|
start_rabbitmq () {
|
||||||
|
status_rabbitmq quiet
|
||||||
|
if [ $RETVAL != 0 ] ; then
|
||||||
|
RETVAL=0
|
||||||
|
ensure_pid_dir
|
||||||
|
set +e
|
||||||
|
RABBITMQ_PID_FILE=$PID_FILE start-stop-daemon --quiet \
|
||||||
|
--chuid rabbitmq --start --exec $DAEMON \
|
||||||
|
--pidfile "$PID_FILE" --background
|
||||||
|
$CONTROL wait $PID_FILE >/dev/null 2>&1
|
||||||
|
RETVAL=$?
|
||||||
|
set -e
|
||||||
|
if [ $RETVAL != 0 ] ; then
|
||||||
|
remove_pid
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
RETVAL=3
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
stop_rabbitmq () {
|
||||||
|
status_rabbitmq quiet
|
||||||
|
if [ $RETVAL = 0 ] ; then
|
||||||
|
set +e
|
||||||
|
$CONTROL stop ${PID_FILE} \
|
||||||
|
> ${RABBITMQ_LOG_BASE}/shutdown_log \
|
||||||
|
2> ${RABBITMQ_LOG_BASE}/shutdown_err
|
||||||
|
RETVAL=$?
|
||||||
|
set -e
|
||||||
|
if [ $RETVAL = 0 ] ; then
|
||||||
|
remove_pid
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
RETVAL=3
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
status_rabbitmq() {
|
||||||
|
set +e
|
||||||
|
if [ "$1" != "quiet" ] ; then
|
||||||
|
$CONTROL status 2>&1
|
||||||
|
else
|
||||||
|
$CONTROL status > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
if [ $? != 0 ] ; then
|
||||||
|
RETVAL=3
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
}
|
||||||
|
|
||||||
|
rotate_logs_rabbitmq() {
|
||||||
|
set +e
|
||||||
|
$CONTROL -q rotate_logs ${ROTATE_SUFFIX}
|
||||||
|
if [ $? != 0 ] ; then
|
||||||
|
RETVAL=1
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
}
|
||||||
|
|
||||||
|
restart_running_rabbitmq () {
|
||||||
|
status_rabbitmq quiet
|
||||||
|
if [ $RETVAL = 0 ] ; then
|
||||||
|
restart_rabbitmq
|
||||||
|
else
|
||||||
|
log_warning_msg "${DESC} not running"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
restart_rabbitmq() {
|
||||||
|
stop_rabbitmq
|
||||||
|
start_rabbitmq
|
||||||
|
}
|
||||||
|
|
||||||
|
restart_end() {
|
||||||
|
if [ $RETVAL = 0 ] ; then
|
||||||
|
log_end_msg 0
|
||||||
|
else
|
||||||
|
log_end_msg 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_stop_end() {
|
||||||
|
case "$RETVAL" in
|
||||||
|
0)
|
||||||
|
[ -x /sbin/initctl ] && /sbin/initctl emit --no-wait "${NAME}-${1}"
|
||||||
|
log_end_msg 0
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
log_warning_msg "${DESC} already ${1}"
|
||||||
|
log_end_msg 0
|
||||||
|
RETVAL=0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
log_warning_msg "FAILED - check ${RABBITMQ_LOG_BASE}/startup_\{log, _err\}"
|
||||||
|
log_end_msg 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
log_daemon_msg "Starting ${DESC}" $NAME
|
||||||
|
start_rabbitmq
|
||||||
|
start_stop_end "running"
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
log_daemon_msg "Stopping ${DESC}" $NAME
|
||||||
|
stop_rabbitmq
|
||||||
|
start_stop_end "stopped"
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status_rabbitmq
|
||||||
|
;;
|
||||||
|
rotate-logs)
|
||||||
|
log_action_begin_msg "Rotating log files for ${DESC}: ${NAME}"
|
||||||
|
rotate_logs_rabbitmq
|
||||||
|
log_action_end_msg $RETVAL
|
||||||
|
;;
|
||||||
|
force-reload|reload|restart)
|
||||||
|
log_daemon_msg "Restarting ${DESC}" $NAME
|
||||||
|
restart_rabbitmq
|
||||||
|
restart_end
|
||||||
|
;;
|
||||||
|
try-restart)
|
||||||
|
log_daemon_msg "Restarting ${DESC}" $NAME
|
||||||
|
restart_running_rabbitmq
|
||||||
|
restart_end
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|status|rotate-logs|restart|condrestart|try-restart|reload|force-reload}" >&2
|
||||||
|
RETVAL=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $RETVAL
|
|
@ -0,0 +1,12 @@
|
||||||
|
/var/log/rabbitmq/*.log {
|
||||||
|
weekly
|
||||||
|
missingok
|
||||||
|
rotate 20
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
notifempty
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
/etc/init.d/rabbitmq-server rotate-logs > /dev/null
|
||||||
|
endscript
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
docs/rabbitmq-env.conf.5
|
||||||
|
docs/rabbitmq-plugins.1
|
||||||
|
docs/rabbitmq-server.1
|
||||||
|
docs/rabbitmqctl.1
|
|
@ -0,0 +1,18 @@
|
||||||
|
# systemd unit example
|
||||||
|
[Unit]
|
||||||
|
Description=RabbitMQ broker
|
||||||
|
After=network.target epmd@0.0.0.0.socket
|
||||||
|
Wants=network.target epmd@0.0.0.0.socket
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=notify
|
||||||
|
User=rabbitmq
|
||||||
|
Group=rabbitmq
|
||||||
|
NotifyAccess=all
|
||||||
|
TimeoutStartSec=3600
|
||||||
|
WorkingDirectory=/var/lib/rabbitmq
|
||||||
|
ExecStart=/usr/lib/rabbitmq/bin/rabbitmq-server
|
||||||
|
ExecStop=/usr/lib/rabbitmq/bin/rabbitmqctl stop
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,57 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
# -*- makefile -*-
|
||||||
|
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
|
DEB_DESTDIR = debian/rabbitmq-server
|
||||||
|
VERSION = $(shell dpkg-parsechangelog | awk '/^Version:/ {version=$$0; sub(/Version: /, "", version); sub(/-.*/, "", version); print version;}')
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --parallel --with systemd
|
||||||
|
|
||||||
|
override_dh_auto_clean:
|
||||||
|
$(MAKE) clean distclean-manpages
|
||||||
|
|
||||||
|
override_dh_auto_build:
|
||||||
|
$(MAKE) dist manpages
|
||||||
|
|
||||||
|
override_dh_auto_test:
|
||||||
|
@:
|
||||||
|
|
||||||
|
export PREFIX RMQ_ROOTDIR
|
||||||
|
|
||||||
|
override_dh_auto_install: PREFIX = /usr
|
||||||
|
override_dh_auto_install: RMQ_ROOTDIR = $(PREFIX)/lib/rabbitmq
|
||||||
|
override_dh_auto_install: RMQ_ERLAPP_DIR = $(RMQ_ROOTDIR)/lib/rabbitmq_server-$(VERSION)
|
||||||
|
override_dh_auto_install:
|
||||||
|
dh_auto_install
|
||||||
|
|
||||||
|
$(MAKE) install-bin DESTDIR=$(DEB_DESTDIR)
|
||||||
|
|
||||||
|
sed -e 's|@RABBIT_LIB@|$(RMQ_ERLAPP_DIR)|g' \
|
||||||
|
< debian/postrm.in > debian/postrm
|
||||||
|
|
||||||
|
sed -e 's|@SU_RABBITMQ_SH_C@|su rabbitmq -s /bin/sh -c|' \
|
||||||
|
-e 's|@STDOUT_STDERR_REDIRECTION@|> "$$RABBITMQ_LOG_BASE/startup_log" 2> "$$RABBITMQ_LOG_BASE/startup_err"|' \
|
||||||
|
< scripts/rabbitmq-script-wrapper \
|
||||||
|
> $(DEB_DESTDIR)$(PREFIX)/sbin/rabbitmqctl
|
||||||
|
chmod 0755 $(DEB_DESTDIR)$(PREFIX)/sbin/rabbitmqctl
|
||||||
|
for script in rabbitmq-server rabbitmq-plugins; do \
|
||||||
|
cp -a $(DEB_DESTDIR)$(PREFIX)/sbin/rabbitmqctl \
|
||||||
|
$(DEB_DESTDIR)$(PREFIX)/sbin/$$script; \
|
||||||
|
done
|
||||||
|
|
||||||
|
install -p -D -m 0644 debian/rabbitmq-server.default \
|
||||||
|
$(DEB_DESTDIR)/etc/default/rabbitmq-server
|
||||||
|
|
||||||
|
install -p -D -m 0755 scripts/rabbitmq-server.ocf \
|
||||||
|
$(DEB_DESTDIR)$(PREFIX)/lib/ocf/resource.d/rabbitmq/rabbitmq-server
|
||||||
|
install -p -D -m 0755 scripts/rabbitmq-server-ha.ocf \
|
||||||
|
$(DEB_DESTDIR)$(PREFIX)/lib/ocf/resource.d/rabbitmq/rabbitmq-server-ha
|
||||||
|
|
||||||
|
rm $(DEB_DESTDIR)$(RMQ_ERLAPP_DIR)/LICENSE* \
|
||||||
|
$(DEB_DESTDIR)$(RMQ_ERLAPP_DIR)/INSTALL
|
||||||
|
|
||||||
|
rmdir $(DEB_DESTDIR)$(PREFIX)/lib/erlang/lib \
|
||||||
|
$(DEB_DESTDIR)$(PREFIX)/lib/erlang
|
|
@ -0,0 +1 @@
|
||||||
|
3.0 (quilt)
|
|
@ -0,0 +1,4 @@
|
||||||
|
version=3
|
||||||
|
|
||||||
|
http://www.rabbitmq.com/releases/rabbitmq-server/v(.*)/rabbitmq-server-(\d.*)\.tar\.gz \
|
||||||
|
debian uupdate
|
|
@ -0,0 +1,31 @@
|
||||||
|
PACKAGES_DIR ?= ../../../PACKAGES
|
||||||
|
REPO_DIR ?= debian
|
||||||
|
|
||||||
|
SIGNING_KEY ?= default
|
||||||
|
|
||||||
|
ifeq "$(UNOFFICIAL_RELEASE)" ""
|
||||||
|
HOME_ARG = HOME=$(GNUPG_PATH)
|
||||||
|
endif
|
||||||
|
|
||||||
|
all: debian_apt_repository
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(REPO_DIR)
|
||||||
|
|
||||||
|
CAN_HAS_REPREPRO=$(shell [ -f /usr/bin/reprepro ] && echo true)
|
||||||
|
ifeq ($(CAN_HAS_REPREPRO), true)
|
||||||
|
debian_apt_repository: clean
|
||||||
|
mkdir -p $(REPO_DIR)/conf
|
||||||
|
cp -a distributions $(REPO_DIR)/conf
|
||||||
|
ifeq "$(UNOFFICIAL_RELEASE)" ""
|
||||||
|
echo SignWith: $(SIGNING_KEY) >> $(REPO_DIR)/conf/distributions
|
||||||
|
endif
|
||||||
|
for FILE in $(PACKAGES_DIR)/*.changes ; do \
|
||||||
|
$(HOME_ARG) reprepro --ignore=wrongdistribution \
|
||||||
|
-Vb $(REPO_DIR) include kitten $${FILE} ; \
|
||||||
|
done
|
||||||
|
reprepro -Vb $(REPO_DIR) createsymlinks
|
||||||
|
else
|
||||||
|
debian_apt_repository:
|
||||||
|
@echo Not building APT repository as reprepro could not be found
|
||||||
|
endif
|
|
@ -0,0 +1,17 @@
|
||||||
|
APT repository for RabbitMQ
|
||||||
|
|
||||||
|
Previously we've attempted to run a repository in the same way that
|
||||||
|
Debian would: have repository management software installed on the
|
||||||
|
server, and upload new packages to the repository as and when they're
|
||||||
|
ready.
|
||||||
|
|
||||||
|
This turned out to be both fiddly and annoying to do (and more
|
||||||
|
particularly to automate) so since our repository is always going to be
|
||||||
|
small it's easier just to create the entire repository as part of the
|
||||||
|
build process, just like a package. It can then be moved into place as a
|
||||||
|
single unit. The make target "debian_apt_repository" (invoked by "dist")
|
||||||
|
will create it, and it can get moved onto the server with the rest of
|
||||||
|
the packages.
|
||||||
|
|
||||||
|
Read "README-real-repository" for information on how we used to do
|
||||||
|
this.
|
|
@ -0,0 +1,130 @@
|
||||||
|
APT Repository for RabbitMQ in Debian
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
First, a note on what we're trying to do. We want a single "testing"
|
||||||
|
repository. When RabbitMQ is more stable we will also want a
|
||||||
|
"stable" repository. It is very important to understand that these refer
|
||||||
|
to the state of the rabbit code, *NOT* which Debian distribution they go
|
||||||
|
with. At the moment our dependencies are very simple so our packages can
|
||||||
|
be used with any current Debian version (etch, lenny, sid) as well as
|
||||||
|
with Ubuntu. So although we have a "testing" distribution, this is not
|
||||||
|
codenamed "lenny". Instead it's currently codenamed "kitten" since
|
||||||
|
that's a baby rabbit.
|
||||||
|
|
||||||
|
Secondly, a note on software. We need a tool to manage the repository,
|
||||||
|
and a tool to perform uploads to the repository. Debian being Debian
|
||||||
|
there are quite a few of each. We will use "reprepro" to manage the
|
||||||
|
repository since it's modern, maintained, and fairly simple. We will use
|
||||||
|
"dupload" to perform the uploads since it gives us the ability to run
|
||||||
|
arbitrary commands after the upload, which means we don't need to run a
|
||||||
|
cron job on the web server to process uploads.
|
||||||
|
|
||||||
|
Creating a repository
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Much of this was cribbed from:
|
||||||
|
http://www.debian-administration.org/articles/286
|
||||||
|
|
||||||
|
The repository is fundamentally just some files in a folder, served over
|
||||||
|
HTTP (or FTP etc). So let's make it "debian" in the root of
|
||||||
|
www.rabbitmq.com.
|
||||||
|
|
||||||
|
This means the repository will be at http://www.rabbitmq.com/debian/ and
|
||||||
|
can be added to a sources.list as:
|
||||||
|
|
||||||
|
deb http://www.rabbitmq.com/debian/ testing main
|
||||||
|
deb-src http://www.rabbitmq.com/debian/ testing main
|
||||||
|
|
||||||
|
Inside this folder we need a "conf" folder, and in
|
||||||
|
that we need a "distributions" configuration file - see the file in this
|
||||||
|
folder. Note that:
|
||||||
|
|
||||||
|
* We list all architectures so that people can install rabbitmq-server
|
||||||
|
on to anything.
|
||||||
|
* We don't list the "all" architecture even though we use it; it's
|
||||||
|
implied.
|
||||||
|
* We only have a "main" component, we could have non-free and contrib
|
||||||
|
here if it was relevant.
|
||||||
|
* We list the email address associated with the key we want to use to
|
||||||
|
sign the repository. Yes, even after signing packages we still want to
|
||||||
|
sign the repository.
|
||||||
|
|
||||||
|
We're now ready to go. Assuming the path to our repository is /path,
|
||||||
|
(and hence configuration is in /path/conf) we can upload a file to the
|
||||||
|
repository (creating it in the process) by doing something like this on
|
||||||
|
the repository host:
|
||||||
|
|
||||||
|
$ reprepro --ignore=wrongdistribution -Vb /path include kitten \
|
||||||
|
rabbitmq-server_1.0.0-alpha-1_i386.changes
|
||||||
|
|
||||||
|
Note that we upload to the distribution "kitten" rather than "testing".
|
||||||
|
We also pass --ignore=wrongdistribution since the current packages are
|
||||||
|
built to go in "unstable" (this will be changed obviously).
|
||||||
|
|
||||||
|
Note also that the .changes file claims to be for i386 even though the
|
||||||
|
package is for architecture "all". This is a bug in debhelper.
|
||||||
|
|
||||||
|
Finally, if you've just created a repository, you want to run:
|
||||||
|
|
||||||
|
$ reprepro -Vb /path createsymlinks
|
||||||
|
|
||||||
|
since this will create "kitten" -> "testing" symlinks. You only need to
|
||||||
|
do this once.
|
||||||
|
|
||||||
|
Removing packages
|
||||||
|
=================
|
||||||
|
|
||||||
|
Fairly simple:
|
||||||
|
|
||||||
|
$ reprepro --ignore=wrongdistribution -Vb /path remove kitten \
|
||||||
|
rabbitmq-server
|
||||||
|
|
||||||
|
Subsequent updates and "dupload"
|
||||||
|
================================
|
||||||
|
|
||||||
|
You can run the "reprepro" command above again to update the versions of
|
||||||
|
software in the repository. Since we probably don't want to have to log
|
||||||
|
into the machine in question to do this, we can use "dupload". This is a
|
||||||
|
tool which uploads Debian packages. The supplied file "dupload.conf" can
|
||||||
|
be renamed to ~/.dupload.conf. If you then run:
|
||||||
|
|
||||||
|
$ dupload -to rabbit --nomail .
|
||||||
|
|
||||||
|
in the folder with the .changes file, dupload will:
|
||||||
|
|
||||||
|
* create an incoming folder in your home directory on the repository
|
||||||
|
machine
|
||||||
|
* upload everything there
|
||||||
|
* run reprepro to move the packages into the repository
|
||||||
|
* "rm -rf" the uploads folder
|
||||||
|
|
||||||
|
This is a bit cheesy but should be enough for our purposes. The
|
||||||
|
dupload.conf uses scp and ssh so you need a public-key login (or type
|
||||||
|
your password lots).
|
||||||
|
|
||||||
|
There's still an open question as to whether dupload is really needed
|
||||||
|
for our case.
|
||||||
|
|
||||||
|
Keys and signing
|
||||||
|
================
|
||||||
|
|
||||||
|
We currently sign the package as we build it; but we also need to sign
|
||||||
|
the repository. The key is currently on my machine (mrforgetful) and has
|
||||||
|
ID 056E8E56. We should put it on CDs though.
|
||||||
|
|
||||||
|
reprepro will automatically sign the repository if we have the right
|
||||||
|
SignWith line in the configuration, AND the secret key is installed on
|
||||||
|
the repository server. This is obviously not ideal; not sure what the
|
||||||
|
solution is right now.
|
||||||
|
|
||||||
|
You can export the public key with:
|
||||||
|
|
||||||
|
$ gpg --export --armor 056E8E56 > rabbit.pub
|
||||||
|
|
||||||
|
(Open question: do we want to get our key on subkeys.pgp.net?)
|
||||||
|
|
||||||
|
We can then add this key to the website and tell our users to import the
|
||||||
|
key into apt with:
|
||||||
|
|
||||||
|
# apt-key add rabbit.pub
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
Origin: RabbitMQ
|
||||||
|
Label: RabbitMQ Repository for Debian / Ubuntu etc
|
||||||
|
Suite: testing
|
||||||
|
Codename: kitten
|
||||||
|
Architectures: AVR32 alpha amd64 arm armel armhf hppa hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 m32 m68k mips mipsel netbsd-alpha netbsd-i386 powerpc s390 s390x sh sparc source
|
||||||
|
Components: main
|
||||||
|
Description: RabbitMQ Repository for Debian / Ubuntu etc
|
|
@ -0,0 +1,16 @@
|
||||||
|
package config;
|
||||||
|
|
||||||
|
$rabbit_user = "simon";
|
||||||
|
$rabbit_host = "mrforgetful.lshift.net";
|
||||||
|
$rabbit_repo_path = "/srv/debian";
|
||||||
|
$rabbit_reprepro_extra_args = "--ignore=wrongdistribution";
|
||||||
|
|
||||||
|
$cfg{'rabbit'} = {
|
||||||
|
fqdn => "$rabbit_host",
|
||||||
|
login => "$rabbit_user",
|
||||||
|
method => "scp",
|
||||||
|
incoming => "incoming",
|
||||||
|
};
|
||||||
|
|
||||||
|
$preupload{'deb'} = "ssh ${rabbit_host} mkdir incoming";
|
||||||
|
$postupload{'deb'} = "ssh ${rabbit_host} \"cd incoming && reprepro ${$rabbit_reprepro_extra_args} -Vb ${rabbit_repo_path} include kitten *.changes && cd .. && rm -r incoming\"";
|
|
@ -0,0 +1,58 @@
|
||||||
|
SOURCE_DIST_FILE ?= $(wildcard ../../../rabbitmq-server-*.tar.xz)
|
||||||
|
|
||||||
|
ifneq ($(filter-out clean,$(MAKECMDGOALS)),)
|
||||||
|
ifeq ($(SOURCE_DIST_FILE),)
|
||||||
|
$(error Cannot find source archive; please specify SOURCE_DIST_FILE)
|
||||||
|
endif
|
||||||
|
ifneq ($(words $(SOURCE_DIST_FILE)),1)
|
||||||
|
$(error Multile source archives found; please specify SOURCE_DIST_FILE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
VERSION ?= $(patsubst rabbitmq-server-%.tar.xz,%,$(notdir $(SOURCE_DIST_FILE)))
|
||||||
|
ifeq ($(VERSION),)
|
||||||
|
$(error Cannot determine version; please specify VERSION)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
SOURCE_DIR = rabbitmq-server-$(VERSION)
|
||||||
|
TARGET_DIR = rabbitmq_server-$(VERSION)
|
||||||
|
TARGET_TARBALL = rabbitmq-server-generic-unix-$(VERSION)
|
||||||
|
|
||||||
|
unexport DEPS_DIR
|
||||||
|
unexport ERL_LIBS
|
||||||
|
|
||||||
|
all: dist
|
||||||
|
@:
|
||||||
|
|
||||||
|
dist:
|
||||||
|
xzcat $(SOURCE_DIST_FILE) | tar -xf -
|
||||||
|
|
||||||
|
# web-manpages are not used by generic-unix but by `make release` in the.
|
||||||
|
# Umbrella. Those manpages are copied to www.rabbitmq.com
|
||||||
|
$(MAKE) -C $(SOURCE_DIR) \
|
||||||
|
PREFIX= RMQ_ROOTDIR= \
|
||||||
|
RMQ_ERLAPP_DIR=`pwd`/$(TARGET_DIR) \
|
||||||
|
MANDIR=`pwd`/$(TARGET_DIR)/share/man \
|
||||||
|
manpages web-manpages install install-man
|
||||||
|
|
||||||
|
sed -e 's:^SYS_PREFIX=$$:SYS_PREFIX=\$${RABBITMQ_HOME}:' \
|
||||||
|
$(TARGET_DIR)/sbin/rabbitmq-defaults >$(TARGET_DIR)/sbin/rabbitmq-defaults.tmp \
|
||||||
|
&& mv $(TARGET_DIR)/sbin/rabbitmq-defaults.tmp $(TARGET_DIR)/sbin/rabbitmq-defaults
|
||||||
|
chmod 0755 $(TARGET_DIR)/sbin/rabbitmq-defaults
|
||||||
|
|
||||||
|
mkdir -p $(TARGET_DIR)/etc/rabbitmq
|
||||||
|
|
||||||
|
find $(TARGET_DIR) -print0 | LC_COLLATE=C sort -z | \
|
||||||
|
xargs -0 tar --no-recursion -cf - | \
|
||||||
|
xz > $(CURDIR)/$(TARGET_TARBALL).tar.xz
|
||||||
|
|
||||||
|
if test "$(PACKAGES_DIR)"; then \
|
||||||
|
mkdir -p "$(PACKAGES_DIR)"; \
|
||||||
|
mv $(TARGET_TARBALL).tar.xz "$(PACKAGES_DIR)"; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
clean: clean_partial
|
||||||
|
rm -f rabbitmq-server-generic-unix-*.tar.xz
|
||||||
|
|
||||||
|
clean_partial:
|
||||||
|
rm -rf rabbitmq-server-* rabbitmq_server-*
|
|
@ -0,0 +1,123 @@
|
||||||
|
SOURCE_DIST_FILE ?= $(wildcard ../../rabbitmq-server-*.tar.xz)
|
||||||
|
|
||||||
|
ifneq ($(filter-out clean,$(MAKECMDGOALS)),)
|
||||||
|
ifeq ($(SOURCE_DIST_FILE),)
|
||||||
|
$(error Cannot find source archive; please specify SOURCE_DIST_FILE)
|
||||||
|
endif
|
||||||
|
ifneq ($(words $(SOURCE_DIST_FILE)),1)
|
||||||
|
$(error Multile source archives found; please specify SOURCE_DIST_FILE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
VERSION ?= $(patsubst rabbitmq-server-%.tar.xz,%,$(notdir $(SOURCE_DIST_FILE)))
|
||||||
|
ifeq ($(VERSION),)
|
||||||
|
$(error Cannot determine version; please specify VERSION)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
SOURCE_DIR=rabbitmq-server-$(VERSION)
|
||||||
|
TARGET_DIR=rabbitmq_server-$(VERSION)
|
||||||
|
TARGET_TARBALL=rabbitmq-server-$(OS)-standalone-$(VERSION)
|
||||||
|
RLS_DIR=$(TARGET_DIR)/release/$(TARGET_DIR)
|
||||||
|
|
||||||
|
ERTS_VSN=$(shell erl -noshell -eval 'io:format("~s", [erlang:system_info(version)]), halt().')
|
||||||
|
ERTS_ROOT_DIR=$(shell erl -noshell -eval 'io:format("~s", [code:root_dir()]), halt().')
|
||||||
|
OTP_RELEASE=$(shell erl -noshell -eval 'io:format("~s", [erlang:system_info(otp_release)]), halt().')
|
||||||
|
|
||||||
|
# used to generate the erlang release
|
||||||
|
RABBITMQ_HOME=$(TARGET_DIR)
|
||||||
|
RABBITMQ_EBIN_ROOT=$(RABBITMQ_HOME)/ebin
|
||||||
|
RABBITMQ_PLUGINS_DIR=$(RABBITMQ_HOME)/plugins
|
||||||
|
RABBITMQ_PLUGINS_EXPAND_DIR=$(RABBITMQ_PLUGINS_DIR)/expand
|
||||||
|
|
||||||
|
RABBITMQ_DEFAULTS=$(TARGET_DIR)/sbin/rabbitmq-defaults
|
||||||
|
fix_defaults = sed -e $(1) $(RABBITMQ_DEFAULTS) > $(RABBITMQ_DEFAULTS).tmp \
|
||||||
|
&& mv $(RABBITMQ_DEFAULTS).tmp $(RABBITMQ_DEFAULTS)
|
||||||
|
|
||||||
|
unexport DEPS_DIR
|
||||||
|
unexport ERL_LIBS
|
||||||
|
|
||||||
|
all: dist
|
||||||
|
@:
|
||||||
|
|
||||||
|
dist:
|
||||||
|
rm -rf $(SOURCE_DIR) $(TARGET_DIR)
|
||||||
|
xzcat $(SOURCE_DIST_FILE) | tar -xf -
|
||||||
|
|
||||||
|
$(MAKE) -C $(SOURCE_DIR) \
|
||||||
|
PREFIX= RMQ_ROOTDIR= \
|
||||||
|
RMQ_ERLAPP_DIR=$(abspath $(TARGET_DIR)) \
|
||||||
|
MANDIR=$(abspath $(TARGET_DIR))/share/man \
|
||||||
|
manpages install install-man
|
||||||
|
|
||||||
|
mkdir -p $(TARGET_DIR)/etc/rabbitmq
|
||||||
|
cp $(SOURCE_DIR)/docs/rabbitmq.config.example $(TARGET_DIR)/etc/rabbitmq
|
||||||
|
|
||||||
|
## Here we set the RABBITMQ_HOME variable,
|
||||||
|
## then we make ERL_DIR point to our released erl
|
||||||
|
## and we add the paths to our released start_clean and start_sasl boot scripts
|
||||||
|
$(call fix_defaults,'s:^SYS_PREFIX=$$:SYS_PREFIX=\$${RABBITMQ_HOME}:')
|
||||||
|
$(call fix_defaults,'s:^ERL_DIR=$$:ERL_DIR=\$${RABBITMQ_HOME}/erts-$(ERTS_VSN)/bin/:')
|
||||||
|
$(call fix_defaults,'s:start_clean$$:"\$${SYS_PREFIX}/releases/$(VERSION)/start_clean":')
|
||||||
|
$(call fix_defaults,'s:start_sasl:"\$${SYS_PREFIX}/releases/$(VERSION)/start_sasl":')
|
||||||
|
|
||||||
|
chmod 0755 $(RABBITMQ_DEFAULTS)
|
||||||
|
|
||||||
|
mkdir -p $(TARGET_DIR)/etc/rabbitmq
|
||||||
|
|
||||||
|
$(MAKE) generate_release
|
||||||
|
|
||||||
|
mkdir -p $(RLS_DIR)
|
||||||
|
tar -C $(RLS_DIR) -xzf $(RABBITMQ_HOME)/rabbit.tar.gz
|
||||||
|
|
||||||
|
# add minimal boot file
|
||||||
|
cp $(ERTS_ROOT_DIR)/bin/start_clean.boot $(RLS_DIR)/releases/$(VERSION)
|
||||||
|
cp $(ERTS_ROOT_DIR)/bin/start_sasl.boot $(RLS_DIR)/releases/$(VERSION)
|
||||||
|
|
||||||
|
# add OTP_VERSION file
|
||||||
|
mkdir -p $(RLS_DIR)/releases/$(OTP_RELEASE)
|
||||||
|
cp $(ERTS_ROOT_DIR)/releases/$(OTP_RELEASE)/OTP_VERSION $(RLS_DIR)/releases/$(OTP_RELEASE)/OTP_VERSION
|
||||||
|
|
||||||
|
# copy start.boot to bin folder as Erlang does.
|
||||||
|
# Required by rabbit_nodes:ensure_epmd/0
|
||||||
|
mkdir -p $(RLS_DIR)/bin/
|
||||||
|
cp $(ERTS_ROOT_DIR)/bin/start.boot $(RLS_DIR)/bin/
|
||||||
|
|
||||||
|
# move rabbitmq files to top level folder
|
||||||
|
mv $(RLS_DIR)/lib/rabbit-$(VERSION)/* $(RLS_DIR)
|
||||||
|
|
||||||
|
# remove empty lib/rabbit-$(VERSION) folder
|
||||||
|
rm -rf $(RLS_DIR)/lib/rabbit-$(VERSION)
|
||||||
|
|
||||||
|
# fix Erlang ROOTDIR
|
||||||
|
patch -o $(RLS_DIR)/erts-$(ERTS_VSN)/bin/erl $(RLS_DIR)/erts-$(ERTS_VSN)/bin/erl.src < erl.diff
|
||||||
|
rm -f $(RLS_DIR)/erts-$(ERTS_VSN)/bin/erl.orig
|
||||||
|
|
||||||
|
cd $(TARGET_DIR)/release && \
|
||||||
|
find $(TARGET_DIR) -print0 | LC_COLLATE=C sort -z | \
|
||||||
|
xargs -0 tar --no-recursion -cf - | \
|
||||||
|
xz > $(CURDIR)/$(TARGET_TARBALL).tar.xz
|
||||||
|
|
||||||
|
if test "$(PACKAGES_DIR)"; then \
|
||||||
|
mkdir -p "$(PACKAGES_DIR)"; \
|
||||||
|
mv $(TARGET_TARBALL).tar.xz "$(PACKAGES_DIR)"; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf rabbitmq-server-* rabbitmq_server-*
|
||||||
|
|
||||||
|
.PHONY : generate_release
|
||||||
|
generate_release:
|
||||||
|
erlc \
|
||||||
|
-I $(TARGET_DIR)/include/ -o src -Wall \
|
||||||
|
-v +debug_info -Duse_proper_qc \
|
||||||
|
-pa $(TARGET_DIR)/ebin/ src/rabbit_release.erl
|
||||||
|
ERL_LIBS="$(TARGET_DIR)/plugins:$$ERL_LIBS" \
|
||||||
|
erl \
|
||||||
|
-pa "$(RABBITMQ_EBIN_ROOT)" \
|
||||||
|
-pa src \
|
||||||
|
-noinput \
|
||||||
|
-hidden \
|
||||||
|
-s rabbit_release \
|
||||||
|
-extra "$(RABBITMQ_PLUGINS_DIR)" "$(RABBITMQ_PLUGINS_EXPAND_DIR)" "$(RABBITMQ_HOME)"
|
||||||
|
test -f $(RABBITMQ_HOME)/rabbit.tar.gz
|
||||||
|
rm src/rabbit_release.beam
|
|
@ -0,0 +1,4 @@
|
||||||
|
21c21
|
||||||
|
< ROOTDIR="%FINAL_ROOTDIR%"
|
||||||
|
---
|
||||||
|
> ROOTDIR="$(cd $(dirname "$0") && pwd)/../.."
|
|
@ -0,0 +1,160 @@
|
||||||
|
%% The contents of this file are subject to the Mozilla Public License
|
||||||
|
%% Version 1.1 (the "License"); you may not use this file except in
|
||||||
|
%% compliance with the License. You may obtain a copy of the License
|
||||||
|
%% at http://www.mozilla.org/MPL/
|
||||||
|
%%
|
||||||
|
%% Software distributed under the License is distributed on an "AS IS"
|
||||||
|
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||||
|
%% the License for the specific language governing rights and
|
||||||
|
%% limitations under the License.
|
||||||
|
%%
|
||||||
|
%% The Original Code is RabbitMQ.
|
||||||
|
%%
|
||||||
|
%% The Initial Developer of the Original Code is GoPivotal, Inc.
|
||||||
|
%% Copyright (c) 2007-2012 GoPivotal, Inc. All rights reserved.
|
||||||
|
%%
|
||||||
|
-module(rabbit_release).
|
||||||
|
|
||||||
|
-export([start/0]).
|
||||||
|
|
||||||
|
-include("rabbit.hrl").
|
||||||
|
|
||||||
|
-define(BaseApps, [rabbit]).
|
||||||
|
-define(ERROR_CODE, 1).
|
||||||
|
|
||||||
|
%% We need to calculate all the ERTS apps we need to ship with a
|
||||||
|
%% standalone rabbit. To acomplish that we need to unpack and load the plugins
|
||||||
|
%% apps that are shiped with rabbit.
|
||||||
|
%% Once we get that we generate an erlang release inside a tarball.
|
||||||
|
%% Our make file will work with that release to generate our final rabbitmq
|
||||||
|
%% package.
|
||||||
|
start() ->
|
||||||
|
%% Determine our various directories
|
||||||
|
[PluginsDistDir, UnpackedPluginDir, RabbitHome] =
|
||||||
|
init:get_plain_arguments(),
|
||||||
|
RootName = UnpackedPluginDir ++ "/rabbit",
|
||||||
|
|
||||||
|
%% extract the plugins so we can load their apps later
|
||||||
|
prepare_plugins(PluginsDistDir, UnpackedPluginDir),
|
||||||
|
|
||||||
|
%% add the plugin ebin folder to the code path.
|
||||||
|
add_plugins_to_path(UnpackedPluginDir),
|
||||||
|
|
||||||
|
PluginAppNames = [P#plugin.name ||
|
||||||
|
P <- rabbit_plugins:list(PluginsDistDir, false)],
|
||||||
|
|
||||||
|
%% Build the entire set of dependencies - this will load the
|
||||||
|
%% applications along the way
|
||||||
|
AllApps = case catch sets:to_list(expand_dependencies(PluginAppNames)) of
|
||||||
|
{failed_to_load_app, App, Err} ->
|
||||||
|
terminate("failed to load application ~s:~n~p",
|
||||||
|
[App, Err]);
|
||||||
|
AppList ->
|
||||||
|
AppList
|
||||||
|
end,
|
||||||
|
|
||||||
|
%% we need a list of ERTS apps we need to ship with rabbit
|
||||||
|
RabbitMQAppNames = [rabbit | [P#plugin.name ||
|
||||||
|
P <- rabbit_plugins:list(PluginsDistDir, true)]]
|
||||||
|
-- PluginAppNames,
|
||||||
|
{ok, SslAppsConfig} = application:get_env(rabbit, ssl_apps),
|
||||||
|
|
||||||
|
BaseApps = lists:umerge([
|
||||||
|
lists:sort(RabbitMQAppNames),
|
||||||
|
lists:sort(SslAppsConfig),
|
||||||
|
lists:sort(AllApps -- PluginAppNames)]),
|
||||||
|
|
||||||
|
AppVersions = [determine_version(App) || App <- BaseApps],
|
||||||
|
RabbitVersion = proplists:get_value(rabbit, AppVersions),
|
||||||
|
|
||||||
|
%% Build the overall release descriptor
|
||||||
|
RDesc = {release,
|
||||||
|
{"rabbit", RabbitVersion},
|
||||||
|
{erts, erlang:system_info(version)},
|
||||||
|
AppVersions},
|
||||||
|
|
||||||
|
%% Write it out to $RABBITMQ_PLUGINS_EXPAND_DIR/rabbit.rel
|
||||||
|
rabbit_file:write_file(RootName ++ ".rel", io_lib:format("~p.~n", [RDesc])),
|
||||||
|
|
||||||
|
%% Compile the script
|
||||||
|
systools:make_script(RootName),
|
||||||
|
systools:script2boot(RootName),
|
||||||
|
%% Make release tarfile
|
||||||
|
make_tar(RootName, RabbitHome),
|
||||||
|
rabbit_misc:quit(0).
|
||||||
|
|
||||||
|
make_tar(Release, RabbitHome) ->
|
||||||
|
systools:make_tar(Release,
|
||||||
|
[
|
||||||
|
{dirs, [docs, etc, include, plugins, sbin, share]},
|
||||||
|
{erts, code:root_dir()},
|
||||||
|
{outdir, RabbitHome}
|
||||||
|
]).
|
||||||
|
|
||||||
|
determine_version(App) ->
|
||||||
|
application:load(App),
|
||||||
|
{ok, Vsn} = application:get_key(App, vsn),
|
||||||
|
{App, Vsn}.
|
||||||
|
|
||||||
|
delete_recursively(Fn) ->
|
||||||
|
case rabbit_file:recursive_delete([Fn]) of
|
||||||
|
ok -> ok;
|
||||||
|
{error, {Path, E}} -> {error, {cannot_delete, Path, E}};
|
||||||
|
Error -> Error
|
||||||
|
end.
|
||||||
|
|
||||||
|
prepare_plugins(PluginsDistDir, DestDir) ->
|
||||||
|
%% Eliminate the contents of the destination directory
|
||||||
|
case delete_recursively(DestDir) of
|
||||||
|
ok -> ok;
|
||||||
|
{error, E} -> terminate("Could not delete dir ~s (~p)", [DestDir, E])
|
||||||
|
end,
|
||||||
|
case filelib:ensure_dir(DestDir ++ "/") of
|
||||||
|
ok -> ok;
|
||||||
|
{error, E2} -> terminate("Could not create dir ~s (~p)", [DestDir, E2])
|
||||||
|
end,
|
||||||
|
|
||||||
|
[prepare_plugin(Plugin, DestDir) ||
|
||||||
|
Plugin <- rabbit_plugins:list(PluginsDistDir, true)].
|
||||||
|
|
||||||
|
prepare_plugin(#plugin{type = ez, location = Location}, PluginDestDir) ->
|
||||||
|
zip:unzip(Location, [{cwd, PluginDestDir}]);
|
||||||
|
prepare_plugin(#plugin{type = dir, name = Name, location = Location},
|
||||||
|
PluginsDestDir) ->
|
||||||
|
rabbit_file:recursive_copy(Location,
|
||||||
|
filename:join([PluginsDestDir, Name])).
|
||||||
|
|
||||||
|
expand_dependencies(Pending) ->
|
||||||
|
expand_dependencies(sets:new(), Pending).
|
||||||
|
expand_dependencies(Current, []) ->
|
||||||
|
Current;
|
||||||
|
expand_dependencies(Current, [Next|Rest]) ->
|
||||||
|
case sets:is_element(Next, Current) of
|
||||||
|
true ->
|
||||||
|
expand_dependencies(Current, Rest);
|
||||||
|
false ->
|
||||||
|
case application:load(Next) of
|
||||||
|
ok ->
|
||||||
|
ok;
|
||||||
|
{error, {already_loaded, _}} ->
|
||||||
|
ok;
|
||||||
|
{error, Reason} ->
|
||||||
|
throw({failed_to_load_app, Next, Reason})
|
||||||
|
end,
|
||||||
|
{ok, Required} = application:get_key(Next, applications),
|
||||||
|
Unique = [A || A <- Required, not(sets:is_element(A, Current))],
|
||||||
|
expand_dependencies(sets:add_element(Next, Current), Rest ++ Unique)
|
||||||
|
end.
|
||||||
|
|
||||||
|
add_plugins_to_path(PluginDir) ->
|
||||||
|
[add_plugin_to_path(PluginName) ||
|
||||||
|
PluginName <- filelib:wildcard(PluginDir ++ "/*/ebin/*.app")].
|
||||||
|
|
||||||
|
add_plugin_to_path(PluginAppDescFn) ->
|
||||||
|
%% Add the plugin ebin directory to the load path
|
||||||
|
PluginEBinDirN = filename:dirname(PluginAppDescFn),
|
||||||
|
code:add_path(PluginEBinDirN).
|
||||||
|
|
||||||
|
terminate(Fmt, Args) ->
|
||||||
|
io:format("ERROR: " ++ Fmt ++ "~n", Args),
|
||||||
|
rabbit_misc:quit(?ERROR_CODE).
|
|
@ -0,0 +1,33 @@
|
||||||
|
ifeq ($(PACKAGES_DIR),)
|
||||||
|
ZIP_DIR = ../windows
|
||||||
|
else
|
||||||
|
ZIP_DIR = $(PACKAGES_DIR)
|
||||||
|
endif
|
||||||
|
ZIP = $(notdir $(wildcard $(ZIP_DIR)/rabbitmq-server-windows-*.zip))
|
||||||
|
|
||||||
|
VERSION = $(patsubst rabbitmq-server-windows-%.zip,%,$(ZIP))
|
||||||
|
|
||||||
|
unexport DEPS_DIR
|
||||||
|
unexport ERL_LIBS
|
||||||
|
|
||||||
|
all: dist
|
||||||
|
@:
|
||||||
|
|
||||||
|
dist: rabbitmq-$(VERSION).nsi rabbitmq_server-$(VERSION)
|
||||||
|
makensis -V2 rabbitmq-$(VERSION).nsi
|
||||||
|
|
||||||
|
if test "$(PACKAGES_DIR)"; then \
|
||||||
|
mkdir -p "$(PACKAGES_DIR)"; \
|
||||||
|
mv rabbitmq-server-$(VERSION).exe "$(PACKAGES_DIR)"; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
rabbitmq-$(VERSION).nsi: rabbitmq_nsi.in
|
||||||
|
sed \
|
||||||
|
-e 's|%%VERSION%%|$(VERSION)|' \
|
||||||
|
$< > $@
|
||||||
|
|
||||||
|
rabbitmq_server-$(VERSION):
|
||||||
|
unzip -q $(ZIP_DIR)/$(ZIP)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf rabbitmq-*.nsi rabbitmq_server-* rabbitmq-server-*.exe
|
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,272 @@
|
||||||
|
; Use the "Modern" UI
|
||||||
|
!include MUI2.nsh
|
||||||
|
!include LogicLib.nsh
|
||||||
|
!include WinMessages.nsh
|
||||||
|
!include FileFunc.nsh
|
||||||
|
!include WordFunc.nsh
|
||||||
|
!include x64.nsh
|
||||||
|
|
||||||
|
!addplugindir plugins
|
||||||
|
|
||||||
|
!define env_hklm 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
|
||||||
|
!define uninstall "Software\Microsoft\Windows\CurrentVersion\Uninstall\RabbitMQ"
|
||||||
|
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
||||||
|
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
; The name of the installer
|
||||||
|
Name "RabbitMQ Server %%VERSION%%"
|
||||||
|
|
||||||
|
; The file to write
|
||||||
|
OutFile "rabbitmq-server-%%VERSION%%.exe"
|
||||||
|
|
||||||
|
; Icons
|
||||||
|
!define MUI_ICON "rabbitmq.ico"
|
||||||
|
|
||||||
|
; The default installation directory is empty. The .onInit function
|
||||||
|
; below takes care of selecting the appropriate (32-bit vs. 64-bit)
|
||||||
|
; "Program Files".
|
||||||
|
InstallDir ""
|
||||||
|
|
||||||
|
; Registry key to check for directory (so if you install again, it will
|
||||||
|
; overwrite the old one automatically)
|
||||||
|
InstallDirRegKey HKLM "Software\VMware, Inc.\RabbitMQ Server" "Install_Dir"
|
||||||
|
|
||||||
|
; Request application privileges for Windows Vista
|
||||||
|
RequestExecutionLevel admin
|
||||||
|
|
||||||
|
SetCompressor /solid lzma
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
; Pages
|
||||||
|
|
||||||
|
|
||||||
|
; !insertmacro MUI_PAGE_LICENSE "..\..\LICENSE-MPL-RabbitMQ"
|
||||||
|
!insertmacro MUI_PAGE_COMPONENTS
|
||||||
|
!insertmacro MUI_PAGE_DIRECTORY
|
||||||
|
!insertmacro MUI_PAGE_INSTFILES
|
||||||
|
!insertmacro MUI_PAGE_FINISH
|
||||||
|
|
||||||
|
!insertmacro MUI_UNPAGE_CONFIRM
|
||||||
|
!insertmacro MUI_UNPAGE_INSTFILES
|
||||||
|
!define MUI_FINISHPAGE_TEXT "RabbitMQ Server %%VERSION%% has been uninstalled from your computer.$\n$\nPlease note that the log and database directories located at $APPDATA\RabbitMQ have not been removed. You can remove them manually if desired."
|
||||||
|
!insertmacro MUI_UNPAGE_FINISH
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
;Languages
|
||||||
|
|
||||||
|
!insertmacro MUI_LANGUAGE "English"
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
VIProductVersion "%%VERSION%%.0"
|
||||||
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" "%%VERSION%%"
|
||||||
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "RabbitMQ Server"
|
||||||
|
;VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" ""
|
||||||
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Pivotal Software, Inc"
|
||||||
|
;VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "" ; TODO ?
|
||||||
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright (c) 2007-2015 Pivotal Software, Inc. All rights reserved."
|
||||||
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "RabbitMQ Server"
|
||||||
|
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "%%VERSION%%"
|
||||||
|
|
||||||
|
; The stuff to install
|
||||||
|
Section "RabbitMQ Server (required)" Rabbit
|
||||||
|
|
||||||
|
SectionIn RO
|
||||||
|
|
||||||
|
; Set output path to the installation directory.
|
||||||
|
SetOutPath $INSTDIR
|
||||||
|
|
||||||
|
; Put files there
|
||||||
|
File /r "rabbitmq_server-%%VERSION%%"
|
||||||
|
File "rabbitmq.ico"
|
||||||
|
|
||||||
|
; Set output path to the user's data directory
|
||||||
|
SetOutPath $APPDATA\RabbitMQ
|
||||||
|
|
||||||
|
; ...And put the example config file there
|
||||||
|
File "rabbitmq_server-%%VERSION%%\etc\rabbitmq.config.example"
|
||||||
|
|
||||||
|
; Write the installation path into the registry
|
||||||
|
WriteRegStr HKLM "SOFTWARE\VMware, Inc.\RabbitMQ Server" "Install_Dir" "$INSTDIR"
|
||||||
|
|
||||||
|
; Write the uninstall keys for Windows
|
||||||
|
WriteRegStr HKLM ${uninstall} "DisplayName" "RabbitMQ Server %%VERSION%%"
|
||||||
|
WriteRegStr HKLM ${uninstall} "UninstallString" "$INSTDIR\uninstall.exe"
|
||||||
|
WriteRegStr HKLM ${uninstall} "DisplayIcon" "$INSTDIR\rabbitmq.ico"
|
||||||
|
WriteRegStr HKLM ${uninstall} "Publisher" "Pivotal Software, Inc."
|
||||||
|
WriteRegStr HKLM ${uninstall} "DisplayVersion" "%%VERSION%%"
|
||||||
|
WriteRegDWORD HKLM ${uninstall} "NoModify" 1
|
||||||
|
WriteRegDWORD HKLM ${uninstall} "NoRepair" 1
|
||||||
|
|
||||||
|
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
|
||||||
|
IntFmt $0 "0x%08X" $0
|
||||||
|
WriteRegDWORD HKLM "${uninstall}" "EstimatedSize" "$0"
|
||||||
|
|
||||||
|
WriteUninstaller "uninstall.exe"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
Section "RabbitMQ Service" RabbitService
|
||||||
|
DetailPrint "Installing RabbitMQ service..."
|
||||||
|
ExecDos::exec /DETAILED '"$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" install' ""
|
||||||
|
DetailPrint "Starting RabbitMQ service..."
|
||||||
|
ExecDos::exec /DETAILED '"$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" start' ""
|
||||||
|
ReadEnvStr $1 "HOMEDRIVE"
|
||||||
|
ReadEnvStr $2 "HOMEPATH"
|
||||||
|
CopyFiles "$WINDIR\.erlang.cookie" "$1$2\.erlang.cookie"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
Section "Start Menu" RabbitStartMenu
|
||||||
|
; In case the service is not installed, or the service installation fails,
|
||||||
|
; make sure these exist or Explorer will get confused.
|
||||||
|
CreateDirectory "$APPDATA\RabbitMQ\log"
|
||||||
|
CreateDirectory "$APPDATA\RabbitMQ\db"
|
||||||
|
|
||||||
|
CreateDirectory "$SMPROGRAMS\RabbitMQ Server"
|
||||||
|
CreateShortCut "$SMPROGRAMS\RabbitMQ Server\Uninstall RabbitMQ.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
|
||||||
|
CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Plugins.lnk" "$INSTDIR\rabbitmq_server-%%VERSION%%\plugins"
|
||||||
|
CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Logs.lnk" "$APPDATA\RabbitMQ\log"
|
||||||
|
CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Database Directory.lnk" "$APPDATA\RabbitMQ\db"
|
||||||
|
CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Service - (re)install.lnk" "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" "install" "$INSTDIR\rabbitmq.ico"
|
||||||
|
CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Service - remove.lnk" "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" "remove" "$INSTDIR\rabbitmq.ico"
|
||||||
|
CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Service - start.lnk" "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" "start" "$INSTDIR\rabbitmq.ico"
|
||||||
|
CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Service - stop.lnk" "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" "stop" "$INSTDIR\rabbitmq.ico"
|
||||||
|
|
||||||
|
SetOutPath "$INSTDIR\rabbitmq_server-%%VERSION%%\sbin"
|
||||||
|
CreateShortCut "$SMPROGRAMS\RabbitMQ Server\RabbitMQ Command Prompt (sbin dir).lnk" "$WINDIR\system32\cmd.exe" "" "$WINDIR\system32\cmd.exe"
|
||||||
|
SetOutPath $INSTDIR
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
; Section descriptions
|
||||||
|
|
||||||
|
LangString DESC_Rabbit ${LANG_ENGLISH} "The RabbitMQ Server."
|
||||||
|
LangString DESC_RabbitService ${LANG_ENGLISH} "Set up RabbitMQ as a Windows Service."
|
||||||
|
LangString DESC_RabbitStartMenu ${LANG_ENGLISH} "Add some useful links to the start menu."
|
||||||
|
|
||||||
|
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${Rabbit} $(DESC_Rabbit)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${RabbitService} $(DESC_RabbitService)
|
||||||
|
!insertmacro MUI_DESCRIPTION_TEXT ${RabbitStartMenu} $(DESC_RabbitStartMenu)
|
||||||
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
; Uninstaller
|
||||||
|
|
||||||
|
Section "Uninstall"
|
||||||
|
|
||||||
|
; Remove registry keys
|
||||||
|
DeleteRegKey HKLM ${uninstall}
|
||||||
|
DeleteRegKey HKLM "SOFTWARE\VMware, Inc.\RabbitMQ Server"
|
||||||
|
|
||||||
|
; TODO these will fail if the service is not installed - do we care?
|
||||||
|
DetailPrint "Stopping RabbitMQ service..."
|
||||||
|
ExecDos::exec /DETAILED '"$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" stop' ""
|
||||||
|
DetailPrint "Removing RabbitMQ service..."
|
||||||
|
ExecDos::exec /DETAILED '"$INSTDIR\rabbitmq_server-%%VERSION%%\sbin\rabbitmq-service.bat" remove' ""
|
||||||
|
|
||||||
|
; Remove files and uninstaller
|
||||||
|
RMDir /r "$INSTDIR\rabbitmq_server-%%VERSION%%"
|
||||||
|
Delete "$INSTDIR\rabbitmq.ico"
|
||||||
|
Delete "$INSTDIR\uninstall.exe"
|
||||||
|
RMDir "$INSTDIR"
|
||||||
|
|
||||||
|
; Remove start menu items
|
||||||
|
RMDir /r "$SMPROGRAMS\RabbitMQ Server"
|
||||||
|
|
||||||
|
DeleteRegValue ${env_hklm} ERLANG_HOME
|
||||||
|
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
|
||||||
|
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
;--------------------------------
|
||||||
|
|
||||||
|
; Functions
|
||||||
|
|
||||||
|
Function .onInit
|
||||||
|
; By default, always install in "\Program Files", not matter if we run
|
||||||
|
; on a 32-bit or 64-bit Windows.
|
||||||
|
${If} $INSTDIR == "";
|
||||||
|
${If} ${RunningX64}
|
||||||
|
StrCpy $INSTDIR "$PROGRAMFILES64\RabbitMQ Server"
|
||||||
|
${Else}
|
||||||
|
StrCpy $INSTDIR "$PROGRAMFILES\RabbitMQ Server"
|
||||||
|
${EndIf}
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
Call findErlang
|
||||||
|
|
||||||
|
ReadRegStr $0 HKLM ${uninstall} "UninstallString"
|
||||||
|
${If} $0 != ""
|
||||||
|
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "RabbitMQ is already installed. $\n$\nClick 'OK' to remove the previous version or 'Cancel' to cancel this installation." /SD IDOK IDOK rununinstall IDCANCEL norun
|
||||||
|
|
||||||
|
norun:
|
||||||
|
Abort
|
||||||
|
|
||||||
|
rununinstall:
|
||||||
|
;Run the uninstaller
|
||||||
|
ClearErrors
|
||||||
|
ExecWait '"$INSTDIR\uninstall.exe" /S _?=$INSTDIR'
|
||||||
|
Delete "$INSTDIR\uninstall.exe"
|
||||||
|
RMDir "$INSTDIR"
|
||||||
|
; the unistaller removes the ERLANG_HOME.
|
||||||
|
; called again since this is an update
|
||||||
|
Call findErlang
|
||||||
|
|
||||||
|
${EndIf}
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
|
Function findErlang
|
||||||
|
|
||||||
|
StrCpy $0 0
|
||||||
|
StrCpy $2 "not-found"
|
||||||
|
${Do}
|
||||||
|
EnumRegKey $1 HKLM Software\Ericsson\Erlang $0
|
||||||
|
${If} $1 = ""
|
||||||
|
${Break}
|
||||||
|
${EndIf}
|
||||||
|
${If} $1 <> "ErlSrv"
|
||||||
|
StrCpy $2 $1
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
IntOp $0 $0 + 1
|
||||||
|
${Loop}
|
||||||
|
|
||||||
|
${If} $2 = "not-found"
|
||||||
|
MessageBox MB_YESNO|MB_ICONEXCLAMATION "Erlang could not be detected.$\nYou must install Erlang before installing RabbitMQ. Would you like the installer to open a browser window to the Erlang download site?" IDNO abort
|
||||||
|
ExecShell "open" "http://www.erlang.org/download.html"
|
||||||
|
abort:
|
||||||
|
Abort
|
||||||
|
${Else}
|
||||||
|
${VersionCompare} $2 "5.7.4" $0
|
||||||
|
${VersionCompare} $2 "5.8.1" $1
|
||||||
|
|
||||||
|
${If} $0 = 2
|
||||||
|
MessageBox MB_OK|MB_ICONEXCLAMATION "Your installed version of Erlang ($2) is too old. Please install a more recent version."
|
||||||
|
Abort
|
||||||
|
${ElseIf} $1 = 2
|
||||||
|
MessageBox MB_YESNO|MB_ICONEXCLAMATION "Your installed version of Erlang ($2) is comparatively old.$\nFor best results, please install a newer version.$\nDo you wish to continue?" IDYES no_abort
|
||||||
|
Abort
|
||||||
|
no_abort:
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
ReadRegStr $0 HKLM "Software\Ericsson\Erlang\$2" ""
|
||||||
|
|
||||||
|
; See http://nsis.sourceforge.net/Setting_Environment_Variables
|
||||||
|
WriteRegExpandStr ${env_hklm} ERLANG_HOME $0
|
||||||
|
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
|
||||||
|
|
||||||
|
; On Windows XP changing the permanent environment does not change *our*
|
||||||
|
; environment, so do that as well.
|
||||||
|
System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("ERLANG_HOME", "$0").r0'
|
||||||
|
${EndIf}
|
||||||
|
|
||||||
|
FunctionEnd
|
|
@ -0,0 +1,43 @@
|
||||||
|
SOURCE_DIST_FILE ?= $(wildcard ../../../rabbitmq-server-*.tar.xz)
|
||||||
|
|
||||||
|
ifneq ($(filter-out clean,$(MAKECMDGOALS)),)
|
||||||
|
ifeq ($(SOURCE_DIST_FILE),)
|
||||||
|
$(error Cannot find source archive; please specify SOURCE_DIST_FILE)
|
||||||
|
endif
|
||||||
|
ifneq ($(words $(SOURCE_DIST_FILE)),1)
|
||||||
|
$(error Multile source archives found; please specify SOURCE_DIST_FILE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
VERSION ?= $(patsubst rabbitmq-server-%.tar.xz,%,$(notdir $(SOURCE_DIST_FILE)))
|
||||||
|
ifeq ($(VERSION),)
|
||||||
|
$(error Cannot determine version; please specify VERSION)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
SOURCE_DIR = rabbitmq-server-$(VERSION)
|
||||||
|
TARGET_DIR = rabbitmq_server-$(VERSION)
|
||||||
|
TARGET_ZIP = rabbitmq-server-windows-$(VERSION)
|
||||||
|
|
||||||
|
unexport DEPS_DIR
|
||||||
|
unexport ERL_LIBS
|
||||||
|
|
||||||
|
all: dist
|
||||||
|
@:
|
||||||
|
|
||||||
|
dist:
|
||||||
|
xzcat $(SOURCE_DIST_FILE) | tar -xf -
|
||||||
|
$(MAKE) -C $(SOURCE_DIR) install-windows \
|
||||||
|
DESTDIR=$(abspath $(TARGET_DIR)) \
|
||||||
|
WINDOWS_PREFIX=
|
||||||
|
|
||||||
|
cp -a README-etc $(TARGET_DIR)/etc/README.txt
|
||||||
|
|
||||||
|
zip -q -r $(TARGET_ZIP).zip $(TARGET_DIR)
|
||||||
|
|
||||||
|
if test "$(PACKAGES_DIR)"; then \
|
||||||
|
mkdir -p "$(PACKAGES_DIR)"; \
|
||||||
|
mv $(TARGET_ZIP).zip "$(PACKAGES_DIR)"; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf rabbitmq-server-* rabbitmq_server-*
|
|
@ -0,0 +1,7 @@
|
||||||
|
In this directory you can find an example configuration file for RabbitMQ.
|
||||||
|
|
||||||
|
Note that this directory is *not* where the real RabbitMQ
|
||||||
|
configuration lives. The default location for the real configuration
|
||||||
|
file is %APPDATA%\RabbitMQ\rabbitmq.config.
|
||||||
|
|
||||||
|
%APPDATA% usually expands to C:\Users\%USERNAME%\AppData\Roaming or similar.
|
|
@ -0,0 +1,282 @@
|
||||||
|
ifeq ($(.DEFAULT_GOAL),)
|
||||||
|
# Define default goal to `all` because this file defines some targets
|
||||||
|
# before the inclusion of erlang.mk leading to the wrong target becoming
|
||||||
|
# the default.
|
||||||
|
.DEFAULT_GOAL = all
|
||||||
|
endif
|
||||||
|
|
||||||
|
# --------------------------------------------------------------------
|
||||||
|
# RabbitMQ components.
|
||||||
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
|
# For RabbitMQ repositories, we want to checkout branches which match
|
||||||
|
# the parent project. For instance, if the parent project is on a
|
||||||
|
# release tag, dependencies must be on the same release tag. If the
|
||||||
|
# parent project is on a topic branch, dependencies must be on the same
|
||||||
|
# topic branch or fallback to `stable` or `master` whichever was the
|
||||||
|
# base of the topic branch.
|
||||||
|
|
||||||
|
dep_amqp_client = git_rmq rabbitmq-erlang-client $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbit = git_rmq rabbitmq-server $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbit_common = git_rmq rabbitmq-common $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_amqp1_0 = git_rmq rabbitmq-amqp1.0 $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_auth_backend_amqp = git_rmq rabbitmq-auth-backend-amqp $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_auth_backend_http = git_rmq rabbitmq-auth-backend-http $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_auth_backend_ldap = git_rmq rabbitmq-auth-backend-ldap $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_auth_mechanism_ssl = git_rmq rabbitmq-auth-mechanism-ssl $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_boot_steps_visualiser = git_rmq rabbitmq-boot-steps-visualiser $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_clusterer = git_rmq rabbitmq-clusterer $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_codegen = git_rmq rabbitmq-codegen $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_consistent_hash_exchange = git_rmq rabbitmq-consistent-hash-exchange $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_ct_helpers = git_rmq rabbitmq-ct-helpers $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_delayed_message_exchange = git_rmq rabbitmq-delayed-message-exchange $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_dotnet_client = git_rmq rabbitmq-dotnet-client $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_event_exchange = git_rmq rabbitmq-event-exchange $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_federation = git_rmq rabbitmq-federation $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_federation_management = git_rmq rabbitmq-federation-management $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_java_client = git_rmq rabbitmq-java-client $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_jms_client = git_rmq rabbitmq-jms-client $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_jms_topic_exchange = git_rmq rabbitmq-jms-topic-exchange $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_lvc = git_rmq rabbitmq-lvc-plugin $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_management = git_rmq rabbitmq-management $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_management_agent = git_rmq rabbitmq-management-agent $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_management_exchange = git_rmq rabbitmq-management-exchange $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_management_themes = git_rmq rabbitmq-management-themes $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_management_visualiser = git_rmq rabbitmq-management-visualiser $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_message_timestamp = git_rmq rabbitmq-message-timestamp $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_metronome = git_rmq rabbitmq-metronome $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_mqtt = git_rmq rabbitmq-mqtt $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_objc_client = git_rmq rabbitmq-objc-client $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_recent_history_exchange = git_rmq rabbitmq-recent-history-exchange $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_routing_node_stamp = git_rmq rabbitmq-routing-node-stamp $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_rtopic_exchange = git_rmq rabbitmq-rtopic-exchange $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_sharding = git_rmq rabbitmq-sharding $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_shovel = git_rmq rabbitmq-shovel $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_shovel_management = git_rmq rabbitmq-shovel-management $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_stomp = git_rmq rabbitmq-stomp $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_toke = git_rmq rabbitmq-toke $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_top = git_rmq rabbitmq-top $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_tracing = git_rmq rabbitmq-tracing $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_trust_store = git_rmq rabbitmq-trust-store $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_test = git_rmq rabbitmq-test $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_web_dispatch = git_rmq rabbitmq-web-dispatch $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_web_stomp = git_rmq rabbitmq-web-stomp $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_web_stomp_examples = git_rmq rabbitmq-web-stomp-examples $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_web_mqtt = git_rmq rabbitmq-web-mqtt $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_web_mqtt_examples = git_rmq rabbitmq-web-mqtt-examples $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_rabbitmq_website = git_rmq rabbitmq-website $(current_rmq_ref) $(base_rmq_ref) live master
|
||||||
|
dep_sockjs = git_rmq sockjs-erlang $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
dep_toke = git_rmq toke $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
|
||||||
|
dep_rabbitmq_public_umbrella = git_rmq rabbitmq-public-umbrella $(current_rmq_ref) $(base_rmq_ref) master
|
||||||
|
|
||||||
|
# FIXME: As of 2015-11-20, we depend on Ranch 1.2.1, but erlang.mk
|
||||||
|
# defaults to Ranch 1.1.0. All projects depending indirectly on Ranch
|
||||||
|
# needs to add "ranch" as a BUILD_DEPS. The list of projects needing
|
||||||
|
# this workaround are:
|
||||||
|
# o rabbitmq-web-stomp
|
||||||
|
dep_ranch = git https://github.com/ninenines/ranch 1.2.1
|
||||||
|
|
||||||
|
RABBITMQ_COMPONENTS = amqp_client \
|
||||||
|
rabbit \
|
||||||
|
rabbit_common \
|
||||||
|
rabbitmq_amqp1_0 \
|
||||||
|
rabbitmq_auth_backend_amqp \
|
||||||
|
rabbitmq_auth_backend_http \
|
||||||
|
rabbitmq_auth_backend_ldap \
|
||||||
|
rabbitmq_auth_mechanism_ssl \
|
||||||
|
rabbitmq_boot_steps_visualiser \
|
||||||
|
rabbitmq_clusterer \
|
||||||
|
rabbitmq_codegen \
|
||||||
|
rabbitmq_consistent_hash_exchange \
|
||||||
|
rabbitmq_ct_helpers \
|
||||||
|
rabbitmq_delayed_message_exchange \
|
||||||
|
rabbitmq_dotnet_client \
|
||||||
|
rabbitmq_event_exchange \
|
||||||
|
rabbitmq_federation \
|
||||||
|
rabbitmq_federation_management \
|
||||||
|
rabbitmq_java_client \
|
||||||
|
rabbitmq_jms_client \
|
||||||
|
rabbitmq_jms_topic_exchange \
|
||||||
|
rabbitmq_lvc \
|
||||||
|
rabbitmq_management \
|
||||||
|
rabbitmq_management_agent \
|
||||||
|
rabbitmq_management_exchange \
|
||||||
|
rabbitmq_management_themes \
|
||||||
|
rabbitmq_management_visualiser \
|
||||||
|
rabbitmq_message_timestamp \
|
||||||
|
rabbitmq_metronome \
|
||||||
|
rabbitmq_mqtt \
|
||||||
|
rabbitmq_objc_client \
|
||||||
|
rabbitmq_recent_history_exchange \
|
||||||
|
rabbitmq_routing_node_stamp \
|
||||||
|
rabbitmq_rtopic_exchange \
|
||||||
|
rabbitmq_sharding \
|
||||||
|
rabbitmq_shovel \
|
||||||
|
rabbitmq_shovel_management \
|
||||||
|
rabbitmq_stomp \
|
||||||
|
rabbitmq_toke \
|
||||||
|
rabbitmq_top \
|
||||||
|
rabbitmq_tracing \
|
||||||
|
rabbitmq_trust_store \
|
||||||
|
rabbitmq_web_dispatch \
|
||||||
|
rabbitmq_web_mqtt \
|
||||||
|
rabbitmq_web_mqtt_examples \
|
||||||
|
rabbitmq_web_stomp \
|
||||||
|
rabbitmq_web_stomp_examples \
|
||||||
|
rabbitmq_website
|
||||||
|
|
||||||
|
# Several components have a custom erlang.mk/build.config, mainly
|
||||||
|
# to disable eunit. Therefore, we can't use the top-level project's
|
||||||
|
# erlang.mk copy.
|
||||||
|
NO_AUTOPATCH += $(RABBITMQ_COMPONENTS)
|
||||||
|
|
||||||
|
ifeq ($(origin current_rmq_ref),undefined)
|
||||||
|
ifneq ($(wildcard .git),)
|
||||||
|
current_rmq_ref := $(shell (\
|
||||||
|
ref=$$(git branch --list | awk '/^\* \(.*detached / {ref=$$0; sub(/.*detached [^ ]+ /, "", ref); sub(/\)$$/, "", ref); print ref; exit;} /^\* / {ref=$$0; sub(/^\* /, "", ref); print ref; exit}');\
|
||||||
|
if test "$$(git rev-parse --short HEAD)" != "$$ref"; then echo "$$ref"; fi))
|
||||||
|
else
|
||||||
|
current_rmq_ref := master
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
export current_rmq_ref
|
||||||
|
|
||||||
|
ifeq ($(origin base_rmq_ref),undefined)
|
||||||
|
ifneq ($(wildcard .git),)
|
||||||
|
base_rmq_ref := $(shell \
|
||||||
|
(git rev-parse --verify -q stable >/dev/null && \
|
||||||
|
git merge-base --is-ancestor $$(git merge-base master HEAD) stable && \
|
||||||
|
echo stable) || \
|
||||||
|
echo master)
|
||||||
|
else
|
||||||
|
base_rmq_ref := master
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
export base_rmq_ref
|
||||||
|
|
||||||
|
# Repository URL selection.
|
||||||
|
#
|
||||||
|
# First, we infer other components' location from the current project
|
||||||
|
# repository URL, if it's a Git repository:
|
||||||
|
# - We take the "origin" remote URL as the base
|
||||||
|
# - The current project name and repository name is replaced by the
|
||||||
|
# target's properties:
|
||||||
|
# eg. rabbitmq-common is replaced by rabbitmq-codegen
|
||||||
|
# eg. rabbit_common is replaced by rabbitmq_codegen
|
||||||
|
#
|
||||||
|
# If cloning from this computed location fails, we fallback to RabbitMQ
|
||||||
|
# upstream which is GitHub.
|
||||||
|
|
||||||
|
# Maccro to transform eg. "rabbit_common" to "rabbitmq-common".
|
||||||
|
rmq_cmp_repo_name = $(word 2,$(dep_$(1)))
|
||||||
|
|
||||||
|
# Upstream URL for the current project.
|
||||||
|
RABBITMQ_COMPONENT_REPO_NAME := $(call rmq_cmp_repo_name,$(PROJECT))
|
||||||
|
RABBITMQ_UPSTREAM_FETCH_URL ?= https://github.com/rabbitmq/$(RABBITMQ_COMPONENT_REPO_NAME).git
|
||||||
|
RABBITMQ_UPSTREAM_PUSH_URL ?= git@github.com:rabbitmq/$(RABBITMQ_COMPONENT_REPO_NAME).git
|
||||||
|
|
||||||
|
# Current URL for the current project. If this is not a Git clone,
|
||||||
|
# default to the upstream Git repository.
|
||||||
|
ifneq ($(wildcard .git),)
|
||||||
|
git_origin_fetch_url := $(shell git config remote.origin.url)
|
||||||
|
git_origin_push_url := $(shell git config remote.origin.pushurl || git config remote.origin.url)
|
||||||
|
RABBITMQ_CURRENT_FETCH_URL ?= $(git_origin_fetch_url)
|
||||||
|
RABBITMQ_CURRENT_PUSH_URL ?= $(git_origin_push_url)
|
||||||
|
else
|
||||||
|
RABBITMQ_CURRENT_FETCH_URL ?= $(RABBITMQ_UPSTREAM_FETCH_URL)
|
||||||
|
RABBITMQ_CURRENT_PUSH_URL ?= $(RABBITMQ_UPSTREAM_PUSH_URL)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Macro to replace the following pattern:
|
||||||
|
# 1. /foo.git -> /bar.git
|
||||||
|
# 2. /foo -> /bar
|
||||||
|
# 3. /foo/ -> /bar/
|
||||||
|
subst_repo_name = $(patsubst %/$(1)/%,%/$(2)/%,$(patsubst %/$(1),%/$(2),$(patsubst %/$(1).git,%/$(2).git,$(3))))
|
||||||
|
|
||||||
|
# Macro to replace both the project's name (eg. "rabbit_common") and
|
||||||
|
# repository name (eg. "rabbitmq-common") by the target's equivalent.
|
||||||
|
#
|
||||||
|
# This macro is kept on one line because we don't want whitespaces in
|
||||||
|
# the returned value, as it's used in $(dep_fetch_git_rmq) in a shell
|
||||||
|
# single-quoted string.
|
||||||
|
dep_rmq_repo = $(if $(dep_$(2)),$(call subst_repo_name,$(PROJECT),$(2),$(call subst_repo_name,$(RABBITMQ_COMPONENT_REPO_NAME),$(call rmq_cmp_repo_name,$(2)),$(1))),$(pkg_$(1)_repo))
|
||||||
|
|
||||||
|
dep_rmq_commits = $(if $(dep_$(1)), \
|
||||||
|
$(wordlist 3,$(words $(dep_$(1))),$(dep_$(1))), \
|
||||||
|
$(pkg_$(1)_commit))
|
||||||
|
|
||||||
|
define dep_fetch_git_rmq
|
||||||
|
fetch_url1='$(call dep_rmq_repo,$(RABBITMQ_CURRENT_FETCH_URL),$(1))'; \
|
||||||
|
fetch_url2='$(call dep_rmq_repo,$(RABBITMQ_UPSTREAM_FETCH_URL),$(1))'; \
|
||||||
|
if test "$$$$fetch_url1" != '$(RABBITMQ_CURRENT_FETCH_URL)' && \
|
||||||
|
git clone -q -n -- "$$$$fetch_url1" $(DEPS_DIR)/$(call dep_name,$(1)); then \
|
||||||
|
fetch_url="$$$$fetch_url1"; \
|
||||||
|
push_url='$(call dep_rmq_repo,$(RABBITMQ_CURRENT_PUSH_URL),$(1))'; \
|
||||||
|
elif git clone -q -n -- "$$$$fetch_url2" $(DEPS_DIR)/$(call dep_name,$(1)); then \
|
||||||
|
fetch_url="$$$$fetch_url2"; \
|
||||||
|
push_url='$(call dep_rmq_repo,$(RABBITMQ_UPSTREAM_PUSH_URL),$(1))'; \
|
||||||
|
fi; \
|
||||||
|
cd $(DEPS_DIR)/$(call dep_name,$(1)) && ( \
|
||||||
|
$(foreach ref,$(call dep_rmq_commits,$(1)), \
|
||||||
|
git checkout -q $(ref) >/dev/null 2>&1 || \
|
||||||
|
) \
|
||||||
|
(echo "error: no valid pathspec among: $(call dep_rmq_commits,$(1))" \
|
||||||
|
1>&2 && false) ) && \
|
||||||
|
(test "$$$$fetch_url" = "$$$$push_url" || \
|
||||||
|
git remote set-url --push origin "$$$$push_url")
|
||||||
|
endef
|
||||||
|
|
||||||
|
# --------------------------------------------------------------------
|
||||||
|
# Component distribution.
|
||||||
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
|
list-dist-deps::
|
||||||
|
@:
|
||||||
|
|
||||||
|
prepare-dist::
|
||||||
|
@:
|
||||||
|
|
||||||
|
# --------------------------------------------------------------------
|
||||||
|
# rabbitmq-components.mk checks.
|
||||||
|
# --------------------------------------------------------------------
|
||||||
|
|
||||||
|
# If this project is under the Umbrella project, we override $(DEPS_DIR)
|
||||||
|
# to point to the Umbrella's one. We also disable `make distclean` so
|
||||||
|
# $(DEPS_DIR) is not accidentally removed.
|
||||||
|
|
||||||
|
ifneq ($(wildcard ../../UMBRELLA.md),)
|
||||||
|
UNDER_UMBRELLA = 1
|
||||||
|
else ifneq ($(wildcard UMBRELLA.md),)
|
||||||
|
UNDER_UMBRELLA = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(UNDER_UMBRELLA),1)
|
||||||
|
ifneq ($(PROJECT),rabbitmq_public_umbrella)
|
||||||
|
DEPS_DIR ?= $(abspath ..)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(filter distclean distclean-deps,$(MAKECMDGOALS)),)
|
||||||
|
SKIP_DEPS = 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
UPSTREAM_RMQ_COMPONENTS_MK = $(DEPS_DIR)/rabbit_common/mk/rabbitmq-components.mk
|
||||||
|
|
||||||
|
check-rabbitmq-components.mk:
|
||||||
|
$(verbose) cmp -s rabbitmq-components.mk \
|
||||||
|
$(UPSTREAM_RMQ_COMPONENTS_MK) || \
|
||||||
|
(echo "error: rabbitmq-components.mk must be updated!" 1>&2; \
|
||||||
|
false)
|
||||||
|
|
||||||
|
ifeq ($(PROJECT),rabbit_common)
|
||||||
|
rabbitmq-components-mk:
|
||||||
|
@:
|
||||||
|
else
|
||||||
|
rabbitmq-components-mk:
|
||||||
|
$(gen_verbose) cp -a $(UPSTREAM_RMQ_COMPONENTS_MK) .
|
||||||
|
ifeq ($(DO_COMMIT),yes)
|
||||||
|
$(verbose) git diff --quiet rabbitmq-components.mk \
|
||||||
|
|| git commit -m 'Update rabbitmq-components.mk' rabbitmq-components.mk
|
||||||
|
endif
|
||||||
|
endif
|
Loading…
Reference in New Issue