Skip to content
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

Refactoring stop support OTP 22 #3289

Merged
merged 13 commits into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -632,37 +632,6 @@ workflows:
filters: *all_tags
# ============================================
# ============= IN VM EXECUTORS ==============
# ============= TESTS OTP 22 =============
- build:
name: otp_22
otp_package: 22.3.4.9-1
context: mongooseim-org
filters: *all_tags
- small_tests:
name: small_tests_22
otp_package: 22.3.4.9-1
context: mongooseim-org
requires:
- otp_22
filters: *all_tags
- big_tests:
name: ldap_mnesia_22
otp_package: 22.3.4.9-1
preset: ldap_mnesia
db: mnesia
context: mongooseim-org
requires:
- otp_22
filters: *all_tags
- big_tests:
name: pgsql_mnesia_22
otp_package: 22.3.4.9-1
preset: pgsql_mnesia
db: pgsql
context: mongooseim-org
requires:
- otp_22
filters: *all_tags
# ============= TESTS OTP 23 =============
- build:
name: otp_23
Expand Down Expand Up @@ -780,10 +749,6 @@ workflows:
executor: otp_24
context: mongooseim-org
requires:
- small_tests_22
- ldap_mnesia_22
- pgsql_mnesia_22

- small_tests_23
- ldap_mnesia_23
- pgsql_mnesia_23
Expand Down
53 changes: 26 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: small_tests on OTP ${{matrix.otp}}
strategy:
matrix:
otp: ['23.0.3', '22.3', '24.0.2']
otp: ['23.0.3', '24.0.2']
runs-on: ubuntu-20.04
env:
PRESET: 'small_tests'
Expand All @@ -35,21 +35,20 @@ jobs:
run: tools/test.sh -p $PRESET -s true -e true
- name: prepare coverage report
run: ./rebar3 codecov analyze --lcov --json false
- name: report coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: small_tests on OTP ${{matrix.otp}}
path-to-lcov: ./lcov.info
parallel: true

# - name: report coverage
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# flag-name: small_tests on OTP ${{matrix.otp}}
# path-to-lcov: ./lcov.info
#
big_tests:
name: ${{matrix.preset}} on OTP ${{matrix.otp}}
strategy:
matrix:
preset: [internal_mnesia, pgsql_mnesia, mysql_redis, odbc_mssql_mnesia,
ldap_mnesia, riak_mnesia, elasticsearch_and_cassandra_mnesia]
otp: ['22.3', '23.0.3', '24.0.2']
otp: ['23.0.3', '24.0.2']
runs-on: ubuntu-20.04
env:
PRESET: ${{matrix.preset}}
Expand Down Expand Up @@ -78,23 +77,23 @@ jobs:
run: tools/test.sh -p $PRESET -s false -e false
- name: prepare coverage report
run: ./rebar3 codecov analyze --lcov --json false
- name: report coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{matrix.preset}} on OTP ${{matrix.otp}}
path-to-lcov: ./lcov.info
parallel: true
# - name: report coverage
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# flag-name: ${{matrix.preset}} on OTP ${{matrix.otp}}
# path-to-lcov: ./lcov.info
# parallel: true

coveralls_webhook:
needs: [big_tests, small_tests]
runs-on: ubuntu-20.04
steps:
- name: Finish coveralls parallel build
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
# coveralls_webhook:
# needs: [big_tests, small_tests]
# runs-on: ubuntu-20.04
# steps:
# - name: Finish coveralls parallel build
# uses: coverallsapp/github-action@v1.1.2
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# parallel-finished: true

