Skip to content

Commit

Permalink
Merge pull request #418 from esl/1.5
Browse files Browse the repository at this point in the history
1.5.1
  • Loading branch information
erszcz committed Apr 2, 2015
2 parents b6b7bf3 + 56a5465 commit 4b91489
Show file tree
Hide file tree
Showing 105 changed files with 3,542 additions and 6,323 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ apps/ejabberd/include/XmppAddr.hrl
apps/ejabberd/include/EJABBERD-MIB.hrl
apps/ejabberd/priv/mibs/EJABBERD-MIB.bin
apps/ejabberd/ebin/ejabberd.app
## This file is generated by the reload_config tests
apps/ejabberd/test/ejabberd_config_SUITE_data/ejabberd.cfg
dev/*
test/*

ebin/
*.coverdata
21 changes: 11 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
language: erlang
before_install:
- sudo apt-get install libpam0g-dev libexpat1-dev odbc-postgresql libmyodbc
- if [ $TEST_CONFIG = 'ldap_mnesia' ]; then sudo apt-get install slapd ldap-utils; fi
- if [ $PRESET = 'ldap_mnesia' ]; then sudo apt-get install slapd ldap-utils; fi
- tools/travis-generate-pass.sh
- tools/travis-check-tests-branch.sh
install: tools/travis-build.sh
before_script:
- tools/travis-setup-db.sh
- if [ $TEST_CONFIG = 'ldap_mnesia' ]; then tools/travis-setup-ldap.sh; fi
- if [ $PRESET = 'ldap_mnesia' ]; then tools/travis-setup-ldap.sh; fi
script: tools/travis-test.sh

after_script:
Expand All @@ -26,20 +26,21 @@ services: redis-server
branches:
only:
- master
- stable
notifications:
email: [email protected]
otp_release:
- R16B03
env:
- TEST_CONFIG=internal_redis DB=mnesia
- TEST_CONFIG=internal_mnesia DB=mnesia
- TEST_CONFIG=mysql_mnesia DB=mysql
- TEST_CONFIG=odbc_pgsql_mnesia DB=pgsql
- TEST_CONFIG=pgsql_mnesia DB=pgsql
- TEST_CONFIG=ldap_mnesia DB=mnesia
- TEST_CONFIG=external_mnesia DB=mnesia
- PRESET=internal_redis DB=mnesia REL_CONFIG=with-redis
- PRESET=internal_mnesia DB=mnesia
- PRESET=mysql_mnesia DB=mysql REL_CONFIG=with-mysql
- PRESET=odbc_pgsql_mnesia DB=pgsql REL_CONFIG=with-odbc
- PRESET=pgsql_mnesia DB=pgsql REL_CONFIG=with-pgsql
- PRESET=ldap_mnesia DB=mnesia
- PRESET=external_mnesia DB=mnesia

matrix:
include:
- otp_release: R15B03
env: TEST_CONFIG=internal_mnesia DB=mnesia
env: PRESET=internal_mnesia DB=mnesia
49 changes: 24 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
.PHONY: rel deps test show_test_results generate_snmp_header
.PHONY: rel deps test show_test_results

EJABBERD_DIR = apps/ejabberd
EJD_INCLUDE = $(EJABBERD_DIR)/include
EJD_PRIV = $(EJABBERD_DIR)/priv
EJD_PRIV_MIB = $(EJD_PRIV)/mibs
EJD_MIB = $(EJABBERD_DIR)/mibs
DEVNODES = node1 node2

all: deps compile

compile: rebar generate_snmp_header
./rebar $(OPTS) compile
compile: rebar
./rebar $(OTPS) compile

deps: rebar generate_snmp_header
deps: rebar
./rebar get-deps

clean: rebar
rm -rf apps/*/logs
./rebar clean

quick_compile: rebar
Expand All @@ -33,6 +32,14 @@ ct: deps quick_compile
@if [ "$(SUITE)" ]; then ./rebar -q ct suite=$(SUITE) skip_deps=true;\
else ./rebar -q ct skip_deps=true; fi

# This compiles and runs one test suite. For quick feedback/TDD.
# Example:
# $ make qct SUITE=amp_resolver_SUITE
qct:
mkdir -p /tmp/ct_log
ct_run -pa apps/*/ebin -pa deps/*/ebin -dir apps/*/test\
-I apps/*/include -logdir /tmp/ct_log -suite $(SUITE) -noshell

test: test_deps
cd test/ejabberd_tests; make test

Expand All @@ -42,8 +49,12 @@ test_preset: test_deps

run: deps compile quickrun

quickrun:
erl -sname ejabberd -setcookie ejabberd -pa deps/*/ebin apps/*/ebin -config rel/files/app.run.config -s ejabberd -s sync
quickrun: etc/ejabberd.cfg
erl -sname mongooseim@localhost -setcookie ejabberd -pa deps/*/ebin apps/*/ebin -config rel/files/app.config -s ejabberd

