Kim Alvefur
df27bf0645
tools.dnsregistry: Comment out duplicate error codes
...
This has previously been done manually after running this script
2025-02-09 16:26:22 +01:00
Matthew Wild
961b764d10
tools/test_mutants.sh: Load loader helper when running busted
2024-02-23 12:16:03 +00:00
Kim Alvefur
d26ccd8400
tools: Fix selection of container engine
...
Seems command -v in sh only checks and returns one argument, unlike
bash.
2023-12-12 16:19:04 +01:00
Kim Alvefur
75335ede73
tools: Add a tool for comparing DOAP to the latest XEP versions
...
Needs wget, awk, sed and xml2
2023-12-03 15:44:15 +01:00
Kim Alvefur
2f2551e6d2
migrator: Add an escape hatch to allow arbitrary config options
...
Previously only SQL settings and the 'path' for internal storage could
be set, and only for SQL and internal storage.
input {
type = "whatever";
config = {
whatever_foobar = "something"
}
}
2023-11-27 17:19:16 +01:00
Kim Alvefur
b239732046
tools/build-env: Tools for building and testing in a container
...
./tools/build-env/build.sh
Creates a container image based on Debian or Ubuntu
./tools/build-env/here.sh
Starts a container and mounts in the current working directory, from
where one can ./configure; make; make test etc
2023-11-12 13:02:38 +01:00
Kim Alvefur
918bb97dd5
migrator: Add mod_http_file_share example to config template
2023-11-01 19:02:07 +01:00
Kim Alvefur
607bfafe36
migrator: Update default config template with new stores
...
* mod_authz_internal adds account_roles
* mod_cron has its state
* mod_smacks also has some non-critical state
2023-11-01 19:02:02 +01:00
Kim Alvefur
5851729492
tools: Reflect bash-ness of mod2spec in shebang
...
Non-portable substitution syntax? Oh well.
2023-08-26 15:10:58 +02:00
Kim Alvefur
5b7a569fe0
tools: Fix file ending of mod2spec.sh (thanks buildbot)
...
Accidentally .lua ?
2023-07-16 20:29:06 +02:00
Kim Alvefur
a906513d32
tools: Add mod2spec.sh, turns util.example into spec/util_example_spec.lua
...
Useful for opening a module and its tests at the same, can be awkward to
auto-complete sometimes.
sensible-editor util/example.lua $(./tools/mod2spec.sh util.example)
2023-07-16 18:33:53 +02:00
Kim Alvefur
1541284108
tools: Update imports to use new prosody.* namespace
2023-06-08 09:37:01 +02:00
Kim Alvefur
3d4d094026
tools/tb2err: Trim trailing whitespace
2023-04-08 12:56:13 +02:00
Kim Alvefur
bb26331c4b
tools/tb2err: Rewrite prosody-modules paths to ../modules
...
This assumes you have community modules in ../modules as I do
2023-04-08 12:55:08 +02:00
Kim Alvefur
fe0b8b9e2c
tools/tb2err: Add some example usage in a comment
2023-04-08 12:54:26 +02:00
Kim Alvefur
5a8fbd06a8
tools/tb2err: Drop use of lua-any since it should run fine on any Lua
...
Dependencies--; \o/
2023-04-08 12:53:19 +02:00
Kim Alvefur
45579e5609
tools/dnsregistry: Fix to ignore unassigned entries
2023-01-20 23:39:39 +01:00
Matthew Wild
8434b4be4b
tools: Add initial mutation testing script
2022-10-11 11:53:48 +01:00
Kim Alvefur
f8e73eba98
compat: Use table.pack (there since Lua 5.2) over our util.table
...
Added in d278a770eddc avoid having to deal with its absence in Lua 5.1.
No longer needed when Lua 5.1 support is dropped.
2022-07-11 19:15:24 +02:00
Kim Alvefur
5251c9b686
compat: Remove handling of Lua 5.1 location of 'unpack' function
2022-07-11 19:07:38 +02:00
Kim Alvefur
43351d2b54
Spelling: Fix various spelling mistakes (thanks timeless)
...
Words, sometimes I wonder how they even work
Maybe I missed something.
2022-03-07 00:13:56 +01:00
Kim Alvefur
e6f20da22f
tools: Allow processing instructions in some XML parsing tools
...
IANA registry files have XSLT references, which are harmless to ignore.
2022-02-04 21:20:48 +01:00
Kim Alvefur
8b68fc3c6c
tools.dnsregistry: For converting IANA DNS registry data to Lua table
2020-10-04 19:26:53 +02:00
Kim Alvefur
456d91e7d7
tools/xep227toprosody: Remove obsolete tool in favor of storage driver
...
This tool hasn't been updated for recent XEP-0227 changes, hasn't seen
many changes at all since its introduction and I don't remember anyone
mentioning ever using it.
Using mod_storage_xmlarchive and the migrator or the 3rd party
mod_migrate tool should work better these days and should be the way
forward.
2022-01-18 15:43:17 +01:00
Kim Alvefur
3854d0c090
migrator: Support pubsub and pep as a special-case
...
This sorta overloads the type suffix but PEP is used for enough stuff
to justify this hack
2022-01-09 18:52:58 +01:00
Kim Alvefur
f04a5512a7
migrator: Enhance logging
2022-01-09 16:35:43 +01:00
Kim Alvefur
b21bc2b374
migrator: Add option to keep going despite errors
2022-01-09 16:08:15 +01:00
Kim Alvefur
07c3f35ab8
migrator: Also migrate host/non-user archive data
...
Needed for things like mod_http_file_share
2022-01-09 15:52:50 +01:00
Kim Alvefur
e9b2be9e44
migrator: Refactor out individual item migrator for code deduplication
2022-01-09 15:50:21 +01:00
Kim Alvefur
25a9fd3fdd
migrator: Include --options in usage info
2022-01-09 16:15:21 +01:00
Kim Alvefur
bf60d226b8
migrator: Reuse earlier usage text
2022-01-09 15:57:59 +01:00
Kim Alvefur
6852806c10
migrator: Customise cli argument parsing (--help, --verbose)
...
Previously -v etc would do nothing and --config without argument would
not have worked correctly.
2022-01-09 15:19:55 +01:00
Kim Alvefur
58c9115351
util.format: Ensure metatable __tostring results are also sanitized
2021-12-13 16:34:55 +01:00
Kim Alvefur
725bb0cb15
tools/generate_format_spec: Apply lua-format to silence luacheck
2021-12-11 20:58:09 +01:00
Kim Alvefur
3d0844a4f5
util.format: ALL THE TESTS!!!
...
The more tests I made, the more Lua 5.1 quirks I discovered.
Tests generated using a tool plus some touch-up.
2021-12-11 20:38:54 +01:00
arcseconds
3872237625
ejabberd2prosody.lua: fix MUC subject conversion with appropriate destructuring
2021-10-26 23:29:40 +13:00
Matthew Wild
21eeadecc7
ejabberd2prosody: Don't import disabled or empty passwords
2021-10-13 10:04:11 +01:00
Matthew Wild
8660ec61ce
prosody2ejabberd: Check for iteration count at position 6
...
In some data dumps, presumably from newer ejabberd versions, position 5 is
the string "sha", and the iteration count follows it.
2021-10-07 13:02:28 +01:00
Matthew Wild
7925b95a58
ejabberd2prosody: Convert SCRAM iteration count to number (thanks arcseconds)
2021-10-07 11:16:46 +01:00
Kim Alvefur
d1fe0504e7
migrator: Silence assert in core.moduleapi
...
The assert triggers because we're not loading the stanza route, because
we are unlikely to need it during migration.
2021-07-29 14:11:29 +02:00
Kim Alvefur
f98cf38994
migrator: Use parsed command line flags already parsed by util.startup
2021-07-29 14:10:56 +02:00
Kim Alvefur
08e7a84274
migrator: Trick net.server into thinking the config is loaded
...
Fixes "Loading outside Prosody or Prosody not yet initialized"
2021-07-29 14:06:14 +02:00
Kim Alvefur
cc0f3b6f24
migrator: Customise startup sequence to fix #1673 (Thanks acidsys)
...
Diverge from util.startup.prosodyctl() in order to skip unneeded
behavior, such as loading the *Prosody* config file, which we do not
need here, based on the `--config` flag which should point at the
migrator config file instead.
Notably removed:
* read_config() since this loads the Prosody config
* check_unwriteable() which checks logfiles specified in the Prosody config, so not relevant
* make_dummy_hosts() but the migrator sets up its own hosts during migration
2021-07-29 13:47:26 +02:00
Kim Alvefur
bfa8e5b52a
tools/jabberd14sql2prosody: Tweak wording in comments
2021-07-13 23:28:49 +02:00
Kim Alvefur
c8602a046d
tools/xep227toprosody: Tweak wording in comments
2021-07-13 23:27:44 +02:00
Kim Alvefur
c7396c9aac
tools/cfgdump: Serialize individual (table) settings in stable order too
2021-05-17 16:51:11 +02:00
Kim Alvefur
7d5c227a04
tools/cfgdump: Iterate in sort order to give stable output
...
Should allow using this tool for comparing configs without hash table
order messing things up.
2021-05-17 16:33:44 +02:00
Matthew Wild
1ab96f2289
tools.modtrace: Pass config to serialize()
2020-10-30 14:04:40 +00:00
Matthew Wild
7312a610d4
tools.modtrace: Library for tracing/debugging Lua module and method calls
2020-10-30 13:53:24 +00:00
Kim Alvefur
53e6579aab
tools/form2table: Convert XEP-0004 dataform from XML to util.dataforms Lua format
...
Used this to generate code for a number of PubSub forms IIRC
2020-10-28 23:15:52 +01:00