From 838e365c75c18836d2d258d62e5405745f8965db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Wed, 19 Jul 2017 10:54:55 +0200 Subject: [PATCH 1/5] packaging/debs/Debian/Makefile: Use cp(1) instead of rsync(1) We don't need the full power of rsync(1) here and this removes a dependency on a possibly non-default package. --- packaging/debs/Debian/Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packaging/debs/Debian/Makefile b/packaging/debs/Debian/Makefile index a377b8ffe1..ffceb6b5ba 100644 --- a/packaging/debs/Debian/Makefile +++ b/packaging/debs/Debian/Makefile @@ -75,11 +75,7 @@ endif # Prepare the source directory: we extract the source archive and copy # the debian/ subdirectory. xzcat "$(DEBIAN_ORIG_TARBALL)" | tar -xf - - rsync -a \ - --exclude '.sw?' --exclude '.*.sw?' \ - --exclude '.git*' \ - --delete --delete-excluded \ - debian/ "$(UNPACKED_DIR)/debian/" + cp -a debian "$(UNPACKED_DIR)/debian" # Possibly update debian/changelog (in the created source directory): # - if it contains an entry for the specified version, do nothing; # - otherwise, prepend a generated entry using "1" as the package From f466ed75e277e6301408ed626407c4c123e8a16c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Wed, 19 Jul 2017 10:56:16 +0200 Subject: [PATCH 2/5] packaging/debs/Debian/Makefile: Install build dependencies We use mk-build-deps(1) from the `devscripts` package to help us with this. This helper script looks at `debian/control` and creates a meta-package which depends on the build dependencies. Then we only have to install it to get those dependencies. We only do this if `$(INSTALL_BUILD_DEPS)` is set to `yes`. We want to use this feature in CI, but not with the old build script where we cheat a lot around Erlang and Elixir packages. [#131645781] --- packaging/debs/Debian/Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packaging/debs/Debian/Makefile b/packaging/debs/Debian/Makefile index ffceb6b5ba..50c45be699 100644 --- a/packaging/debs/Debian/Makefile +++ b/packaging/debs/Debian/Makefile @@ -76,6 +76,20 @@ endif # the debian/ subdirectory. xzcat "$(DEBIAN_ORIG_TARBALL)" | tar -xf - cp -a debian "$(UNPACKED_DIR)/debian" +ifeq ($(INSTALL_BUILD_DEPS),yes) +# Install build dependencies. To help us, we use mk-build-deps(1) from +# the devscripts package. +# +# We ignore errors from the first `dpkg -i` because the command will +# fail: dependencies are missing and dpkg(8) doesn't install them. +# That's why we have `apt-get install -f` following. To double-check +# everything went fine, we have the second `dpkg -i`. + apt-get install -y --no-install-recommends devscripts equivs + mk-build-deps debian/control + -dpkg -i ./rabbitmq-server-build-deps_*_all.deb + apt-get install -y -f -V --no-install-recommends + dpkg -i ./rabbitmq-server-build-deps_*_all.deb +endif # Possibly update debian/changelog (in the created source directory): # - if it contains an entry for the specified version, do nothing; # - otherwise, prepend a generated entry using "1" as the package From 249fb6d1f64e674431ef45cc725310b18256d69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Wed, 19 Jul 2017 13:51:56 +0200 Subject: [PATCH 3/5] debian/control: Add version restriction on erlang-dev and esl-erlang --- packaging/debs/Debian/debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/debs/Debian/debian/control b/packaging/debs/Debian/debian/control index 050051ba3f..c0f892ecdd 100644 --- a/packaging/debs/Debian/debian/control +++ b/packaging/debs/Debian/debian/control @@ -7,11 +7,11 @@ Uploaders: Michael Klishin , Jean-Sébastien Pédron Build-Depends: debhelper (>= 9), dh-systemd (>= 1.5), - erlang-dev, python-simplejson, xmlto, xsltproc, - erlang-nox (>= 1:16.b.3) | esl-erlang, + erlang-nox (>= 1:16.b.3) | esl-erlang (>= 1:16.b.3-2), + erlang-dev (>= 1:16.b.3) | esl-erlang (>= 1:16.b.3-2), zip, rsync Standards-Version: 3.9.4 From 44f2dddc8379d44645c2f9bbbafeace522e4d5ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Wed, 19 Jul 2017 14:27:29 +0200 Subject: [PATCH 4/5] debian/control: Try with erlang-nox 1:16.b.3-3 The erlang-* 1:16.b.3 packages family (note the absence of the package revision) was only partially uploaded to the Erlang Solutions Debian repository... For instance, we have erlang-nox 1:16.b.3 and 1:16.b.3-3, but only erlang-base 1:16.b.3-3 :-/ [#131645781] --- packaging/debs/Debian/debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/debs/Debian/debian/control b/packaging/debs/Debian/debian/control index c0f892ecdd..8111dc1b9f 100644 --- a/packaging/debs/Debian/debian/control +++ b/packaging/debs/Debian/debian/control @@ -10,8 +10,8 @@ Build-Depends: debhelper (>= 9), python-simplejson, xmlto, xsltproc, - erlang-nox (>= 1:16.b.3) | esl-erlang (>= 1:16.b.3-2), - erlang-dev (>= 1:16.b.3) | esl-erlang (>= 1:16.b.3-2), + erlang-nox (>= 1:16.b.3-3) | esl-erlang (>= 1:16.b.3-2), + erlang-dev (>= 1:16.b.3-3) | esl-erlang (>= 1:16.b.3-2), zip, rsync Standards-Version: 3.9.4 From 18263db71c72fe3cf50f6d745199e2f3ee7508c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Wed, 19 Jul 2017 14:40:03 +0200 Subject: [PATCH 5/5] debian/control: Depend on erlang-src We need a private header in `lib/ssl-*/src`. --- packaging/debs/Debian/debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/debs/Debian/debian/control b/packaging/debs/Debian/debian/control index 8111dc1b9f..5deabdfcf4 100644 --- a/packaging/debs/Debian/debian/control +++ b/packaging/debs/Debian/debian/control @@ -12,6 +12,7 @@ Build-Depends: debhelper (>= 9), xsltproc, erlang-nox (>= 1:16.b.3-3) | esl-erlang (>= 1:16.b.3-2), erlang-dev (>= 1:16.b.3-3) | esl-erlang (>= 1:16.b.3-2), + erlang-src (>= 1:16.b.3-3) | esl-erlang (>= 1:16.b.3-2), zip, rsync Standards-Version: 3.9.4