etc/ejabberd.cfg:
tools/generate_cfg.es etc/ejabberd.cfg


cover_test: test_deps
cd test/ejabberd_tests; make cover_test
Expand All @@ -61,6 +72,9 @@ eunit: rebar deps
./rebar compile
./rebar skip_deps=true eunit

configure:
./tools/configure $(filter-out $@,$(MAKECMDGOALS))

rel: rebar deps
./rebar compile generate -f

Expand All @@ -69,9 +83,6 @@ devrel: $(DEVNODES)
$(DEVNODES): rebar deps compile deps_dev
@echo "building $@"
(cd rel && ../rebar generate -f target_dir=../dev/mongooseim_$@ overlay_vars=./reltool_vars/$@_vars.config)
cp -R apps/ejabberd/src `ls -dt dev/mongooseim_$@/lib/ejabberd-2.1.8*/ | head -1`
cp -R apps/pgsql/src `ls -dt dev/mongooseim_$@/lib/pgsql*/ | head -1`
cp -R apps/mysql/src `ls -dt dev/mongooseim_$@/lib/mysql*/ | head -1`
cp -R `dirname $(shell ./readlink.sh $(shell which erl))`/../lib/tools-* dev/mongooseim_$@/lib/

deps_dev:
Expand All @@ -85,15 +96,6 @@ devclean:
cover_report: /tmp/mongoose_combined.coverdata
erl -noshell -pa apps/*/ebin deps/*/ebin -eval 'ecoveralls:travis_ci("$?"), init:stop()'


generate_snmp_header: apps/ejabberd/include/EJABBERD-MIB.hrl

$(EJD_INCLUDE)/EJABBERD-MIB.hrl: $(EJD_PRIV_MIB)/EJABBERD-MIB.bin
erlc -o $(EJD_INCLUDE) $<

$(EJD_PRIV_MIB)/EJABBERD-MIB.bin: $(EJD_MIB)/EJABBERD-MIB.mib $(EJD_MIB)/EJABBERD-MIB.funcs
erlc -o $(EJD_PRIV_MIB) $<

relclean:
rm -rf rel/mongooseim

Expand Down Expand Up @@ -123,8 +125,5 @@ cleanplt:
test_deps: rebar
./rebar -C rebar.tests.config get-deps

# This might download a version which can't build the project properly!
# Compatible rebar version should be checked into the repository.
rebar:
wget -q http://cloud.github.com/downloads/basho/rebar/rebar
chmod u+x rebar
%:
@:
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MongooseIM [![](http://opensource.erlang-solutions.com/mongooseim/icon.png "Build status")](http://opensource.erlang-solutions.com/mongooseim/ct_report/all_runs.html) [![Build Status](https://travis-ci.org/esl/MongooseIM.svg?branch=master)](https://travis-ci.org/esl/MongooseIM) [![Coverage Status](https://img.shields.io/coveralls/esl/MongooseIM.svg)](https://coveralls.io/r/esl/MongooseIM?branch=master)
MongooseIM [![Build Status](https://travis-ci.org/esl/MongooseIM.svg?branch=master)](https://travis-ci.org/esl/MongooseIM) [![Documentation Status](https://readthedocs.org/projects/mongooseim/badge/?version=latest)](https://readthedocs.org/projects/mongooseim/?badge=latest) [![Coverage Status](https://img.shields.io/coveralls/esl/MongooseIM.svg)](https://coveralls.io/r/esl/MongooseIM?branch=master)
============
MongooseIM is Erlang Solutions' robust and efficient XMPP
server aimed at large installations. Specifically designed for enterprise purposes,
Expand Down Expand Up @@ -61,15 +61,34 @@ How to build
$ ./rebar get-deps
$ ./rebar compile

To generate MongooseIM release:
To generate minimal MongooseIM release (without mysql, pgsql or other deps):

$ make rel

or

$ ./rebar generate

These commands will generate a self-contained OTP system image in the

If more advanced relase is required (with mysql or pgsql support) a `make configure` script with appropirate option(s) has to be run before `make rel` or `./rebar generate`. `make configre` without any option will print following help message.

```
specifies which 3rd party deps will be included in release
possible options:
with-mysql include mysql driver
with-pgsql include pgsql driver
with-odbc include standard ODBC driver shipped with Erlang/OTP
with-redis include redis driver
with-cassandra include cassandra driver
full include all above deps
```

For example if mysql and redis support has to be added to the release, following command has to be run before `make rel`:

$ make configure with-mysql with-redis

The `make configure` command has to be run only once (unless one need to change the relase config and include some other dependecies).

`make rel` or `./rebar generate` commands will generate a self-contained OTP system image in the
project's `rel/mongooseim` subdirectory. The contents of that directory are as
follows:
* `rel/mongooseim/bin` - startup/administration scripts,
Expand Down
121 changes: 0 additions & 121 deletions apps/ejabberd/c_src/sha_drv.c

This file was deleted.

Loading

0 comments on commit 4b91489

Please sign in to comment.