1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-03 01:39:35 +02:00
Commit graph

10144 commits

Author SHA1 Message Date
Badlop
b769de0690 New option define_keyword 2025-03-18 13:40:21 +01:00
Badlop
19482529ee Inform that define_macro cannot be used inside host_config 2025-03-18 13:40:21 +01:00
Badlop
ad8e325139 Disable commands tests for old Erlang/OTP versions
Since recently, this test fails with Erlang/OTP 22 and lower:
  =result        failed:
    {test_case_failed,
     "Received input:
      [{error,{compilation_failed,
         \"/home/runner/.ejabberd-modules/sources/ejabberd-contrib/mod_example/src/mod_example.erl\"}}]
      don't match expected patterns:ok"},
2025-03-18 12:45:25 +01:00
Badlop
b901a69f5c mix.exs: Keep debug info when building dev release (thanks to Stefan Strigler) 2025-03-17 15:09:12 +01:00
Badlop
62a165e4cf ejabberd_web_admin: Support commands with tuple arguments; fix list indent 2025-03-17 15:09:10 +01:00
badlop
29616dc163
Merge pull request #4340 from badlop/containers-frictionless
CTL_OVER_HTTP and containers frictionless
2025-03-12 19:40:56 +01:00
Badlop
60324d4b7a CONTAINER.md: Include documentation for ecs container image 2025-03-12 18:19:39 +01:00
Badlop
cfa6575b4f CONTAINER.md: Update with all the recent improvements 2025-03-12 18:18:03 +01:00
Badlop
3b01e4e4e0 Container: Fix warning about relative workdir 2025-03-12 18:18:03 +01:00
Badlop
fa4a93c465 Container: Place sockets/ outside database/
The socket file is useless outside the container, and also
database/ may get mounted as volume, and can't handle socket file
2025-03-12 18:18:03 +01:00
Badlop
74d6d53ac6 Container: Add ERL_FLAGS to compile elixir on qemu cross-platform
Without this, compiling Elixir on arm64 using QEMU fails with:
 <<"could not call Module.put_attribute/3 because the module ExUnit.DocTest
 is already compiled">>

Solution found in:
  https://elixirforum.com/t/elixir-docker-image-wont-build-for-linux-arm64-v8-using-github-actions/56383/13
2025-03-12 18:18:03 +01:00
Badlop
8070a656fe Container: Use again direct METHOD, qemu got fixed (3983)(4280)
Partially revert d15cf99:
  Container: Add METHOD to build container using packages (3983)
2025-03-12 18:18:03 +01:00
Badlop
105a0c2029 Container: Enable CTL_OVER_HTTP by default 2025-03-12 18:18:03 +01:00
Badlop
e887546c27 Container: Copy support for CTL_OVER_HTTP 2025-03-12 18:18:03 +01:00
Badlop
9305232f8c Container: Remove runDeps file once it's used 2025-03-12 18:18:03 +01:00
Badlop
7832a6342a Container: Link path to mnesia spool dir for backwards compatibility
The ejabberdctl script in ecs image sets mnesia spool dir as:
: "${SPOOL_DIR:="$HOME_DIR/database/$ERLANG_NODE"}"
2025-03-12 18:18:03 +01:00
Badlop
c924a47188 Container: Improve entrypoint script: register account, or set random
If password variable is set, register that account.
Example kubernetes yaml file in podman:

    env:
    - name: EJABBERD_MACRO_ADMIN
      value: administrator@example.org
    - name: REGISTER_ADMIN_PASSWORD
      value: somePass0rd

If admin and password are not set,
grant admin rights only to a random account name.
Notice that admin rights are granted to that variable in the default
ejabberd.yml, so if the account is not created, somebody else could do.
2025-03-12 18:18:03 +01:00
Badlop
1d42d55064 Container: Compile ejabberdapi during build
Code written originally by sando38 for ecs's Dockerfile.
2025-03-12 18:18:03 +01:00
Badlop
dd7550dbad Container: Listen for webadmin in a port number lower than any other
In the docker-desktop and podman-desktop,
when user clicks their "Open Browser" buttons,
those apps open a browser with / URL and the lowest exposed port number.
2025-03-12 18:18:03 +01:00
Badlop
7df7daa050 Container: Define and use macros in the configuration file 2025-03-12 18:18:03 +01:00
Badlop
090a7e664e Container: Apply customizations directly in the configuration file 2025-03-12 18:18:03 +01:00
Badlop
3d49bed0cf Container: Copy main example configuration file, will be customized 2025-03-12 18:18:03 +01:00
Badlop
9f28098d04 Container: Copy files to stable path, add ecs backwards compatibility
Copy captcha scripts to stable path for referencing in compose files:
  /usr/local/bin/
which is included in $PATH

For backwards compatibility with ecs, link:
  /opt/ -> /home/
  /usr/local/bin/ -> /opt/ejabberd/bin/

Copy sql files to stable path for referencing:
  /opt/ejabberd/sql/
For backwards compatibility with ecs, copy also to
  /opt/ejabberd/database/
ecs image implemented this in ejabberdctl since 2019:
  edb0373fd0ae0b24807a41ba2c3bf04b5b514844
  Keep SQL init scripts in container (#42)
2025-03-12 18:18:03 +01:00
Badlop
e761b22c61 ejabberd_listener: When opening ctl_over_http connection, log in DEBUG 2025-03-12 18:18:03 +01:00
Badlop
4d62f545c5 ejabberd_admin: Separate Status command result with newline
This is useful for CTL_OVER_HTTP
2025-03-12 18:18:03 +01:00
Badlop
f789495c39 ejabberdctl: Improve method to pass command arguments 2025-03-12 18:18:03 +01:00
Badlop
46a64c0f68 New ejabberdctl option CTL_OVER_HTTP
This uses an HTTP connection to execute the command,
which is way faster than starting an erlang node
2025-03-12 18:18:03 +01:00
Badlop
ab8a39e71f ejabberdctl: Improve explanation how to stop ejabberd in live mode 2025-03-12 18:18:03 +01:00
Badlop
630301a7ba ejabberdctl: Document the --auth option
The expected placement of --auth is not arbitrary,
it should be provided immediately before the command+args
2025-03-12 18:18:03 +01:00
Badlop
d4fd987e84 ejabberd_listener: When stopping listener, delete Unix Domain Socket file 2025-03-12 17:21:46 +01:00
Badlop
c5abe5d882 ejabberd_listener: Apparently the sleep 5 seconds isn't needed anymore 2025-03-12 17:09:37 +01:00
Badlop
71dbbc1b5a ejabberd_listener: Use /tmp for temporary socket, as path is restricted to 107 chars 2025-03-12 17:09:37 +01:00
Badlop
c9a9585573 ejabberd_listener: Add support for socket relative path
If the 'port' option is set to "unix:some-filename" without absolute path,
then the file is created in the mnesia spool directory
2025-03-12 17:09:37 +01:00
Badlop
bb2f398fa2 ejabberd_listener: Handle unix socket when logging remote client 2025-03-12 17:09:37 +01:00
Badlop
afc54aeb20 ext_mod: Provide output path when mix unpacks dependency from hex
When installing a module with mix available in the system,
mix downloads and uncompresses the dependency.
By default the output dir is <app>-<version> [1], and
that breaks compilation of the prometheus library:
  .../sources/ejabberd-contrib/mod_prometheus/deps/prometheus-4.11.0/src/metrics/prometheus_quantile_summary.erl:67:14:
  can't find include lib "quantile_estimator/include/quantile_estimator.hrl"
  %   67| -include_lib("quantile_estimator/include/quantile_estimator.hrl").

[1] https://hexdocs.pm/hex/Mix.Tasks.Hex.Package.html#module-command-line-options
2025-03-12 12:42:42 +01:00
badlop
9c142e5509
Merge pull request #4361 from sstrigler/ext_mod-fix-greedy-include-path
Ext mod fix greedy include path cont'd
2025-03-12 10:59:44 +01:00
Stefan Strigler
27f98f50d3 fix typo 2025-03-12 08:11:25 +01:00
Stefan Strigler
0145594adc add $libdir/include to include path 2025-03-12 08:11:07 +01:00
badlop
67ee0de7e3
Merge pull request #4360 from sstrigler/ext_mod-fix-greedy-include-path
fix greedy include path (fixes #4359)
2025-03-11 19:28:52 +01:00
Stefan Strigler
087718c47a fix greedy include path (fixes #4359) 2025-03-11 15:05:54 +01:00
Badlop
6bf5930703 mod_announce: Improve documentation syntax 2025-03-06 22:06:04 +01:00
Badlop
90c4fa2a84 mod_admin_extra: If policy=user, ejabberd adds the user/host args 2025-03-06 22:06:03 +01:00
Badlop
b75c3257bd ejabberd_oauth: Commands description should be plain text
The desc field is displayed in "ejabberdctl help", which has
no markdown processing.

If adding links is important, they can be added in the longdesc field.
2025-03-06 22:05:58 +01:00
Badlop
178b09f5bb ejabberd_admin: Fix crash in list_cluster_detailed when a node is down 2025-03-06 22:05:56 +01:00
Badlop
70980efe39 make-binaries: Bump versions to Erlang/OTP 27.3 and Elixir 1.18.3 2025-03-06 22:05:53 +01:00
dependabot[bot]
c124dbdd6a build(deps-dev): bump ex_doc from 0.37.1 to 0.37.2
Bumps [ex_doc](https://github.com/elixir-lang/ex_doc) from 0.37.1 to 0.37.2.
- [Release notes](https://github.com/elixir-lang/ex_doc/releases)
- [Changelog](https://github.com/elixir-lang/ex_doc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/elixir-lang/ex_doc/compare/v0.37.1...v0.37.2)

---
updated-dependencies:
- dependency-name: ex_doc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-06 22:05:49 +01:00
dependabot[bot]
6af2a65e53 build(deps): bump stringprep from 1.0.30 to 1.0.31
Bumps [stringprep](https://github.com/processone/stringprep) from 1.0.30 to 1.0.31.
- [Changelog](https://github.com/processone/stringprep/blob/master/CHANGELOG.md)
- [Commits](https://github.com/processone/stringprep/compare/1.0.30...1.0.31)

---
updated-dependencies:
- dependency-name: stringprep
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-06 22:05:48 +01:00
Badlop
54f89e7568 Update XEP-0280 supported version to 1.0.1 2025-03-06 22:05:45 +01:00
Paweł Chmielowski
66205cf648
Merge pull request #4356 from pouriya/ref-new-hook-to-customize-resource-binding
Add c2s_handle_bind hook
2025-03-06 14:19:57 +01:00
Paweł Chmielowski
b38d8618b2 Fix crashes when ouath is feed with invalid jid
This should fix issue #4355
2025-02-26 11:17:55 +01:00