dialyzer:
name: dialyzer on OTP ${{matrix.otp}}
Expand Down Expand Up @@ -129,7 +128,7 @@ jobs:
pkg: [centos_7, debian_stretch]
runs-on: ubuntu-20.04
env:
ESL_ERLANG_PKG_VER: "22.3.4.9-1"
ESL_ERLANG_PKG_VER: "23.3.1-1"
pkg_PLATFORM: ${{matrix.pkg}}
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion big_tests/rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{escalus, "4.2.5"},
{cowboy, "2.9.0"},
{csv, "3.0.3", {pkg, csve}},
{amqp_client, "3.9.1"},
{amqp_client, "3.9.5"},
{esip, "1.0.43"},
{jid, "1.0.0", {pkg, mongoose_jid}}
]}.
12 changes: 6 additions & 6 deletions big_tests/rebar.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{"1.2.0",
[{<<"amqp_client">>,{pkg,<<"amqp_client">>,<<"3.9.1">>},0},
[{<<"amqp_client">>,{pkg,<<"amqp_client">>,<<"3.9.5">>},0},
{<<"base16">>,{pkg,<<"base16">>,<<"2.0.0">>},0},
{<<"bbmustache">>,{pkg,<<"bbmustache">>,<<"1.10.0">>},0},
{<<"cowboy">>,{pkg,<<"cowboy">>,<<"2.9.0">>},0},
Expand All @@ -25,7 +25,7 @@
{<<"p1_utils">>,{pkg,<<"p1_utils">>,<<"1.0.23">>},1},
{<<"proper">>,{pkg,<<"proper">>,<<"1.4.0">>},0},
{<<"quickrand">>,{pkg,<<"quickrand">>,<<"2.0.2">>},2},
{<<"rabbit_common">>,{pkg,<<"rabbit_common">>,<<"3.9.1">>},1},
{<<"rabbit_common">>,{pkg,<<"rabbit_common">>,<<"3.9.5">>},1},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.8.0">>},1},
{<<"recon">>,{pkg,<<"recon">>,<<"2.5.1">>},2},
{<<"stringprep">>,{pkg,<<"stringprep">>,<<"1.0.25">>},1},
Expand All @@ -34,7 +34,7 @@
{<<"worker_pool">>,{pkg,<<"worker_pool">>,<<"4.0.3">>},1}]}.
[
{pkg_hash,[
{<<"amqp_client">>, <<"CD798BAC0BDAF578CDC18E0DE257927B4FCDFAAA7A976D73F62064A0613D4701">>},
{<<"amqp_client">>, <<"BE7B022550F1C0DDFB23A3145FC3D59B5EDB9FDFCC1DD705796C97F77E9EAC98">>},
{<<"base16">>, <<"9DA694FA0778DF31522A1B9EB349BA4AC9063B497234DC49509C1F5C37F336A2">>},
{<<"bbmustache">>, <<"DDC927463F0E95D66CDAC889153AF08015D609124D6D79006C248AD2DE7F6ECD">>},
{<<"cowboy">>, <<"865DD8B6607E14CF03282E10E934023A1BD8BE6F6BACF921A7E2A96D800CD452">>},
Expand All @@ -58,15 +58,15 @@
{<<"p1_utils">>, <<"7F94466ADA69BD982EA7BB80FBCA18E7053E7D0B82C9D9E37621FA508587069B">>},
{<<"proper">>, <<"89A44B8C39D28BB9B4BE8E4D715D534905B325470F2E0EC5E004D12484A79434">>},
{<<"quickrand">>, <<"1D73FAA52E0C149FCBC72A63C26135FF68BE8FA7870675C73645896788A7540C">>},
{<<"rabbit_common">>, <<"78B899F8C83A4F543CDD978F6B181FE335397DD166AD82E1E65E0CE0C0556DB7">>},
{<<"rabbit_common">>, <<"4F94E901782DB08D2E944BEA8D8537010F724D1E37D7948661E48B887728C2A3">>},
{<<"ranch">>, <<"8C7A100A139FD57F17327B6413E4167AC559FBC04CA7448E9BE9057311597A1D">>},
{<<"recon">>, <<"430FFA60685AC1EFDFB1FE4C97B8767C92D0D92E6E7C3E8621559BA77598678A">>},
{<<"stringprep">>, <<"15062F6020777A51A96488F29CE9A2D83E3195F92FDF27F25ACC462DFF7D8D82">>},
{<<"stun">>, <<"30B6B774864B24B05BA901291ABE583BFF19081E7C4EFB3361DF50B781EC9D3B">>},
{<<"uuid">>, <<"0D1CA9D94CA3B058467BCE20B7706CC816A2BDBBE0574DD008936AE97EA4EBE7">>},
{<<"worker_pool">>, <<"729D98AF0EEF31D10A6027C5AF2EDD4EA7D6CF91E96B03C189BB47F6FDE9667C">>}]},
{pkg_hash_ext,[
{<<"amqp_client">>, <<"09736C85991720FB18C527F6A31A474CCA4DE1335344CDCAA8720008E1D80EFB">>},
{<<"amqp_client">>, <<"DC7CD4D35B4AFF28620F7CD58A9B8F394DAD93CF896704B1F770554F5FF20FDE">>},
{<<"base16">>, <<"63067A9F73D2422F15344A1EAF7033C3B339DC64DA0229DE3DF26F0F6F1E4F82">>},
{<<"bbmustache">>, <<"43EFFA3FD4BB9523157AF5A9E2276C493495B8459FC8737144AA186CB13CE2EE">>},
{<<"cowboy">>, <<"2C729F934B4E1AA149AFF882F57C6372C15399A20D54F65C8D67BEF583021BDE">>},
Expand All @@ -90,7 +90,7 @@
{<<"p1_utils">>, <<"47F21618694EEEE5006AF1C88731AD86B757161E7823C29B6F73921B571C8502">>},
{<<"proper">>, <<"18285842185BD33EFBDA97D134A5CB5A0884384DB36119FEE0E3CFA488568CBB">>},
{<<"quickrand">>, <<"E21C6C7F29CA995468662085CA54D7D09E861C180A9DFEC2CF4A2E75364A16D6">>},
{<<"rabbit_common">>, <<"6A03CC1BF03B16134E529E434EE2B17831F6BE10176ED739B1AC55CA9F26FB2E">>},
{<<"rabbit_common">>, <<"D4F238DF7C2DC67ECECCD1E8A70EAFCC15FDB69DB1E82820533DBE92A229655A">>},
{<<"ranch">>, <<"49FBCFD3682FAB1F5D109351B61257676DA1A2FDBE295904176D5E521A2DDFE5">>},
{<<"recon">>, <<"5721C6B6D50122D8F68CCCAC712CAA1231F97894BAB779EFF5FF0F886CB44648">>},
{<<"stringprep">>, <<"8E0807D94A6927D1C3F8E76D584A2E3CDD9B4BCB02823EAF96629EDF2A65B104">>},
Expand Down
5 changes: 2 additions & 3 deletions doc/configuration/TLS-hardening.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ In order to change the list, please find the following lines:

```
{protocol_version, ['tlsv1.2'
%, 'tlsv1.3' % supported in OTP >= 22
%, 'tlsv1.3'
]}
```

By default only TLS 1.2 is enabled, as 1.3 is not supported by OTPs older than 22.0.
If you are using OTP 22.0 or newer, you may remove leading `%` before `'tlsv1.3'`.
By default only TLS 1.2 is enabled. To enable TLS 1.3, remove leading `%` before `'tlsv1.3'`.
The remaining valid values are: `'tlsv1.1'`, `tlsv1`, `sslv3`.

This setting affects the following MongooseIM components:
Expand Down
2 changes: 1 addition & 1 deletion doc/developers-guide/Bootstrap-Scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ tools/pkg/scripts/smoke_templates.escript
Testing command:

```bash
PRESET=pkg pkg_PLATFORM=centos_7 ESL_ERLANG_PKG_VER=22.1.8-2 ./tools/test.sh
PRESET=pkg pkg_PLATFORM=centos_7 ESL_ERLANG_PKG_VER=23.3.1-2 ./tools/test.sh
```
8 changes: 4 additions & 4 deletions doc/developers-guide/OpenSSL-and-FIPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If you want to use a different OpenSSL than the default one, specify the option
Here's an example of a command for building Erlang/OTP with kerl:

```bash
KERL_CONFIGURE_OPTIONS="--enable-fips" ./kerl build 21.3 21.3-fips
KERL_CONFIGURE_OPTIONS="--enable-fips" ./kerl build 23.3 23.3-fips
```

### Building MongooseIM with a custom OpenSSL
Expand All @@ -34,8 +34,8 @@ export CFLAGS="-I$OPENSSL_INC"

### How to enable/disable FIPS mode

Find `etc/app.config` in the release directory.
FIPS mode is an option of the crypto application.
Find `etc/app.config` in the release directory.
FIPS mode is an option of the crypto application.
In order to enable/disable it, add the following section to `app.config`:

```erlang
Expand Down Expand Up @@ -70,7 +70,7 @@ The function returns:

### Cipher suites difference

A test using a `cipher_suites_test.sh` script (available in the tools directory) can be performed on MongooseIM with FIPS mode enabled and disabled.
A test using a `cipher_suites_test.sh` script (available in the tools directory) can be performed on MongooseIM with FIPS mode enabled and disabled.
We've used `OpenSSL 1.0.1j-fips`.

Here are all the cipher suites available when the **FIPS** mode is **enabled** (the list may vary for different openssl versions):
Expand Down
38 changes: 19 additions & 19 deletions doc/tutorials/How-to-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ To compile MongooseIM you need:

* Make: `make`,
* C and C++ compiler: `gcc`, `gcc-c++`,
* Erlang/OTP 21.2 or higher:
* Erlang/OTP 23.3 or higher:
* `erlang` package, or,
* `esl-erlang` from [Erlang Solutions website](https://www.erlang-solutions.com/resources/download.html), or,
* install using [kerl](https://github.com/kerl/kerl),
* OpenSSL 0.9.8 or higher, for STARTTLS, SASL and SSL encryption: `openssl` and `openssl-devel`,
* ODBC library: `unixODBC-devel`,
* Zlib 1.2.3 or higher: `zlib-devel`.

=== "Ubuntu"

* Make: `make`,
* C and C++ compiler: `gcc`, `g++`,
* Erlang/OTP 21.2 or higher:
* Erlang/OTP 23.3 or higher:
* `erlang` package, or,
* `esl-erlang` from [Erlang Solutions website](https://www.erlang-solutions.com/resources/download.html), or,
* install using [kerl](https://github.com/kerl/kerl),
Expand All @@ -40,7 +40,7 @@ To compile MongooseIM you need:
=== "macOS"

* Make, C and C++ compiler: Xcode Command Line Tools,
* Erlang/OTP 21.2 or higher:
* Erlang/OTP 23.3 or higher:
* [`erlang`](https://formulae.brew.sh/formula/erlang) from Homebrew,
* install using [kerl](https://github.com/kerl/kerl),
* OpenSSL 0.9.8 or higher, for STARTTLS, SASL and SSL encryption: [`openssl`](https://formulae.brew.sh/formula/openssl@1.1) from Homebrew
Expand All @@ -51,55 +51,55 @@ To compile MongooseIM you need:
=== "centOS"

Please install the required dependencies:

```bash
sudo yum install git make zlib-devel openssl openssl-devel unixODBC-devel gcc gcc-c++ erlang
```

Now, please proceed to the "Building" section.

=== "Ubuntu"

Please install the required dependencies:

```bash
sudo apt install git make zlib1g-dev libssl-dev unixodbc-dev gcc g++ erlang
```

Now, please proceed to the "Building" section.

=== "macOS"

**Step 1**

Install [Homebrew](http://brew.sh) to manage packages on your Mac.
You may use a different package manager but you'll need to figure out the package names and file paths on your own.

**Step 2**

Install Xcode Command Line Tools.

```bash
xcode-select --install # install compilation tools
```

**Step 3**

Install dependencies with Brew.

```bash
brew install erlang openssl unixodbc
```

**Step 4**

Add OpenSSL paths to the compiler and linker environment variables:

```bash
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CFLAGS="-I/usr/local/opt/openssl/include"
```

Now, please proceed to the "Building" section.


Expand Down
12 changes: 0 additions & 12 deletions include/backward_compatible.hrl

This file was deleted.

2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
{gun, "1.3.3"},
{nkpacket, {git, "https://github.com/michalwski/nkpacket.git", {ref, "f7c5349"}}},
{nksip, {git, "https://github.com/NetComposer/nksip.git", {ref, "1a29ef3"}}},
{amqp_client, "3.8.14"},
{amqp_client, "3.9.5"},
{eredis, "1.2.0"},
{gen_fsm_compat, "0.3.0"},
{erlang_pmp, "0.1.1"},
Expand Down
Loading