Commit Graph

78 Commits

Author SHA1 Message Date
Badlop b08001183e ext_mod: Support Elixir modules with several defimpl, like Decimal 2024-01-17 10:24:34 +01:00
Badlop 0121adec03 ext_mod: Compile *.ex files also in source subfolders 2024-01-17 10:24:34 +01:00
Badlop 9534ca2da1 ext_mod: Support when git repository name is not identical to the module name
For example, ejabberd-contrib has an extra module, mod_prometheus,
that is hosted in a git repository named ejabberd-prometheus-exporter
2023-10-04 20:57:02 +02:00
Badlop f9d11265d0 ext_mod: Don't crash when github page response is 403 2023-10-04 20:55:01 +02:00
Badlop d85c125bef ext_mod: Use the same URL that ejabberd-contrib spec files 2023-10-04 20:54:49 +02:00
Badlop 78f81de252 Improve support to stop external modules written in Elixir 2023-07-13 13:41:18 +02:00
Badlop c333cc0776 New option install_contrib_modules
This option is read during ejabberd start or config reload.
It installs the listed modules which aren't yet installed,
as long as allow_contrib_modules is not disabled.
Edit ejabberd.yml and configure the desired ejabberd-contrib modules,
add them in the install_contrib_modules option,
finally start ejabberd (or reload config).
2023-06-09 10:27:13 +02:00
Badlop 436074c67a When installing module already configured, keep config as example
When installing a module using ext_mod, if it has already configuration
in the modules section, copy its specific config file as an example
(copy file and rename it).
This may happen when using the new install_contrib_modules option.
2023-06-09 00:02:02 +02:00
Badlop c5c7e7fc4d ext_mod: Improve support for loading *.so files from ext_mod dependencies
Copying files from deps/*/priv/*.so to the ejabberd priv/
is not possible when running ejabberd as OTP release or in a container.
Instead, let's copy the deps/*/priv/*.so maintaining the file structure,
and then using code:add_pathz for those dirs.

This partially reverts 5c1b72853f
2023-01-25 17:58:12 +01:00
Badlop 243697e25a Update copyright year to 2023 (#3967) 2023-01-10 13:52:04 +01:00
Badlop 5c1b72853f External modules: compile C files and install them in ejabberd's priv 2023-01-03 18:48:44 +01:00
Badlop 4ad4a3bf24 Support to get module status from Elixir modules 2022-12-22 14:00:38 +01:00
Badlop d29fdc4d2e Remove unnecessary text string 2022-10-12 12:06:28 +02:00
Badlop 7d8fa3c880 ext_mod: Support managing remote nodes in the cluster 2022-08-05 16:15:05 +02:00
Badlop 72944d895b ext_mod: Handle correctly when COMMIT.json not found 2022-08-05 16:15:03 +02:00
Badlop bc8050eb03 Don't bother with COMMIT.json user-friendly feature in automated user case 2022-07-27 15:16:51 +02:00
Badlop a38ed7fb2c Handle not found COMMIT.json, for example in GH Actions 2022-07-27 15:16:49 +02:00
Badlop 033656d70e Add WebAdmin page for managing external modules 2022-07-26 15:42:13 +02:00
Badlop b3211b1f71 Update copyright year to 2022 2022-02-11 09:39:25 +01:00
Badlop ab5e726176 Use the most specific tag for ejabberd commands with several ones 2021-07-30 01:14:36 +02:00
Badlop bb0c6e1e02 Show messages with next configuration steps when installing a module 2021-07-06 13:37:04 +02:00
Badlop 4495f0f0b9 For OTP<22 define LAGER macro in ext_mod like in rebar.config (#3493) 2021-02-16 13:09:21 +01:00
Badlop 6e0161470e Update newest copyright year to 2021 (#3464) 2021-01-27 17:02:06 +01:00
Paweł Chmielowski 9be3d948b2 Make ext_mod compile module with debug_info flags
This should fix issue #3472
2021-01-07 15:10:39 +01:00
Paweł Chmielowski ec61c2f3dc Change split character in PROXY_USER from \x04 to :
This is clearly typo
2020-10-29 16:36:18 +01:00
Paweł Chmielowski 151b818af4 Use compilation flags used during build to compile modules in ext_mod
This fixes issue #3178
2020-03-03 11:25:17 +01:00
Badlop 2d32c66fd7 Update copyright to 2020 (#3149) 2020-01-28 15:49:23 +01:00
Evgeny Khramtsov 94b74c0cbe Fix loading of third-party modules at startup
Fixes #3019
2019-11-07 10:47:11 +03:00
Evgeny Khramtsov 5770946f03 Correctly handle unicode in log messages 2019-09-23 15:17:20 +03:00
Evgeny Khramtsov 6f5d99275b Process unexpected messages uniformly 2019-07-12 11:55:36 +03:00
Evgeny Khramtsov a02cff0e78 Use new configuration validator 2019-06-14 12:33:26 +03:00
Badlop 4e591a73c5 Add ext_mod paths before checking config (processone/ejabberd-contrib#263) 2019-04-03 13:10:11 +02:00
Badlop 55417dfb37 Update copyright to 2019 (#2756) 2019-01-08 22:53:27 +01:00
Evgeny Khramtsov 2d246f61dd Fix some dialyzer warnings 2018-09-09 09:59:08 +03:00
Rogério da Silva Yokomizo 4a4cc32650 Export ext_mod:add_sources/1 2018-05-22 16:16:13 +02:00
Paweł Chmielowski 5b730cdbf2 Use httpc directly instead of using p1_http wrapper 2018-04-23 17:40:44 +02:00
Evgeniy Khramtsov cdc7c1d1ed Update copyright dates 2018-01-05 23:18:58 +03:00
Christophe Romain 7e6d1c24c2 Update spec from custom and allow modules dependencies (#1740) 2017-08-01 13:33:14 +02:00
Christophe Romain 2e88d001d6 Fix errors from 1a0db3d 2017-07-21 11:42:03 +02:00
Badlop 1a0db3de3a Describe commands arguments and results in ejabberd_sm, ext_mod, mod_mam 2017-07-21 11:26:53 +02:00
Christophe Romain a11e833a98 Make ext_mod api return rescode 2017-06-20 14:45:31 +02:00
Evgeniy Khramtsov 01a2c9fe12 Add type specs for Module:opt_type/1 2017-05-08 12:59:28 +03:00
Evgeniy Khramtsov b82b93f8f0 Don't validate an option in ejabberd_config:get_option() functions
The commit introduces the following changes:
* Now there is no need to pass validating function in
  ejabberd_config:get_option() functions, because the configuration
  keeps already validated values.
* New function ejabberd_config:get_option/1 is introduced
* Function ejabberd_config:get_option/3 is deprecated. If the function
  is still called, the second argument (validating function) is simply
  ignored.
* The second argument for ejabberd_config:get_option/2 is now
  a default value, not a validating function.
2017-04-29 11:39:40 +03:00
Christophe Romain b1acd1183f Rename aux.erl as misc.erl
Thanks Microsoft Windows to not support some filenames
2017-04-11 12:13:58 +02:00
Christophe Romain 0567d528c6 Let ext_mod be aware of p1_utils includes 2017-04-07 12:51:43 +02:00
Christophe Romain 36e3f4bc2a Generate ejabberd lib dir when not available in code server (#1665)
This is the case if running ejabberd from development directory
when code:lib_dir(ejabberd) returns {error, nad_name}.
2017-04-07 12:09:43 +02:00
Evgeniy Khramtsov 7bcbea2108 Deprecate jlib.erl in favor of aux.erl
Since the main goal of jlib.erl is lost, all auxiliary functions
are now moved to aux.erl, and the whole jlib.erl is now deprecated.
2017-03-30 14:17:13 +03:00
Badlop 113ed66f49 In module_install copy also deps/ebin and priv files (ejabberd-contrib#200) 2017-03-13 11:26:58 +01:00
Evgeniy Khramtsov fadcc85553 Put more stuff under supervision 2017-02-26 15:10:59 +03:00
Badlop 5fdd1c39fe Update copyright date automatically (#1442) 2017-01-02 21:42:06 +01:00