Merge pull request #90 from rabbitmq/rabbitmq-server-release-37
Add documentation for packaging dependencies
This commit is contained in:
commit
48f2f982ad
|
|
@ -0,0 +1,60 @@
|
||||||
|
# Build RabbitMQ Packages using Linux
|
||||||
|
|
||||||
|
|
||||||
|
## Environment
|
||||||
|
|
||||||
|
Debian Jesse using this `Vagrantfile`:
|
||||||
|
|
||||||
|
```
|
||||||
|
$script = <<SCRIPT
|
||||||
|
export LANG='C.UTF-8'
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
echo 'deb http://httpredir.debian.org/debian jessie-backports main' >> /etc/apt/sources.list.d/backports.list
|
||||||
|
|
||||||
|
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
|
||||||
|
dpkg -i erlang-solutions_1.0_all.deb
|
||||||
|
|
||||||
|
apt-get clean
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y --fix-missing --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
ca-certificates \
|
||||||
|
debhelper \
|
||||||
|
dh-systemd \
|
||||||
|
elinks \
|
||||||
|
esl-erlang \
|
||||||
|
elixir \
|
||||||
|
fakeroot \
|
||||||
|
git \
|
||||||
|
libfile-fcntllock-perl \
|
||||||
|
mandoc \
|
||||||
|
nsis \
|
||||||
|
python-lxml \
|
||||||
|
python-markdown \
|
||||||
|
python-simplejson \
|
||||||
|
rpm \
|
||||||
|
rsync \
|
||||||
|
tofrodos \
|
||||||
|
unzip \
|
||||||
|
xmlto \
|
||||||
|
xsltproc \
|
||||||
|
zip \
|
||||||
|
curl
|
||||||
|
date > /etc/vagrant_provisioned_at
|
||||||
|
SCRIPT
|
||||||
|
|
||||||
|
Vagrant.configure('2') do |config|
|
||||||
|
config.vm.box = "debian/jessie64"
|
||||||
|
config.vm.hostname = 'DEBIAN-JESSIE64'
|
||||||
|
config.vm.provision 'shell', inline: $script
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
## Instructions
|
||||||
|
|
||||||
|
Bring up a Debian Jesse instance using Vagrant, or, use the provisioning script
|
||||||
|
on a Debian Jesse server of your own. When it is done running, all necessary
|
||||||
|
package build requirements for either `apt`-based or `rpm`-based distros will
|
||||||
|
be present. See the [`README.md`](README.md#tldr) document for instructions on
|
||||||
|
building packages.
|
||||||
|
|
@ -0,0 +1,121 @@
|
||||||
|
# Build RabbitMQ Windows Package using Windows
|
||||||
|
|
||||||
|
## Environment
|
||||||
|
|
||||||
|
Windows 8.1 using this `Vagrantfile`:
|
||||||
|
|
||||||
|
```
|
||||||
|
Vagrant.configure("2") do |config|
|
||||||
|
config.vm.box = "inclusivedesign/windows81-eval-x64"
|
||||||
|
config.vm.provider "virtualbox" do |v|
|
||||||
|
v.gui = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that these steps should work on more recent versions of Windows as well.
|
||||||
|
If you have issues using a newer version of Windows, please provide full
|
||||||
|
details in a message to the
|
||||||
|
[`rabbitmq-users`](https://groups.google.com/forum/#!forum/rabbitmq-users)
|
||||||
|
mailing list.
|
||||||
|
|
||||||
|
## Initial Steps
|
||||||
|
|
||||||
|
Bring up the VM and go through the process of updating Windows and (optionall)
|
||||||
|
VirtualBox tools. You'll notice that the evaluation license is expired. Re-arm
|
||||||
|
it by running this command via an administrative prompt:
|
||||||
|
|
||||||
|
```
|
||||||
|
slmgr -rearm
|
||||||
|
```
|
||||||
|
|
||||||
|
This part of the process will take a while as Windows is updated. Go make some
|
||||||
|
coffee and check your email.
|
||||||
|
|
||||||
|
## Install Erlang and Elixir
|
||||||
|
|
||||||
|
Using Chocolatey is the easiest method to install the most recent version of
|
||||||
|
Erlang and Elixir. Install Chocolatey [using these
|
||||||
|
instructions](https://chocolatey.org/install#installing-chocolatey)
|
||||||
|
([link](https://chocolatey.org/install#installing-chocolatey)), then install
|
||||||
|
both Erlang and Elixir using this command from an *administrative* `cmd.exe` or
|
||||||
|
Powershell terminal:
|
||||||
|
|
||||||
|
```
|
||||||
|
choco install elixir which
|
||||||
|
```
|
||||||
|
|
||||||
|
To confirm installation, open a new command prompt and run the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
erl -version
|
||||||
|
elixir -v
|
||||||
|
which erl
|
||||||
|
which elixir
|
||||||
|
```
|
||||||
|
|
||||||
|
## Install MSYS2 and NSIS
|
||||||
|
|
||||||
|
Chocolatey is also an easy way to install `msys2` and the NSIS install script
|
||||||
|
builder. Run the following from an *administrative* command prompt:
|
||||||
|
|
||||||
|
```
|
||||||
|
choco install msys2 nsis
|
||||||
|
```
|
||||||
|
|
||||||
|
As a bonus, it will update your `msys2` installation for you during the initial
|
||||||
|
install process.
|
||||||
|
|
||||||
|
## Install MSYS2 packages
|
||||||
|
|
||||||
|
Start up an `msys2` shell by running the following command (does not have to be
|
||||||
|
admin):
|
||||||
|
|
||||||
|
```
|
||||||
|
C:\tools\msys64\msys2_shell.cmd
|
||||||
|
```
|
||||||
|
|
||||||
|
In that shell, install all of these dependencies. If you are prompted for
|
||||||
|
input, just hit ENTER to choose the default:
|
||||||
|
|
||||||
|
```
|
||||||
|
pacman -S --needed git make tar rsync python zip unzip dos2unix man
|
||||||
|
```
|
||||||
|
|
||||||
|
## Build RabbitMQ
|
||||||
|
|
||||||
|
### Clone this repository
|
||||||
|
|
||||||
|
From within your MSYS2 shell:
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://github.com/rabbitmq/rabbitmq-server-release.git
|
||||||
|
```
|
||||||
|
|
||||||
|
### Set `PATH`
|
||||||
|
|
||||||
|
```
|
||||||
|
export PATH="$PATH:/c/ProgramData/Chocolatey/bin:/c/ProgramData/Chocolatey/lib/Elixir/bin:/c/Program Files (x86)/NSIS/bin"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Fetch and build deps
|
||||||
|
|
||||||
|
*Note:* as of this writing, RabbitMQ `3.7.8` is the latest version. Be sure to check out the tag appropriate for your use:
|
||||||
|
|
||||||
|
```
|
||||||
|
cd rabbitmq-server-release
|
||||||
|
|
||||||
|
# the following checks out the "next to be released" branch
|
||||||
|
# this branch and version 3.7.9 have a necessary fix for building
|
||||||
|
# on windows, see this: https://github.com/rabbitmq/rabbitmq-server-release/pull/89
|
||||||
|
|
||||||
|
git checkout v3.7.x
|
||||||
|
|
||||||
|
make deps
|
||||||
|
```
|
||||||
|
|
||||||
|
### Build Windows package
|
||||||
|
|
||||||
|
```
|
||||||
|
make UNIX_TO_DOS=unix2dos package-windows
|
||||||
|
```
|
||||||
12
README.md
12
README.md
|
|
@ -38,6 +38,10 @@ make package-standalone-macosx
|
||||||
make -C packaging package-standalone-macosx SOURCE_DIST_FILE=/path/to/rabbitmq-server-3.8.1-rc.1.tar.xz
|
make -C packaging package-standalone-macosx SOURCE_DIST_FILE=/path/to/rabbitmq-server-3.8.1-rc.1.tar.xz
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The instructions in the [`PKG_LINUX.md`](PKG_LINUX.md) document include a
|
||||||
|
script to install the necessary pre-requisites for building package archives as
|
||||||
|
well as `deb` and `rpm` packages.
|
||||||
|
|
||||||
## Source archive
|
## Source archive
|
||||||
|
|
||||||
### How to create it
|
### How to create it
|
||||||
|
|
@ -204,15 +208,18 @@ flavors, accepts the `RPM_OS` variable to set the flavor. It can be:
|
||||||
### Windows package
|
### Windows package
|
||||||
|
|
||||||
We create two artefacts:
|
We create two artefacts:
|
||||||
|
|
||||||
* a Zip archive, resembling the `generic-unix` package;
|
* a Zip archive, resembling the `generic-unix` package;
|
||||||
* an installer.
|
* an installer.
|
||||||
|
|
||||||
To create them:
|
To create them:
|
||||||
|
|
||||||
```
|
```
|
||||||
make package-windows
|
make package-windows
|
||||||
```
|
```
|
||||||
|
|
||||||
To create them separately:
|
To create them separately:
|
||||||
|
|
||||||
```
|
```
|
||||||
make -C packaging/windows # the Zip archive
|
make -C packaging/windows # the Zip archive
|
||||||
make -C packaging/windows-exe # the installer
|
make -C packaging/windows-exe # the installer
|
||||||
|
|
@ -228,6 +235,7 @@ one requires the Zip archive as its input, not the source archive.
|
||||||
|
|
||||||
So you need to built the Zip archive first, then the installer. You can
|
So you need to built the Zip archive first, then the installer. You can
|
||||||
specify the path to the Zip archive using the `ZIP` variable:
|
specify the path to the Zip archive using the `ZIP` variable:
|
||||||
|
|
||||||
```
|
```
|
||||||
make -C packaging/windows-exe ZIP=/path/to/rabbitmq-server-windows.zip
|
make -C packaging/windows-exe ZIP=/path/to/rabbitmq-server-windows.zip
|
||||||
```
|
```
|
||||||
|
|
@ -237,10 +245,14 @@ everything following the third integer was replaced by `.0`. Thus it's
|
||||||
only fine if the version is a semver-based version (eg. 3.8.1-pre.3 or
|
only fine if the version is a semver-based version (eg. 3.8.1-pre.3 or
|
||||||
3.8.2). If the version doesn't conform to that, you need to set the
|
3.8.2). If the version doesn't conform to that, you need to set the
|
||||||
`PRODUCT_VERSION` variable:
|
`PRODUCT_VERSION` variable:
|
||||||
|
|
||||||
```
|
```
|
||||||
make package-windows PROJECT_VERSION=3.8.1-rc.1 PRODUCT_VERSION=3.8.1.0
|
make package-windows PROJECT_VERSION=3.8.1-rc.1 PRODUCT_VERSION=3.8.1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To build the Windows package using a Windows machine, follow the
|
||||||
|
instructions in [`PKG_WINDOWS.md`](PKG_WINDOWS.md).
|
||||||
|
|
||||||
### Standalone package
|
### Standalone package
|
||||||
|
|
||||||
This is the equivalent of the `generic-unix` package with Erlang
|
This is the equivalent of the `generic-unix` package with Erlang
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue