summaryrefslogtreecommitdiff
path: root/packaging/debs
diff options
context:
space:
mode:
authorAlvaro Videla <videlalvaro@gmail.com>2015-11-12 16:31:50 +0100
committerAlvaro Videla <videlalvaro@gmail.com>2015-11-12 16:31:50 +0100
commit5931edc27eb3273945345dc3f9a784287df88ccd (patch)
tree59d300326b16c23ef202f0543f0e295241369af9 /packaging/debs
parent4e1dd3749d3a1bcd8778ba40ec8f00d1dbdb271a (diff)
parent9ce5036edd3d9ef116285565c8de8124601389e4 (diff)
downloadrabbitmq-server-git-5931edc27eb3273945345dc3f9a784287df88ccd.tar.gz
Merge branch 'master' into rabbitmq-server-351
Diffstat (limited to 'packaging/debs')
-rw-r--r--packaging/debs/Debian/.gitignore3
-rw-r--r--packaging/debs/Debian/Makefile61
-rw-r--r--packaging/debs/Debian/debian/compat2
-rw-r--r--packaging/debs/Debian/debian/control16
-rw-r--r--packaging/debs/Debian/debian/copyright52
-rw-r--r--packaging/debs/Debian/debian/rabbitmq-server.docs1
-rw-r--r--packaging/debs/Debian/debian/rabbitmq-server.manpages4
-rwxr-xr-x[-rw-r--r--]packaging/debs/Debian/debian/rules69
-rw-r--r--packaging/debs/Debian/debian/source/format1
-rw-r--r--packaging/debs/apt-repository/Makefile21
10 files changed, 175 insertions, 55 deletions
diff --git a/packaging/debs/Debian/.gitignore b/packaging/debs/Debian/.gitignore
new file mode 100644
index 0000000000..6a4aec11b5
--- /dev/null
+++ b/packaging/debs/Debian/.gitignore
@@ -0,0 +1,3 @@
+/debian/postrm
+/debian/stamp-makefile-build
+/rabbitmq-server_*
diff --git a/packaging/debs/Debian/Makefile b/packaging/debs/Debian/Makefile
index d9064c8729..8a39288b38 100644
--- a/packaging/debs/Debian/Makefile
+++ b/packaging/debs/Debian/Makefile
@@ -1,38 +1,53 @@
-TARBALL_DIR=../../../dist
-TARBALL=$(notdir $(wildcard $(TARBALL_DIR)/rabbitmq-server-[0-9.]*.tar.gz))
-COMMON_DIR=../../common
-VERSION=$(shell echo $(TARBALL) | sed -e 's:rabbitmq-server-\(.*\)\.tar\.gz:\1:g')
+SOURCE_DIST_FILE ?= $(wildcard ../../../rabbitmq-server-*.tar.xz)
-DEBIAN_ORIG_TARBALL=$(shell echo $(TARBALL) | sed -e 's:\(.*\)-\(.*\)\(\.tar\.gz\):\1_\2\.orig\3:g')
-UNPACKED_DIR=rabbitmq-server-$(VERSION)
-PACKAGENAME=rabbitmq-server
-SIGNING_KEY_ID=056E8E56
+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_ID)
+ SIGNING=-k$(SIGNING_KEY)
endif
-all:
- @echo 'Please choose a target from the Makefile.'
+unexport DEPS_DIR
+unexport ERL_LIBS
+
+all: package
+ @:
package: clean
- cp $(TARBALL_DIR)/$(TARBALL) $(DEBIAN_ORIG_TARBALL)
- tar -zxf $(DEBIAN_ORIG_TARBALL)
- cp -r debian $(UNPACKED_DIR)
- cp $(COMMON_DIR)/* $(UNPACKED_DIR)/debian/
- sed -i -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"|' \
- $(UNPACKED_DIR)/debian/rabbitmq-script-wrapper
- chmod a+x $(UNPACKED_DIR)/debian/rules
- echo "This package was debianized by Tony Garnock-Jones <tonyg@rabbitmq.com> on\nWed, 3 Jan 2007 15:43:44 +0000.\n\nIt was downloaded from http://www.rabbitmq.com/\n\n" > $(UNPACKED_DIR)/debian/copyright
- cat $(UNPACKED_DIR)/LICENSE >> $(UNPACKED_DIR)/debian/copyright
- echo "\n\nThe Debian packaging is (C) 2007-2013, GoPivotal, Inc. and is licensed\nunder the MPL 1.1, see above.\n" >> $(UNPACKED_DIR)/debian/copyright
+ cp -a $(SOURCE_DIST_FILE) $(DEBIAN_ORIG_TARBALL)
+ tar -Jxf $(DEBIAN_ORIG_TARBALL)
+ 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 -rfakeroot $(SIGNING)
+ 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 $(PACKAGENAME)_*.tar.gz
diff --git a/packaging/debs/Debian/debian/compat b/packaging/debs/Debian/debian/compat
index 7ed6ff82de..ec635144f6 100644
--- a/packaging/debs/Debian/debian/compat
+++ b/packaging/debs/Debian/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/packaging/debs/Debian/debian/control b/packaging/debs/Debian/debian/control
index 8d018dd46c..56acaa948e 100644
--- a/packaging/debs/Debian/debian/control
+++ b/packaging/debs/Debian/debian/control
@@ -2,9 +2,19 @@ Source: rabbitmq-server
Section: net
Priority: extra
Maintainer: RabbitMQ Team <info@rabbitmq.com>
-Uploaders: RabbitMQ Team <info@rabbitmq.com>
-Build-Depends: cdbs, debhelper (>= 5), erlang-dev, python-simplejson, xmlto, xsltproc, erlang-nox (>= 1:16.b.3), erlang-src (>= 1:16.b.3), unzip, zip
-Standards-Version: 3.9.2
+Uploaders: Alvaro Videla <alvaro@rabbitmq.com>,
+ Michael Klishin <michael@rabbitmq.com>,
+ Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com>,
+ Giuseppe Privitera <giuseppe@rabbitmq.com>
+Build-Depends: debhelper (>= 9),
+ erlang-dev,
+ python-simplejson,
+ xmlto,
+ xsltproc,
+ erlang-nox (>= 1:16.b.3),
+ zip,
+ rsync
+Standards-Version: 3.9.4
Package: rabbitmq-server
Architecture: all
diff --git a/packaging/debs/Debian/debian/copyright b/packaging/debs/Debian/debian/copyright
new file mode 100644
index 0000000000..521b903754
--- /dev/null
+++ b/packaging/debs/Debian/debian/copyright
@@ -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.
diff --git a/packaging/debs/Debian/debian/rabbitmq-server.docs b/packaging/debs/Debian/debian/rabbitmq-server.docs
new file mode 100644
index 0000000000..40d4f2dc81
--- /dev/null
+++ b/packaging/debs/Debian/debian/rabbitmq-server.docs
@@ -0,0 +1 @@
+docs/rabbitmq.config.example
diff --git a/packaging/debs/Debian/debian/rabbitmq-server.manpages b/packaging/debs/Debian/debian/rabbitmq-server.manpages
new file mode 100644
index 0000000000..e0220b47c3
--- /dev/null
+++ b/packaging/debs/Debian/debian/rabbitmq-server.manpages
@@ -0,0 +1,4 @@
+docs/rabbitmq-env.conf.5
+docs/rabbitmq-plugins.1
+docs/rabbitmq-server.1
+docs/rabbitmqctl.1
diff --git a/packaging/debs/Debian/debian/rules b/packaging/debs/Debian/debian/rules
index 434172defc..053df18115 100644..100755
--- a/packaging/debs/Debian/debian/rules
+++ b/packaging/debs/Debian/debian/rules
@@ -1,26 +1,57 @@
#!/usr/bin/make -f
+# -*- makefile -*-
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/makefile.mk
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
-RABBIT_LIB=$(DEB_DESTDIR)usr/lib/rabbitmq/lib/rabbitmq_server-$(DEB_UPSTREAM_VERSION)/
-RABBIT_BIN=$(DEB_DESTDIR)usr/lib/rabbitmq/bin/
+DEB_DESTDIR = debian/rabbitmq-server
+VERSION = $(shell dpkg-parsechangelog | awk '/^Version:/ {version=$$0; sub(/Version: /, "", version); sub(/-.*/, "", version); print version;}')
-DOCDIR=$(DEB_DESTDIR)usr/share/doc/rabbitmq-server/
-DEB_MAKE_INSTALL_TARGET := install TARGET_DIR=$(RABBIT_LIB) SBIN_DIR=$(RABBIT_BIN) DOC_INSTALL_DIR=$(DOCDIR) MAN_DIR=$(DEB_DESTDIR)usr/share/man/
-DEB_MAKE_CLEAN_TARGET:= distclean
-DEB_INSTALL_DOCS_ALL=debian/README
+%:
+ dh $@ --parallel
-install/rabbitmq-server::
- mkdir -p $(DOCDIR)
- rm $(RABBIT_LIB)LICENSE* $(RABBIT_LIB)INSTALL*
- for script in rabbitmqctl rabbitmq-server rabbitmq-plugins; do \
- install -p -D -m 0755 debian/rabbitmq-script-wrapper $(DEB_DESTDIR)usr/sbin/$$script; \
+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
- sed -e 's|@RABBIT_LIB@|/usr/lib/rabbitmq/lib/rabbitmq_server-$(DEB_UPSTREAM_VERSION)|g' <debian/postrm.in >debian/postrm
- install -p -D -m 0755 debian/rabbitmq-server.ocf $(DEB_DESTDIR)usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server
- install -p -D -m 0755 debian/rabbitmq-server-ha.ocf $(DEB_DESTDIR)usr/lib/ocf/resource.d/rabbitmq/rabbitmq-server-ha
- install -p -D -m 0644 debian/rabbitmq-server.default $(DEB_DESTDIR)etc/default/rabbitmq-server
-clean::
- rm -f plugins-src/rabbitmq-server debian/postrm plugins/README
+ 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
diff --git a/packaging/debs/Debian/debian/source/format b/packaging/debs/Debian/debian/source/format
new file mode 100644
index 0000000000..163aaf8d82
--- /dev/null
+++ b/packaging/debs/Debian/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/packaging/debs/apt-repository/Makefile b/packaging/debs/apt-repository/Makefile
index ce4347bcb4..bbddc15a4e 100644
--- a/packaging/debs/apt-repository/Makefile
+++ b/packaging/debs/apt-repository/Makefile
@@ -1,27 +1,30 @@
-SIGNING_USER_EMAIL=info@rabbitmq.com
+PACKAGES_DIR ?= ../../../PACKAGES
+REPO_DIR ?= debian
+
+SIGNING_USER_EMAIL ?= info@rabbitmq.com
ifeq "$(UNOFFICIAL_RELEASE)" ""
-HOME_ARG=HOME=$(GNUPG_PATH)
+HOME_ARG = HOME=$(GNUPG_PATH)
endif
all: debian_apt_repository
clean:
- rm -rf debian
+ 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 debian/conf
- cp -a distributions debian/conf
+ mkdir -p $(REPO_DIR)/conf
+ cp -a distributions $(REPO_DIR)/conf
ifeq "$(UNOFFICIAL_RELEASE)" ""
- echo SignWith: $(SIGNING_USER_EMAIL) >> debian/conf/distributions
+ echo SignWith: $(SIGNING_USER_EMAIL) >> $(REPO_DIR)/conf/distributions
endif
- for FILE in ../Debian/*.changes ; do \
+ for FILE in $(PACKAGES_DIR)/*.changes ; do \
$(HOME_ARG) reprepro --ignore=wrongdistribution \
- -Vb debian include kitten $${FILE} ; \
+ -Vb $(REPO_DIR) include kitten $${FILE} ; \
done
- reprepro -Vb debian createsymlinks
+ reprepro -Vb $(REPO_DIR) createsymlinks
else
debian_apt_repository:
@echo Not building APT repository as reprepro could not be found