Commit Graph

323 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron f12ddea4e2
debian/control: Mark Erlang 22+ as incompatible
We don't know yet if it is actually the case, but this is a safety for
the day Erlang 22.0 will be released, so that users are not in trouble
before we validated that RabbitMQ works with the new release.

[#160088605]
2018-09-04 15:13:38 +02:00
Jean-Sébastien Pédron 5e37fd046a
debian/control: Replace erlang-nox by "leaf" packages
erlang-nox is a meta-package which pulls in most useful Erlang
applications for a developer. Unfortunately, it doesn't pin the version
of those packages. So for instance, erlang-nox 19.3 could pull in
erlang-base 21.0 without a warning.

This patch replaces this meta-package by all the "leaf" packages
RabbitMQ really depends on. By "really depends on", the list was reduced
compared to all the packages installed by erlang-nox, but it's still
conservative (i.e. it could probably be cleaned up further).

[#160232286]
2018-09-03 15:10:52 +02:00
Jean-Sébastien Pédron d769d1843f
packaging/standalone/Makefile: Copy `no_dot_erlang.boot` to the package
This boot script is required by escript(1).

[#160088605]
2018-08-29 18:46:28 +02:00
Jean-Sébastien Pédron 8414e596fe
debian/control: Remove package revision from version requirement
The requirement is used to determine which version to pin. Before it had
to match exactly an available package version.

Now the script improved and it will use this requirement as a pattern
instead to figure out which package matches it. That's why the revision
must be dropped.

[#159273314]
2018-07-24 17:31:08 +02:00
Luke Bakken 72fd1d1c6e
Delete cookie if present, then copy 2018-07-03 14:22:16 -07:00
Luke Bakken 3ca236512c
Copy from "new" location of .erlang.cookie file
https://www.rabbitmq.com/install-windows-manual.html#erlang-cookie

Fixes #81

packaging/windows: Look at Erlang 20.2+ cookie's location as well

While here, check if the cookie exists before copying it. This fixes an
uninformative error message in the installer output.

Use NSIS variable $SYSDIR
2018-07-03 12:27:34 -07:00
Jean-Sébastien Pédron 876f48472b
debian/control: Bump Elixir requirement to 1.6.6
This is the first verison of Elixir which officially supports Erlang
21.0.

[#157964874]
2018-06-25 13:15:12 +02:00
Michael Klishin 8470d3808e
Reflect the Elixir 1.6.0+ requirement in control file
Per discussion with @dumbbell.
2018-04-10 13:05:05 +03:00
Carl Hörberg 3e3255d063 Revert "Change to 2750"
This reverts commit 5df0873777.
2017-12-18 22:49:58 +01:00
Luke Bakken d630709ae7
Ensure files created by RabbitMQ are not world-readable. Add gid bit to /var/log/rabbitmq to ensure sub-directories and files are group-id "adm" 2017-12-18 08:20:58 -08:00
Carl Hörberg ead58795ef
Make adm group owner of /var/log/rabbitmq
Adm should be group owner of everything in /var/log according to Debian/Ubuntu guidelines. Makes it possible for users in the adm group to read logs without sudo:ing.
2017-12-18 08:20:58 -08:00
RabbitMQ CI a8f5d9df44 Add package changelog entries for 3.7.1-beta.1 2017-12-13 18:07:55 +00:00
Luke Bakken 99d3f6607f
Explicitly set our recommended open files limit
Comment out the value
2017-12-12 07:37:32 -08:00
RabbitMQ CI 000c83527e Add package changelog entries for 3.7.0 2017-11-29 16:52:39 +00:00
Daniil Fedotov d0d38ac449 Require Erlang 19.3 to install RabbitMQ on windows.
RabbitMQ will not start if erlang version is lower than 19.3.
Warn before installation starts.
2017-11-29 12:36:34 +00:00
Jean-Sébastien Pédron 661ec919dc
packaging: Bump minmum Erlang version to 19.3 in Debian & RPM packages
[#153052754, #153171868]
2017-11-27 12:46:48 +01:00
RabbitMQ CI 2755a5a5d1 Add package changelog entries for 3.7.0-rc.2 2017-11-16 17:50:24 +00:00
Michael Klishin c641f7bb51
Merge branch 'stable'
Conflicts:
	packaging/RPMS/Fedora/rabbitmq-server.service
	packaging/debs/Debian/debian/rabbitmq-server.service
2017-11-07 06:50:12 +02:00
Michael Klishin f1fb6d74ff
systemd does not support trailing comments, so don't use them
Closes rabbitmq/rabbitmq-server#1422.
2017-11-07 06:48:38 +02:00
Luke Bakken efb74c2bc9
Remove in-line comments from RPM systemd file because systemd complains about them 2017-10-30 06:53:40 -07:00
Luke Bakken 1bee575089
Use `rabbitmqctl shutdown` on RPM-based systems 2017-10-30 06:29:35 -07:00
Diana Corbacho 0d8fb609bf Use `rabbitmqctl shutdown` with systemd
[#151554248]
2017-10-30 12:38:23 +00:00
Jean-Sébastien Pédron 76bf86557f
Merge branch 'stable' 2017-10-17 19:04:36 +02:00
Jean-Sébastien Pédron cb7555f530
packaging/standalone: Include `rabbit` dependencies when creating the release script
Before this, this was working by chance because those dependencies were
brought by plugins. But if we build the package without any plugins, the
script complains about requires missing applications (kernel and
stdlib), and if we add hard-code them, it complains about other Erlang
applications not listed (sasl, mnesia, os_mon, ...).
2017-10-17 19:02:28 +02:00
Jean-Sébastien Pédron cdf340d3c7
Merge branch 'stable' 2017-10-17 17:46:53 +02:00
Jean-Sébastien Pédron c571ef2cc3
package/standalone: Remove rabbit_release.beam on cleanup 2017-10-17 17:46:22 +02:00
Luke Bakken 6785376923
Merge branch 'stable' 2017-09-29 10:16:09 -07:00
Luke Bakken e5a2609fcb
Add setting to consider exit code 69 as success
Fixes #51

See rabbitmq/rabbitmq-server#1381 for details.
2017-09-29 09:24:40 -07:00
cll 7ecae0ba48
Set the shell to /sbin/nologin for security 2017-09-26 11:18:31 +03:00
cll 17332c8408 Set the shell to /sbin/nologin for security 2017-09-25 16:04:51 +08:00
Michael Klishin 0f6085ef4c
Merge branch 'stable' 2017-09-20 14:38:22 -06:00
Luke Bakken c811fba5d9
Add settings to have systemd restart RMQ on failure 2017-09-20 09:57:38 -07:00
Luke Bakken 07ad84c66a
Add optional Restart and RestartSec configuration
See rabbitmq/rabbitmq-server#1359

This gives guidances for those users who wish to automatically restart RabbitMQ in the event of a failure. Tested by using the `Restart=on-failure` setting, then running `rabbitmqctl eval "erlang:halt(abort)."`
2017-09-19 15:54:57 -07:00
RabbitMQ CI c6cd7bc351 Add package changelog entries for 3.7.0-rc.1 2017-09-18 14:43:34 +00:00
Jean-Sébastien Pédron e81521f7b1
debian/dirs: Fix typo in /ets/profile.d; should be /etc
Ubuntu's Software Center reports a warning and Lintian reports the
following error:

    E: rabbitmq-server: non-standard-toplevel-dir ets/

Reported by Giuliano Franchetto on #rabbitmq IRC channel.
2017-09-14 17:46:50 +02:00
Jean-Sébastien Pédron f86423feeb
packaging: Set log directory permissions on fresh install
On a fresh install, we want to limit access to the log directory to the
owner and group. This is in case sensitive data are logged.

We don't enforce the permissions on upgrade because:
    1. We don't want to break exising installs by reducing
       permissions.
    2. The admin may want to setup different permissions.

References rabbitmq/rabbitmq-management#474.
[#150970897]
2017-09-12 15:56:36 +02:00
Jean-Sébastien Pédron 76e999049c
Merge branch 'stable' 2017-09-12 12:40:11 +02:00
Jean-Sébastien Pédron 2c4038a14c
packaging/RPMS/Fedora/scripts/update-changelog.sh: .spec is now optional
It then defaults to the one in the parent directory.

(cherry picked from commit c028327c2b)
2017-09-12 12:38:00 +02:00
RabbitMQ CI 196199d994 Add package changelog entries for 3.7.0-beta.20 2017-09-12 07:49:21 +00:00
Michael Klishin e71932d293 Commit package change logs 2017-09-11 17:22:21 +01:00
Jean-Sébastien Pédron c028327c2b
packaging/RPMS/Fedora/scripts/update-changelog.sh: .spec is now optional
It then defaults to the one in the parent directory.
2017-09-11 17:40:11 +02:00
Tianon Gravi 9086607688
Remove duplicate (and presumed invalid) "AVR32"
(cherry picked from commit 0c25ec5acf)
2017-09-08 16:36:20 +02:00
Tianon Gravi 243d9b5cc3
packaging/debs/apt-repository/distributions: Add more valid `Architectures`
See the first column of https://sources.debian.net/src/dpkg/stretch/data/cputable/ for where these values were sourced from.

(cherry picked from commit 6bfb41ab24)
2017-09-08 16:36:04 +02:00
Tianon Gravi 0c25ec5acf Remove duplicate (and presumed invalid) "AVR32" 2017-09-07 14:26:00 -07:00
Tianon Gravi 6bfb41ab24 packaging/debs/apt-repository/distributions: Add more valid `Architectures`
See the first column of https://sources.debian.net/src/dpkg/stretch/data/cputable/ for where these values were sourced from.
2017-09-06 15:14:43 -07:00
Jean-Sébastien Pédron 4b9d48a07d
packaging/RPMS: Do not sign sles11 packages
SLES 11 provides RPM 4.4 which fails to verify package signatures. It's
unclear what is the real cause, but all settings we tried were rejected
(v4/v3 signatures, MD5 or SHA1 digests).

So for now, disable package signing entirely for SLES 11.

[#150792874]

(cherry picked from commit c54728f51a)
2017-09-05 10:42:16 +02:00
Jean-Sébastien Pédron af28e658fd
Revert "packaging: Force GPG v3 signatures for the SLES 11 RPM package"
Using GPG v3/v4 signatures wasn't the problem. My test was wrong: the
tested package was not signed. So even a GPG v3 signature is refused by
RPM.

In fact, it looks like RPM 4.4 has issues with package signature
verifications. Perhaps related to the SHA1 digest (but using an MD4
digest doesn't solve the problem). The cause is unclear.

Only RPM 4.4 is available on SLES 11. So for now, revert this change.

This reverts commit dc783c737a.

(cherry picked from commit 703081cdc0)
2017-09-05 10:42:05 +02:00
Jean-Sébastien Pédron c54728f51a
packaging/RPMS: Do not sign sles11 packages
SLES 11 provides RPM 4.4 which fails to verify package signatures. It's
unclear what is the real cause, but all settings we tried were rejected
(v4/v3 signatures, MD5 or SHA1 digests).

So for now, disable package signing entirely for SLES 11.

[#150792874]
2017-09-05 10:02:34 +02:00
Jean-Sébastien Pédron 703081cdc0
Revert "packaging: Force GPG v3 signatures for the SLES 11 RPM package"
Using GPG v3/v4 signatures wasn't the problem. My test was wrong: the
tested package was not signed. So even a GPG v3 signature is refused by
RPM.

In fact, it looks like RPM 4.4 has issues with package signature
verifications. Perhaps related to the SHA1 digest (but using an MD4
digest doesn't solve the problem). The cause is unclear.

Only RPM 4.4 is available on SLES 11. So for now, revert this change.

This reverts commit dc783c737a.
2017-09-05 09:53:52 +02:00
Jean-Sébastien Pédron dc783c737a
packaging: Force GPG v3 signatures for the SLES 11 RPM package
It looks like RPM on SLES 11 fails to handle GPG v4 signatures, even
though it happily signed it:

    # rpm -K -vvv  ./rabbitmq-server-3.7.0~alpha.378-1.sles11.noarch.rpm
    ./rabbitmq-server-3.7.0~alpha.378-1.sles11.noarch.rpm:
        Header V4 RSA/SHA1 signature: BAD, key ID 6026dfca
        Header SHA1 digest: OK (895933d0ba5eca00759ebdfaa0d4e5d156ad0985)
        V4 RSA/SHA1 signature: BAD, key ID 6026dfca
        MD5 digest: OK (422c5b455a0f63055d5cd8701da8064b)

After forcing a GPG v3 signature, the signature check is successful:

    # rpm -v -K ./rabbitmq-server-3.6.12.rc2+1.gf3f347e.dirty-1.sles11.noarch.rpm
    ./rabbitmq-server-3.6.12.rc2+1.gf3f347e.dirty-1.sles11.noarch.rpm:
        Header SHA1 digest: OK (a9235a3ec1f7a893bd1fe2ec20c011542cfe88d4)
        MD5 digest: OK (fd555d5b73180efcb8232f1f0a5a8a61)

[#150792874]

(cherry picked from commit 051f230096)
2017-09-05 00:14:47 +02:00
Jean-Sébastien Pédron 051f230096
packaging: Force GPG v3 signatures for the SLES 11 RPM package
It looks like RPM on SLES 11 fails to handle GPG v4 signatures, even
though it happily signed it:

    # rpm -K -vvv  ./rabbitmq-server-3.7.0~alpha.378-1.sles11.noarch.rpm
    ./rabbitmq-server-3.7.0~alpha.378-1.sles11.noarch.rpm:
        Header V4 RSA/SHA1 signature: BAD, key ID 6026dfca
        Header SHA1 digest: OK (895933d0ba5eca00759ebdfaa0d4e5d156ad0985)
        V4 RSA/SHA1 signature: BAD, key ID 6026dfca
        MD5 digest: OK (422c5b455a0f63055d5cd8701da8064b)

After forcing a GPG v3 signature, the signature check is successful:

    # rpm -v -K ./rabbitmq-server-3.6.12.rc2+1.gf3f347e.dirty-1.sles11.noarch.rpm
    ./rabbitmq-server-3.6.12.rc2+1.gf3f347e.dirty-1.sles11.noarch.rpm:
        Header SHA1 digest: OK (a9235a3ec1f7a893bd1fe2ec20c011542cfe88d4)
        MD5 digest: OK (fd555d5b73180efcb8232f1f0a5a8a61)

[#150792874]
2017-09-05 00:03:41 +02:00
Jean-Sébastien Pédron db554ea736
Merge branch 'stable' 2017-09-01 17:54:55 +02:00
Jean-Sébastien Pédron f3f347e059
packaging: Rename `suse1012` to `sles11`
This matches the distribution name and version we want to target (i.e.
SLES 11). In the future, we might want to also create an SLES 12
package.

Also, enable the new package in the default build. Before this, the
default target (`all`) would call `package-rpm-opensuse`. So
`package-rpm-suse` and `package-rpm-opensuse1012` were unused.

While here, the RPM-specific targets were reworked a bit. Here is the
dependency tree:

    package
    `-- package-rpm
        |-- package-rpm-redhat
	|   |-- package-rpm-rhel6
	|   `-- package-rpm-rhel7
	`-- package-rpm-suse
	    |-- package-rpm-opensuse
	    `-- package-rpm-sles11

For some reason, package-rpm-fedora isn't called at all. I don't know
why, this needs to be investigated.
2017-09-01 17:51:45 +02:00
Michael Klishin b52a5ea144
Merge branch 'stable' 2017-08-29 18:00:31 -06:00
Gabriele Santomaggio a14e38003e Refactor script names 2017-08-29 21:33:21 +02:00
Gabriele Santomaggio 9274b5ab1c Change the packages name 2017-08-29 20:45:41 +02:00
Gabriele Santomaggio c53064dfbe Create two different packages for OpenSuse
Fixes https://github.com/rabbitmq/rabbitmq-server-release/issues/41

1 - support with systemd
2 - no systemd ( for old versions )
2017-08-29 14:08:51 +02:00
Luke Bakken c8b6b74a9c
Fixes for SELinux support
Use /sbin/runuser to execute script as the `rabbitmq` user as this command
does not cause issues with SELinux. See #32 for details.
2017-08-16 20:13:30 -07:00
Michael Klishin 00469eba2f
Merge branch 'stable' 2017-08-16 19:01:01 +03:00
Michael Klishin b2c830a76d Commit package change logs 2017-08-16 13:25:30 +01:00
Michael Klishin 16bedf2021
Merge branch 'stable' 2017-08-11 02:25:09 +03:00
Michael Klishin 268e907b0b Merge pull request #38 from rabbitmq/rabbitmq-server-1324
Configure shortcuts to run as admin.
2017-08-10 20:26:02 +03:00
Jean-Sébastien Pédron 182f773c92
debian/control: Revert the use of ${misc:Depends}
This reverts part of commit 851561953a.

We need to hard-code the dependency on init-system-helpers to support
Ubuntu 14.04.

(cherry picked from commit 12d2edad42)
2017-08-10 15:58:22 +02:00
Jean-Sébastien Pédron 12d2edad42
debian/control: Revert the use of ${misc:Depends}
This reverts part of commit 851561953a.

We need to hard-code the dependency on init-system-helpers to support
Ubuntu 14.04.
2017-08-10 15:57:35 +02:00
Jean-Sébastien Pédron f7641be403
debian/control: Use ${misc:Depends} instead of hard-coding dependencies
... which are added by debhelper. In this case, this is
init-system-helpers which is added by dh-systemd.

While here, bump the standard version to 3.9.6.

(cherry picked from commit 851561953a)
2017-08-10 15:02:01 +02:00
Jean-Sébastien Pédron 851561953a
debian/control: Use ${misc:Depends} instead of hard-coding dependencies
... which are added by debhelper. In this case, this is
init-system-helpers which is added by dh-systemd.

While here, bump the standard version to 3.9.6.
2017-08-10 14:59:10 +02:00
Markos Chandras 2d8de4c093
packaging: rpms: Add systemd support for openSUSE
Recent openSUSE releases have been migrated to systemd so use the
%{suse_version} macro to detect if we are building on openSUSE
so we can include the necessary systemd files and also perform the
needed systemd steps. This also defines the 'suse_version' to 1315
which is what openSUSE Leap 42.x use. This also drops the buggy rhel7
conditional for the sysvinit script and use another 'find' command
instead. The previous condition was wrong since it would also try
to include the sysvinit file on openSUSE and Fedora which do not
define the %rhel macro and as such the 0 < 7 conditional was always
true.

(cherry picked from commit 2211e5fe44)
2017-08-10 13:32:37 +02:00
Daniil Fedotov ea41a1cf6a Configure shortcuts to run as admin.
Shortcuts for `rabbitmq-service.bat` should run as admin
because system control tools require admin.
Also make shortcuts run a command prompt and do not exit if there
is an error, so the error can be seen by an operator.

Part of rabbitmq/rabbitmq-server#1324
[#149953545]
2017-08-08 17:26:27 +01:00
Jean-Sébastien Pédron c02877d6e8
Merge branch 'stable' 2017-08-03 16:42:21 +02:00
Jean-Sébastien Pédron 4ce314b062
packaging: Add scripts for format RabbitMQ version to match package constarints
I.e., for RPM and Debian, converts '-' to '~'.

[#131648373]
2017-08-03 16:39:33 +02:00
Jean-Sébastien Pédron 5c510175bd
packaging/debs/Debian/Makefile: Display Erlang version *after* installing it
In the old release build script, Erlang is already provided. However in
CI, Erlang is installed later in the Makefile recipe. Thus, display its
version only once we are sure Erlang is available.

(cherry picked from commit 5cb41b9434)
2017-08-03 11:23:48 +02:00
Jean-Sébastien Pédron 1195a9d014
packaging: Log the version of Erlang used to compile packages
This should help us diagnose situations where the version of Erlang used
to compile is greater than the minimum supported.

(cherry picked from commit 679518f911)
2017-08-03 11:23:33 +02:00
Jean-Sébastien Pédron 5cb41b9434
packaging/debs/Debian/Makefile: Display Erlang version *after* installing it
In the old release build script, Erlang is already provided. However in
CI, Erlang is installed later in the Makefile recipe. Thus, display its
version only once we are sure Erlang is available.
2017-08-03 11:13:49 +02:00
Jean-Sébastien Pédron 679518f911
packaging: Log the version of Erlang used to compile packages
This should help us diagnose situations where the version of Erlang used
to compile is greater than the minimum supported.
2017-08-03 10:42:47 +02:00
Jean-Sébastien Pédron d75d92ccd5
Merge branch 'stable' 2017-08-03 09:31:09 +02:00
Jean-Sébastien Pédron 3dc09be6a2
packaging/debs/apt-repository/distributions: Add `arm64` architecture 2017-08-03 09:29:43 +02:00
Jean-Sébastien Pédron 77f34b8897
packaging: Bump build/runtime requirement to Erlang 19.2
... for both Debian and RPM packages.

[#149744525]
2017-08-02 15:13:09 +02:00
Jean-Sébastien Pédron 4d777d2138
Merge branch 'stable' 2017-07-31 18:33:57 +02:00
Jean-Sébastien Pédron 2f50f82bf5
packaging/*/rabbitmq-server.service: Wait for RabbitMQ to stop in ExecStop
systemd considers that, when the ExecStop commands exit, the service is
stopped. If there are remaining processes in the cgroup, they are
killed.

Unfortunately, `rabbitmqctl stop` doesn't wait for the Erlang VM to
exit, it just notifies RabbitMQ to stop. Because it doesn't wait,
systemd kills other processes such as `erl_child_setup`. When this
happens, the Erlang VM crashes (because it can't reach `erl_child_setup`
anymore) and the service enters the failed state in systemd. Note the
"erl_child_setup closed" message in the following output:

    [root@ip-172-31-29-47 package-testing]# systemctl status rabbitmq-server
    ● rabbitmq-server.service - RabbitMQ broker
       Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; disabled; vendor preset: disabled)
       Active: failed (Result: exit-code) since Mon 2017-07-31 14:54:42 UTC; 1s ago
      Process: 26763 ExecStop=/usr/sbin/rabbitmqctl stop (code=exited, status=0/SUCCESS)
      Process: 26398 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
     Main PID: 26398 (code=exited, status=1/FAILURE)
       Status: "Initialized"

    Jul 31 14:54:30 ip-172-31-29-47 rabbitmq-server[26398]: completed with 0 plugins.
    Jul 31 14:54:40 ip-172-31-29-47 systemd[1]: Stopping RabbitMQ broker...
    Jul 31 14:54:41 ip-172-31-29-47 rabbitmqctl[26763]: Stopping and halting node 'rabbit@ip-172-31-29-47'
    Jul 31 14:54:41 ip-172-31-29-47 rabbitmq-server[26398]: Gracefully halting Erlang VM
    Jul 31 14:54:41 ip-172-31-29-47 rabbitmq-server[26398]: erl_child_setup closed
    Jul 31 14:54:42 ip-172-31-29-47 rabbitmq-server[26398]: Crash dump is being written to: erl_crash.dump...done
    Jul 31 14:54:42 ip-172-31-29-47 systemd[1]: rabbitmq-server.service: main process exited, code=exited, status=1/FAILURE
    Jul 31 14:54:42 ip-172-31-29-47 systemd[1]: Stopped RabbitMQ broker.
    Jul 31 14:54:42 ip-172-31-29-47 systemd[1]: Unit rabbitmq-server.service entered failed state.
    Jul 31 14:54:42 ip-172-31-29-47 systemd[1]: rabbitmq-server.service failed.

Now, we add a second ExecStop which simply waits for the Erlang VM PID
to disappear. This looks to fix the issue.

[#149807109]
2017-07-31 18:33:38 +02:00
Jean-Sébastien Pédron 6cd251c19a
debian/control: Depend on erlang-dev and elixir
erlang-dev was missing (but present in `stable` branch), so probably a
mismerge.

elixir was missing and we require it for RabbitMQ 3.7.x.

[#131645781]
2017-07-19 15:04:07 +02:00
Jean-Sébastien Pédron 95132fa0a7
Merge branch 'stable' 2017-07-19 14:56:22 +02:00
Jean-Sébastien Pédron 18263db71c
debian/control: Depend on erlang-src
We need a private header in `lib/ssl-*/src`.
2017-07-19 14:40:03 +02:00
Jean-Sébastien Pédron 44f2dddc83
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]
2017-07-19 14:27:29 +02:00
Jean-Sébastien Pédron 249fb6d1f6
debian/control: Add version restriction on erlang-dev and esl-erlang 2017-07-19 13:51:56 +02:00
Jean-Sébastien Pédron f466ed75e2
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]
2017-07-19 10:56:16 +02:00
Jean-Sébastien Pédron 838e365c75
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.
2017-07-19 10:54:55 +02:00
Markos Chandras 2211e5fe44 packaging: rpms: Add systemd support for openSUSE
Recent openSUSE releases have been migrated to systemd so use the
%{suse_version} macro to detect if we are building on openSUSE
so we can include the necessary systemd files and also perform the
needed systemd steps. This also defines the 'suse_version' to 1315
which is what openSUSE Leap 42.x use. This also drops the buggy rhel7
conditional for the sysvinit script and use another 'find' command
instead. The previous condition was wrong since it would also try
to include the sysvinit file on openSUSE and Fedora which do not
define the %rhel macro and as such the 0 < 7 conditional was always
true.
2017-06-29 16:12:23 +01:00
Jean-Sébastien Pédron cf0d1f4ba5
Merge branch 'stable' 2017-06-26 13:01:41 +02:00
Gabriele Santomaggio 5df0873777 Change to 2750 2017-06-23 12:27:08 +02:00
Gabriele Santomaggio ada3834633 Add chmod g+s to rpm spec 2017-06-22 14:44:45 +02:00
Gabriele Santomaggio fecde3e918 Add chmod g+s to /etc/rabbitmq 2017-06-22 08:54:38 +02:00
Michael Klishin 64ce04298e
Merge branch 'stable' 2017-05-26 17:29:11 +03:00
Michael Klishin 62513438d9 Commit .deb and .rpm change logs 2017-05-25 12:57:46 +01:00
Michael Klishin c8ed53f6ed
Update man page filenames 2017-05-10 04:02:25 +03:00
Michael Klishin 63a423c83e
Merge branch 'stable' 2017-04-12 13:23:47 +03:00
Michael Klishin 46ffbfa350 Commit 3.6.9 package change logs 2017-04-12 10:30:09 +01:00
Jean-Sébastien Pédron 055164bc24
Merge branch 'stable' 2017-03-28 18:02:54 +02:00
Jean-Sébastien Pédron bd14baae96
packaging/windows: Try to compute a valid default `PRODUCTVERSION`
The `PRODUCTVERSION` must be four integers. So try to replace
everything following the first three integers in the the
semver-formatted `$(VERSION)` by `.0`. For instance if `$(VERSION)` is
`3.6.8+1.g1dcb221`, `PRODUCTVERSION` will be set to `3.6.8.0`.

This should make Windows installer builds successful out-of-the-box.

This is still possible to override this behavior by setting the
`$(PRODUCT_VERSION)` Make variable.

[#142391637]
2017-03-28 11:45:58 +02:00
Jean-Sébastien Pédron 106f94a8c1
packaging/debian: Fix Erlang dependency at runtime
The package already depended on Erlang 18.3 at build time, but not at
runtime (where Erlang R16B03 was still advertised).
2017-03-21 16:02:58 +01:00
Michael Klishin a6c5f1479e
Merge branch 'stable' 2017-03-17 19:11:37 +03:00
Michael Klishin 1dcb2211d1 Commit .deb and .rpm change logs 2017-03-17 12:16:00 +00:00
Jean-Sébastien Pédron 52c67750db
packaging/standalone: Copy `start_clean.boot` to bin driectory
This boot script is required by escript(1). Without it, escript(1) fails
with the following error:

    {"init terminating in do_boot",{'cannot get bootfile','start_clean.boot'}}
    init terminating in do_boot ()

[#141679931]

(cherry picked from commit 7ffe744d66)
2017-03-16 09:33:57 +01:00
Jean-Sébastien Pédron 276ac72801
packaging/standalone: Fix path to the source `rabbit.rel` file
[#141674113]

(cherry picked from commit 44f41f02eb)
2017-03-16 09:33:57 +01:00
Jean-Sébastien Pédron 4caa7328bc
packaging/standalone: Remove the source `rabbit.rel` file
It is copied to the release directory, we don't need to keep the initial
file.

[#141674113]

(cherry picked from commit b7fadb7959)
2017-03-16 09:33:56 +01:00
Jean-Sébastien Pédron f2bd0e4d4d
packaging/standalone: Do not use NUL-separated filenames in manifest
tar(1) expects one file per line which is fine in our case.

[#141674113]

(cherry picked from commit feb07cf610)
2017-03-16 09:33:56 +01:00
Jean-Sébastien Pédron 65ff5cb2c7
packaging/standalone: Use an intermediate file to list files to archive
The problem is that xargs(1) has a limit on the number of bytes
it reads on stdin and we reach it. This leads to an archive
containing half of the expected files and xargs(1) never complains.
We apply the same fix which was previously appled in commit
b9dd874671.

[#141674113]

(cherry picked from commit 178fa534ea)
2017-03-16 09:33:56 +01:00
Jean-Sébastien Pédron dc9507a1d3
packaging/standalone: Remove temporary `expand` directory
... before we create the final archive. Otherwise, plugins are
duplicated and it wastes space.

[#141674113]

(cherry picked from commit 227921e821)
2017-03-16 09:33:55 +01:00
Michael Klishin 087b6dca64
Merge branch 'stable' 2017-03-15 16:05:39 +03:00
Michael Klishin 325ca85ba7 Commit .deb and .rpm change logs 2017-03-15 12:24:21 +00:00
Jean-Sébastien Pédron 7ffe744d66
packaging/standalone: Copy `start_clean.boot` to bin driectory
This boot script is required by escript(1). Without it, escript(1) fails
with the following error:

    {"init terminating in do_boot",{'cannot get bootfile','start_clean.boot'}}
    init terminating in do_boot ()

[#141679931]
2017-03-14 14:28:04 +01:00
Jean-Sébastien Pédron 44f41f02eb
packaging/standalone: Fix path to the source `rabbit.rel` file
[#141674113]
2017-03-14 12:46:05 +01:00
Jean-Sébastien Pédron b7fadb7959
packaging/standalone: Remove the source `rabbit.rel` file
It is copied to the release directory, we don't need to keep the initial
file.

[#141674113]
2017-03-14 12:29:41 +01:00
Jean-Sébastien Pédron feb07cf610
packaging/standalone: Do not use NUL-separated filenames in manifest
tar(1) expects one file per line which is fine in our case.

[#141674113]
2017-03-14 11:46:01 +01:00
Jean-Sébastien Pédron 178fa534ea
packaging/standalone: Use an intermediate file to list files to archive
The problem is that xargs(1) has a limit on the number of bytes
it reads on stdin and we reach it. This leads to an archive
containing half of the expected files and xargs(1) never complains.
We apply the same fix which was previously appled in commit
b9dd874671.

[#141674113]
2017-03-14 11:25:18 +01:00
Jean-Sébastien Pédron 227921e821
packaging/standalone: Remove temporary `expand` directory
... before we create the final archive. Otherwise, plugins are
duplicated and it wastes space.

[#141674113]
2017-03-14 11:24:15 +01:00
Jean-Sébastien Pédron ff51f24e43
Merge branch 'stable' 2017-03-06 19:39:48 +01:00
Jean-Sébastien Pédron d350dfac8a
Add `standalone-linux-x86_64` and `standalone-freebsd-x86_64` package targets
The `standalone-linux-x86_64` package will be used as a base for our BOSH
release. At least we'll experiment with this approach.

The `standalone-freebsd-x86_64` package is mostly for my local tests.

[#141141909]
2017-03-06 19:37:04 +01:00
Daniil Fedotov 8d7bc4ea94 Include rabbitmq-diagnostics into Debian and RPM packages
Fixes #16
2017-02-01 12:35:29 +00:00
Daniil Fedotov efa6dc068f Bump minimal erlang version for RPM packages 2017-01-31 12:15:57 +00:00
Michael Klishin b9f2df696d Correct a typo 2017-01-30 16:18:55 +03:00
Jean-Sébastien Pédron 84ca28fd2f
Merge branch 'stable' 2017-01-30 13:50:37 +01:00
Jean-Sébastien Pédron 02e6d097ca
packaging: package-rpm-suse is an alias for package-rpm-opensuse
[#131645273]
2017-01-30 13:49:14 +01:00
Michael Klishin a26974415f Merge branch 'master' into rabbitmq-server-release-12 2017-01-25 13:49:58 -08:00
Daniil Fedotov 5ce1de3c5f Print a hint to enable zsh autocompletion 2017-01-25 12:27:44 +00:00
Daniil Fedotov 7835f4c9c9 Reworked ZSH completion. It's now a function that should explicitely loaded on startup 2017-01-25 12:26:34 +00:00
Daniil Fedotov 3edcf92ada Source /etc/profile with shell builtin 2017-01-24 15:10:00 +00:00
Jean-Sébastien Pédron 56559ddab9
Merge branch 'stable' 2017-01-23 18:40:16 +01:00
Jean-Sébastien Pédron 1ed97a722c
packaging/RPMS: Fix SAVE_CHANGELOG handling
The problem is that it also saved the replacement of %%VERSION%% and
%%REQUIRES%%.

[#131645695]
2017-01-23 18:38:59 +01:00
Jean-Sébastien Pédron 4782cf5d5f
Merge branch 'stable' 2017-01-23 15:40:52 +01:00
Jean-Sébastien Pédron 1c54a8b426
packaging/RPMS: Simplify the Makefile wrapping dpkg-buildpackage(1)
The RPM's changelog is now updated automatically if no entry match the
version being built. This is being handled by the parse-changelog.sh and
update-changelog.sh scripts.

Both VERSION and RPM_VERSION are still accepted. If the latter is
unspecified, it is derived from VERSION.

Package signing is now handled here, instead of the Umbrella. This makes
this Makefile on par with the Debian package's Makefile. This Makefile
still accepts KEYSDIR or GNUPG_PATH, but they are deprecated: one should
simply set GNUPGHOME.

In the end, the Makefile is still compatible with the current way of
building a RabbitMQ release but it will simplify the job of Concourse.

As a bonus, there is a new script called compare-rpm-versions.py: it
compares two given versions (including the package revision) using RPM.
This helps when testing versioning.

[#131645695]
2017-01-23 15:35:04 +01:00
Jean-Sébastien Pédron bed831ff1e
packaging/debs/Debian/scripts/udpate-changelog.sh: Show syntax
... if arguments are missing.

[#131645209]
2017-01-23 15:33:49 +01:00
Jean-Sébastien Pédron e83a170f91
packaging/debs: Use make conditionals instead of Bourne shell ones
[#131645209]
2017-01-23 15:33:10 +01:00
Jean-Sébastien Pédron 73faea2b45
packaging/debs: Derive GNUPGHOME from KEYSDIR
[#131645209]
2017-01-23 15:32:17 +01:00
Jean-Sébastien Pédron e8d5465584
Merge branch 'stable' 2017-01-23 12:03:10 +01:00
Jean-Sébastien Pédron d429dcf1ea
packaging/debs: Simplify the Makefile wrapping dpkg-buildpackage(1)
The `check-changelog.sh` script is transformed to `update-changelog.sh`.
It doesn't care anymore if $UNOFFICIAL_RELEASE is set or not. It simply
verifies if the given version matches the last entry of
`debian/changelog` (without taking the package revision into account).
If the last entry doesn't match, it prepends a new automatically
generated entry.

Also, the Makefile takes both `VERSION` and `DEBIAN_VERSION` as input
variables. `VERSION` is the RabbitMQ version (eg. `3.6.7-alpha.62`)
and `DEBIAN_VERSION` is the same version formatted for Debian (eg.
`3.6.7~lpha.62`). If the latter is missing, it's computed from `VERSION`.

Regarding package signing, `GNUPG_PATH` is deprecated. The caller should
instead directly use `GNUPGHOME`, the documented variable expected by
GnuPG.

In the end, the Makefile is still compatible with the current way of
building a RabbitMQ release but it will simplify the job of Concourse.

As a bonus, there are two new scripts:
    o  scripts/get-debian-package-files-list.sh: List all files making a
       Debian package, based on a specified `.changes` file.
    o  scripts/compare-debian-versions.py: Compare two given versions
       (including the package revision) using APT. This helps when testing
       versioning.

[#131645209]
2017-01-23 11:42:32 +01:00
Daniil Fedotov 8d5515942e Update profile after installation to enable autocompletion 2017-01-23 10:23:47 +00:00
Michael Klishin 067802e0dd Merge branch 'master' into rabbitmq-server-release-12 2017-01-21 10:49:11 -08:00
Jean-Sébastien Pédron fea38fe4bf
Merge branch 'stable' 2017-01-19 15:30:32 +01:00
Jean-Sébastien Pédron ffc0cf1989
packaging/windows: Bump copyright of the installer to 2017 2017-01-19 15:29:53 +01:00
Jean-Sébastien Pédron c90bfcdeb1
Merge branch 'stable' 2017-01-19 13:36:18 +01:00
Jean-Sébastien Pédron 841e8775eb
packaging/windows: Allow to override `PRODUCTVERSION`
This will allow to keep a semver-formatted version everywhere and have a
valid `PRODUCTVERSION` made of for integers.

[#131645343]
2017-01-19 13:34:21 +01:00
Daniil Fedotov 3c860bd85e Delete autocomplete script when removing deb package 2017-01-18 15:41:18 +00:00
Daniil Fedotov c17cc89aff RPM paths for autocomplete scripts 2017-01-18 15:41:18 +00:00
Daniil Fedotov 12bfcf7f96 Fix autocomplete scripts file names 2017-01-18 15:40:21 +00:00
Daniil Fedotov 31dac38fb7 Install auto-complete script 2017-01-18 15:40:21 +00:00
Gerhard Lazu eff9e8adb6 Add write permissions to erl
Otherwise erl.diff cannot be applied:

    patch -o rabbitmq_server-3.7.0.milestone8/release/rabbitmq_server-3.7.0.milestone8/erts-8.2/bin/erl rabbitmq_server-3.7.0.milestone8/release/rabbitmq_server-3.7.0.milestone8/erts-8.2/bin/erl.src < erl.diff
    patch: **** Can't create file rabbitmq_server-3.7.0.milestone8/release/rabbitmq_server-3.7.0.milestone8/erts-8.2/bin/erl : Permission denied

The default mode of `$prefix/lib/erlang/bin/erl` is 0755.
Because we compile Erlang from sources as part of a release build, there
is no issue. Debian and FreeBSD packages follow the official mode too,
so when testing on those, it still works. However, Homebrew changes the
mode to 0555, which breaks our `Makefile` expectation.
2017-01-17 15:08:05 +00:00
Jean-Sébastien Pédron ef9f46397f standalone/src/rabbit_release.erl: Copy `escript` directory to the archive 2017-01-17 15:08:00 +00:00
Gerhard Lazu 4f969643e1 Add write permissions to erl
Otherwise erl.diff cannot be applied:

    patch -o rabbitmq_server-3.7.0.milestone8/release/rabbitmq_server-3.7.0.milestone8/erts-8.2/bin/erl rabbitmq_server-3.7.0.milestone8/release/rabbitmq_server-3.7.0.milestone8/erts-8.2/bin/erl.src < erl.diff
    patch: **** Can't create file rabbitmq_server-3.7.0.milestone8/release/rabbitmq_server-3.7.0.milestone8/erts-8.2/bin/erl : Permission denied

The default mode of `$prefix/lib/erlang/bin/erl` is 0755.
Because we compile Erlang from sources as part of a release build, there
is no issue. Debian and FreeBSD packages follow the official mode too,
so when testing on those, it still works. However, Homebrew changes the
mode to 0555, which breaks our `Makefile` expectation.
2017-01-17 14:55:39 +00:00
Jean-Sébastien Pédron cc3c177edb
standalone/src/rabbit_release.erl: Copy `escript` directory to the archive 2017-01-17 14:38:44 +01:00
Jean-Sébastien Pédron 635c99dba5
Merge branch 'stable' 2016-12-07 13:38:20 +01:00
Jean-Sébastien Pédron a9cc7496c5
Debian package: No need to pass $(VERSION) around in debian/rules
The source disttribution is responsible for its own version string.

[#131643765]
[#130992027]
2016-12-07 13:05:34 +01:00
Loïc Hoguin b267249a3b
Rename mochinum and mochiweb_util 2016-11-24 16:28:21 +01:00
Michael Klishin 613a49fecb
Merge branch 'stable' 2016-11-22 13:06:00 +03:00
Michael Klishin 4a1d67edbe Commit Debian and RPM changelogs 2016-11-21 10:53:00 +00:00
Jean-Sébastien Pédron b6425eff0c
debian/control: Require Erlang 18.3 2016-11-18 16:03:38 +01:00
Michael Klishin a4f98de9c0 Merge pull request #6 from rabbitmq/rabbitmq-common-46
Update mochiweb copyright files
2016-11-09 18:46:33 +03:00
Jean-Sébastien Pédron fd88b57863
Merge branch 'stable' 2016-11-08 19:09:57 +01:00
Jean-Sébastien Pédron ad4565fa57
packaging: Specify source directory in RPM 2016-11-08 18:37:45 +01:00
Jean-Sébastien Pédron d3e2fc6c4f
packaging: Distinguish upstream and package versions in RPM 2016-11-08 18:31:31 +01:00
Jean-Sébastien Pédron ac243bfe61
packaging: Be sure to name RPM source archive correctly 2016-11-08 16:20:21 +01:00
Jean-Sébastien Pédron 5ff79cd849
packaging: Be sure to name RPM source archive correctly 2016-11-08 16:04:30 +01:00
Loïc Hoguin 63e6b3212c
Update mochiweb copyright files 2016-11-08 15:33:31 +02:00
Daniil Fedotov 19d191cbc6 Merge branch 'stable' 2016-10-20 16:48:53 +01:00
Alexey Lebedeff f9b9c1d0e2 Make .deb build process re-enterable
With this patch it's possible to run `dpkg-buildpackage` any number
number of times from single source directory. Otherwise `dpkg-source`
thinks that sources were modified and fails to execute.

`clean-unpacked-source-dist` is needed because `make clean` doesn't
descend into `deps/` folder, and doing `make clean APPS_DIR=deps` breaks
on `licensing/` which doesn't have makefile.

Calling `patch-sockjs` is necessary to be sure that no files in source dist
tarball will not be touched during build.
2016-10-19 17:41:53 +03:00
Michael Klishin e06daef1ac
Merge branch 'stable' 2016-10-19 17:35:58 +08:00
Alexey Lebedeff 3a394b6b00 Propagate version when building .deb
Otherwise rebuilding package from debian sources creates `rabbitmq-0.0.0` directory.
2016-10-18 19:56:24 +03:00
Jean-Sébastien Pédron b8bf3e65b7
Merge branch 'stable' 2016-09-28 17:36:37 +02:00
Jean-Sébastien Pédron aa211a1c7b
Reset `DEPS_DIR` inside Debian and RPM package files
Our packaging Makefiles already take care of not exporting `DEPS_DIR`.
This is to make sure a user setting (eg. `DEPS_DIR` set globally in the
environment) doesn't break the package build either.
2016-09-28 17:34:18 +02:00
Jean-Sébastien Pédron 892d40a762
packaging: Do not pass command-line variables to potential sub-makes
A Debian package is built with a Makefile, `debian/rules`. This Makefile
inherited all variables defined on the command line, even though we
unexported the dangerous ones.

We need to unset `MAKEOVERRIDES` to prevent GNU Make from passing them
in `MAKEFLAGS`.
2016-09-28 17:12:00 +02:00
Jean-Sébastien Pédron 982ad65328
Fix typo: s/Multile/Multiple/ 2016-09-28 12:29:43 +02:00
Jean-Sébastien Pédron 47ffad2697
Import master-specific changes
[#130659985]
2016-09-23 14:13:06 +02:00
Jean-Sébastien Pédron fa0b10b443
packaging: Take `docs` from `deps/rabbit`
[#130659985]
2016-09-21 16:24:58 +02:00
Jean-Sébastien Pédron db7f0a0f38
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]
2016-09-20 18:19:24 +02:00