|
1 |
| -# RabbitMQ server releases |
| 1 | +# RabbitMQ Server Releases |
2 | 2 |
|
3 |
| -This repository provides scripts and Makefiles we use to create RabbitMQ |
4 |
| -server releases. It is organized in the following way: |
5 |
| -* The top-level `Makefile` manages the source archive. |
6 |
| -* There is a subdirectory inside `packaging` for each type of package we |
7 |
| - support. |
8 |
| - |
9 |
| -## TL;DR |
10 |
| - |
11 |
| -* To create a source archive and all supported packages: |
12 |
| - |
13 |
| - ``` |
14 |
| - make packages |
15 |
| - ``` |
16 |
| -
|
17 |
| -* To create a source archive and all supported packages, with a given version: |
18 |
| -
|
19 |
| - ``` |
20 |
| - make packages PROJECT_VERSION=3.13.0-rc.3 |
21 |
| - ``` |
22 |
| -
|
23 |
| -* To create all suported packages from an existing source archive: |
24 |
| -
|
25 |
| - ``` |
26 |
| - make -C packaging SOURCE_DIST_FILE=/path/to/rabbitmq-server-3.13.0-rc.3.tar.xz |
27 |
| - ``` |
28 |
| -
|
29 |
| -The standalone package is different because it embeds the build |
30 |
| -platform's Erlang copy. Thus on Linux for instance, only the |
31 |
| -`linux-x86_64` standalone package will be built. To build the OS X |
32 |
| -standalone package, you need to run the following command on an OS X |
33 |
| -build host: |
34 |
| -
|
35 |
| -``` |
36 |
| -make package-standalone-macosx |
37 |
| -# or |
38 |
| -make -C packaging package-standalone-macosx SOURCE_DIST_FILE=/path/to/rabbitmq-server-3.13.0-rc.3.tar.xz |
39 |
| -``` |
40 |
| -
|
41 |
| -The instructions in the [`PKG_LINUX.md`](PKG_LINUX.md) document include a |
42 |
| -script to install the necessary pre-requisites for building package archives as |
43 |
| -well as `deb` and `rpm` packages. |
44 |
| -
|
45 |
| -## Source archive |
46 |
| -
|
47 |
| -### How to create it |
48 |
| -
|
49 |
| -The source archive is created with the following command: |
50 |
| -``` |
51 |
| -make source-dist |
52 |
| -``` |
53 |
| -
|
54 |
| -It uses Erlang.mk's `PROJECT_VERSION` variable to set the version of the |
55 |
| -source archive. If the variable is unset, Erlang.mk computes a value |
56 |
| -based on the last tag and the current HEAD. |
57 |
| -
|
58 |
| -Here is an example with an explicit version: |
59 |
| -``` |
60 |
| -make source-dist PROJECT_VERSION=3.13.0-rc.3 |
61 |
| -``` |
62 |
| -
|
63 |
| -The version is automatically propagated to the broker and plugins so |
64 |
| -they all advertise the same version. |
65 |
| -
|
66 |
| -The result is then available in the `PACKAGES` subdirectory. You can |
67 |
| -override the output directory with the `PACKAGES_DIR` variable: |
68 |
| -``` |
69 |
| -make source-dist PROJDCT_VERSION=3.13.0-rc.3 \ |
70 |
| - PACKAGES_DIR=/tmp |
71 |
| -``` |
72 |
| -
|
73 |
| -By default, two archives are produced: |
74 |
| -* a `tar.xz` file; |
75 |
| -* a `zip` file. |
76 |
| -
|
77 |
| -You can ask for more/different types by specifying the |
78 |
| -`SOURCE_DIST_SUFFIXES` variable: |
79 |
| -``` |
80 |
| -make source-dist PROJECT_VERSION=3.13.0-rc.3 \ |
81 |
| - SOURCE_DIST_SUFFIXES='tar.xz tar.gz' |
82 |
| -``` |
83 |
| -
|
84 |
| -Supported archive types are: |
85 |
| -* `tar.bz2`; |
86 |
| -* `tar.gz`; |
87 |
| -* `tar.xz`; |
88 |
| -* `zip`. |
89 |
| -
|
90 |
| -### What is included |
91 |
| -
|
92 |
| -The source archive includes the broker and a set of plugins. The default |
93 |
| -list of plugins is in the `plugins.mk` file. |
94 |
| -
|
95 |
| -You can override this list by setting the `PLUGINS` variable to the list |
96 |
| -you want: |
97 |
| -``` |
98 |
| -make source-dist PROJECT_VERSION=3.13.0-rc.3 \ |
99 |
| - PLUGINS='rabbitmq_shovel rabbitmq_rabbitmq_shovel_management' |
100 |
| -``` |
101 |
| -
|
102 |
| -Dependencies are automatically included. |
103 |
| -
|
104 |
| -## Packages |
105 |
| -
|
106 |
| -Packages can be built with an existing source archive or create the |
107 |
| -source archive automatically. |
108 |
| -
|
109 |
| -If you want to use an existing archive, use `packaging/Makefile`: |
110 |
| -``` |
111 |
| -make -C packaging package-$type \ |
112 |
| - SOURCE_DIST_FILE=/path/to/rabbitmq-server-$version.tar.xz \ |
113 |
| - ... |
114 |
| -``` |
115 |
| -
|
116 |
| -This has the following rules: |
117 |
| -* The archive must be a `tar.xz` file. |
118 |
| -* It can automatically take the only archive available under `PACKAGES`. |
119 |
| - However, if there is none or multiple archive, you must specify the |
120 |
| - `SOURCE_DIST_FILE` variable. |
121 |
| -
|
122 |
| -If you want the source archive to be created automatically, use the |
123 |
| -top-level `Makefile`: |
124 |
| -``` |
125 |
| -make package-$type PROJECT_VERSION=3.13.0-rc.3 ... |
126 |
| -``` |
127 |
| -
|
128 |
| -Packages are written to `PACKAGES_DIR`, like the source archive. |
129 |
| -
|
130 |
| -Each package type is further described separately because most of them |
131 |
| -have versioning specificities. |
132 |
| -
|
133 |
| -### `generic-unix` package |
134 |
| -
|
135 |
| -To create it: |
136 |
| -``` |
137 |
| -make package-generic-unix |
138 |
| -``` |
139 |
| -
|
140 |
| -There is no package revision, only the project version and no |
141 |
| -restriction on it. |
142 |
| -
|
143 |
| -`packaging/generic-unix/Makefile` tries to determine the version based |
144 |
| -on the source archive filename. If it fails, you can specify the version |
145 |
| -with the `VERSION` variable: |
146 |
| -``` |
147 |
| -make -C packaging package-generic-unix \ |
148 |
| - SOURCE_DIST_FILE=rabbitmq-server.tar.xz \ |
149 |
| - VERSION=3.13.0-rc.3 |
150 |
| -``` |
151 |
| -
|
152 |
| -### Debian package |
153 |
| -
|
154 |
| -To create it: |
155 |
| -``` |
156 |
| -make package-deb |
157 |
| -``` |
158 |
| -
|
159 |
| -The package may have a different versioning than the project and may |
160 |
| -include an additional package revision. In particular, the package |
161 |
| -version can't have any `-` characters. |
162 |
| -
|
163 |
| -`packaging/debs/Debian/Makefile` tries to determine the version based |
164 |
| -on the source archive filename. If it fails, you can specify the version |
165 |
| -with the `VERSION` variable: |
166 |
| -``` |
167 |
| -make -C packaging package-deb \ |
168 |
| - SOURCE_DIST_FILE=rabbitmq-server.tar.xz \ |
169 |
| - VERSION=3.13.0-rc.3 |
170 |
| -``` |
171 |
| -
|
172 |
| -By default, the package version is converted from `VERSION` with |
173 |
| -all `-` characters replaced by `~` (eg. `3.13.0~rc.1` in the example |
174 |
| -above). If you want to override that conversion, you can specify the |
175 |
| -`DEBIAN_VERSION` variable: |
176 |
| -``` |
177 |
| -make -C packaging package-deb \ |
178 |
| - SOURCE_DIST_FILE=rabbitmq-server.tar.xz \ |
179 |
| - VERSION=3.13.0-rc.3 |
180 |
| - DEBIAN_VERSION=3.13.0~rc.1 |
181 |
| -``` |
182 |
| -
|
183 |
| -### RPM package |
184 |
| -
|
185 |
| -We support RedHat and OpenSUSE RPM packages and both are created by default: |
186 |
| -
|
187 |
| -To create them: |
188 |
| -``` |
189 |
| -make package-rpm |
190 |
| -``` |
191 |
| -
|
192 |
| -You can create a single one with: |
193 |
| -``` |
194 |
| -make package-rpm-fedora |
195 |
| -make package-rpm-suse |
196 |
| -``` |
197 |
| -
|
198 |
| -RPM packages have the same restrictions as Debian packages and use the |
199 |
| -same default version conversion. To override the converted version, use |
200 |
| -the `RPM_VERSION` variable. See the "Debian package" section above for |
201 |
| -more details. |
202 |
| -
|
203 |
| -`packaging/RPMS/Fedora/Makefile`, which handles both RedHar and OpenSUSE |
204 |
| -flavors, accepts the `RPM_OS` variable to set the flavor. It can be: |
205 |
| -* `fedora`; |
206 |
| -* `suse`. |
207 |
| -
|
208 |
| -### Windows package |
209 |
| -
|
210 |
| -We create two artefacts: |
211 |
| -
|
212 |
| -* a Zip archive, resembling the `generic-unix` package; |
213 |
| -* an installer. |
214 |
| -
|
215 |
| -To create them: |
216 |
| -
|
217 |
| -``` |
218 |
| -make package-windows |
219 |
| -``` |
220 |
| -
|
221 |
| -To create them separately: |
222 |
| -
|
223 |
| -``` |
224 |
| -make -C packaging/windows # the Zip archive |
225 |
| -make -C packaging/windows-exe # the installer |
226 |
| -``` |
227 |
| -
|
228 |
| -The Zip archive has no package revision, only the project version and no |
229 |
| -restriction on it. It supports the same `VERSION` as the `generic-unix` |
230 |
| -package. |
231 |
| -
|
232 |
| -The installer requires a *product version* which must be 4 integers |
233 |
| -separated by `.` characters. Furthermore, unlike other packages, this |
234 |
| -one requires the Zip archive as its input, not the source archive. |
235 |
| -
|
236 |
| -So you need to built the Zip archive first, then the installer. You can |
237 |
| -specify the path to the Zip archive using the `ZIP` variable: |
238 |
| -
|
239 |
| -``` |
240 |
| -make -C packaging/windows-exe ZIP=/path/to/rabbitmq-server-windows.zip |
241 |
| -``` |
242 |
| -
|
243 |
| -By default, the *product version* is the project version where |
244 |
| -everything following the third integer was replaced by `.0`. Thus it's |
245 |
| -only fine if the version is a semver-based version (eg. 3.13.0-pre.3 or |
246 |
| -3.8.2). If the version doesn't conform to that, you need to set the |
247 |
| -`PRODUCT_VERSION` variable: |
248 |
| -
|
249 |
| -``` |
250 |
| -make package-windows PROJECT_VERSION=3.13.0-rc.3 PRODUCT_VERSION=3.13.0.0 |
251 |
| -``` |
252 |
| -
|
253 |
| -To build the Windows package using a Windows machine, follow the |
254 |
| -instructions in [`PKG_WINDOWS.md`](PKG_WINDOWS.md). |
255 |
| -
|
256 |
| -### Building all packages in one go |
257 |
| -
|
258 |
| -If you want to build all packages in one command, you can use the |
259 |
| -following helpers: |
260 |
| -``` |
261 |
| -# Automatically creates the source archive. |
262 |
| -make packages |
263 |
| - |
264 |
| -# Use an existing archive. |
265 |
| -make -C packaging package SOURCE_DIST_FILE=... |
266 |
| -``` |
267 |
| -
|
268 |
| -However, be careful with the versioning! Because all package have |
269 |
| -incompatible requirements, you can only use a version with 3 integers |
270 |
| -(like a final semver-based version): |
271 |
| -``` |
272 |
| -make packages PROJECT_VERSION=3.13.0 |
273 |
| -make -C packaging packages SOURCE_DIST_FILE=rabbitmq-server-3.13.0.tar.xz |
274 |
| -``` |
275 |
| -
|
276 |
| -If you do not follow that rule, the build will fail one way or another; |
277 |
| -probably in the Windows package because of the *product version* |
278 |
| -restrictions. |
279 |
| -
|
280 |
| -Another possibility is to specify the Windows *product version* and |
281 |
| -rely on automatic conversion for Debian and RPM packages (or use the |
282 |
| -`DEBIAN_VERSION` and `RPM_VERSION` variables), but this is untested: |
283 |
| -``` |
284 |
| -make packages PROJECT_VERSION=3.13.0-rc.3 PRODUCT_VERSION=3.13.0.0 |
285 |
| -``` |
| 3 | +See [`rabbitmq/server-packages`](https://github.com/rabbitmq/server-packages/). |
0 commit comments