-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tool for building DEB/RPM packages #3781
Conversation
1d2274b
to
611fd9e
Compare
611fd9e
to
0cf9ecb
Compare
I've now pushed another commit to add The installers are used like this:
The installation is removed like this:
If the installer is called from an interactive terminal, it will mention the installation paths and ask for confirmation (but there's no way to adjust the paths, to keep things simple). If it's running unattended, ejabberd is installed without asking questions. If the data directory ( See https://ejabberd.messaging.one for examples of those binary packages. |
d25010e
to
bf53852
Compare
I've now added a GitHub Action for creating packages from each commit. Allows for easy testing of development versions and makes sure problems with building binaries are noticed early on. (But this is in a separate commit, so it can easily be reverted if it's not desired.) |
c502cc9
to
cff2010
Compare
cff2010
to
60e4013
Compare
aac7476
to
8b2b629
Compare
15bb873
to
2c123d7
Compare
Hi Holger, I installed them on a raspberry pi, it works also as intended. However, if I try to install a additional module like mod_cron or ejabberd_auth_http, it throws an error. I also tried it on an AMD64 architecture effectively giving the same output (s. below):
I tried to check if a package is missing, but could not discover anything. Thanks and wishing a great day! |
b5637f0
to
373af56
Compare
Thank you for reporting this issue! I force-pushed a fix into this PR and updated the packages on https://ejabberd.messaging.one. |
373af56
to
2a4a1b8
Compare
yes, works like a charm! |
f69b4fb
to
710144d
Compare
ff926ce
to
4acb91e
Compare
The tools/make-binaries script creates self-contained OTP releases for Linux/x64 and Linux/arm64 systems. All optional ejabberd features are supported. Erlang/OTP, Elixir, and all dependencies are downloaded and built from source (using crosstool-NG). The generated binaries depend on glibc 2.17 or later, all other external libraries are linked statically. The script should work on any non-ancient Linux/x64 system and requires just a few common development tools (to bootstrap crosstool-NG). The release is installed by creating an "ejabberd" user, extracting the archive into /opt, and moving the systemd unit (or init script) into place.
The tools/make-packages script creates DEB and RPM packages for Linux/x64 and Linux/arm64 systems using the archives built by the tools/make-binaries script.
The tools/make-installers script creates command line installers for Linux/x64 and Linux/arm64 systems using the archives built by the tools/make-binaries script.
Don't rebuild external dependencies if all of them are up to date.
Publish DEB and RPM packages as well as binary installers for each commit that modifies source code. This allows for testing development code, and makes sure that problems with building binary packages are noticed early on.
Update Crosstool-NG to the current release candidate, and use much shorter "defconfig" files for specifying the configuration.
4acb91e
to
0924415
Compare
Add
make-binaries
andmake-packages
scripts to thetools
directory:make-binaries
creates self-contained OTP releases for Linux/x64 and Linux/arm64 systems. All optional ejabberd features are fully supported. Erlang/OTP, Elixir, and all dependencies are retrieved and built from source (using crosstool-NG). The generated binaries depend only on glibc 2.17+, the other dependencies are linked statically. The script should work on any non-ancient Linux/x64 system and requires just a few common C development tools (to bootstrap crosstool-NG).make-packages
creates DEB and RPM packages from the archives generated bymake-binaries
. It requires fpm to be in the$PATH
(can be installed below$HOME/.gem/ruby
by callinggem install --no-document --user-install fpm
).Note: As dependencies are linked statically, it's crucial to track updates (e.g., by subscribing to OpenSSL's announcement list, to GitHub release notifications for Expat, and so on), so that the packages can be updated in case of security issues (just bump the iteration by running e.g.
tools/make-packages -i 2
andtools/make-installers -i 2
if the ejabberd version didn't change). Themake-binaries
script checks most dependency versions to make sure they're up-to-date unlessCHECK_DEPS=false
is set.Also note that running the scripts can take several hours, at least on first invocation. Subsequent invocations will be significantly faster if the
BUILD_DIR
is kept, as the crosstool-NG toolchains are reused. (However, all other dependencies are rebuilt from scratch if any of their versions was bumped, as handling dependency updates would be a bit cumbersome with static linking.)