Kim Alvefur
8b68fc3c6c
tools.dnsregistry: For converting IANA DNS registry data to Lua table
5 years ago
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.
4 years ago
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
4 years ago
Kim Alvefur
f04a5512a7
migrator: Enhance logging
4 years ago
Kim Alvefur
b21bc2b374
migrator: Add option to keep going despite errors
4 years ago
Kim Alvefur
07c3f35ab8
migrator: Also migrate host/non-user archive data
...
Needed for things like mod_http_file_share
4 years ago
Kim Alvefur
e9b2be9e44
migrator: Refactor out individual item migrator for code deduplication
4 years ago
Kim Alvefur
25a9fd3fdd
migrator: Include --options in usage info
4 years ago
Kim Alvefur
bf60d226b8
migrator: Reuse earlier usage text
4 years ago
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.
4 years ago
Kim Alvefur
58c9115351
util.format: Ensure metatable __tostring results are also sanitized
4 years ago
Kim Alvefur
725bb0cb15
tools/generate_format_spec: Apply lua-format to silence luacheck
4 years ago
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.
4 years ago
arcseconds
3872237625
ejabberd2prosody.lua: fix MUC subject conversion with appropriate destructuring
4 years ago
Matthew Wild
21eeadecc7
ejabberd2prosody: Don't import disabled or empty passwords
4 years ago
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.
4 years ago
Matthew Wild
7925b95a58
ejabberd2prosody: Convert SCRAM iteration count to number (thanks arcseconds)
4 years ago
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.
5 years ago
Kim Alvefur
f98cf38994
migrator: Use parsed command line flags already parsed by util.startup
5 years ago
Kim Alvefur
08e7a84274
migrator: Trick net.server into thinking the config is loaded
...
Fixes "Loading outside Prosody or Prosody not yet initialized"
5 years ago
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
5 years ago
Kim Alvefur
bfa8e5b52a
tools/jabberd14sql2prosody: Tweak wording in comments
5 years ago
Kim Alvefur
c8602a046d
tools/xep227toprosody: Tweak wording in comments
5 years ago
Kim Alvefur
c7396c9aac
tools/cfgdump: Serialize individual (table) settings in stable order too
5 years ago
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.
5 years ago
Matthew Wild
1ab96f2289
tools.modtrace: Pass config to serialize()
5 years ago
Matthew Wild
7312a610d4
tools.modtrace: Library for tracing/debugging Lua module and method calls
5 years ago
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
5 years ago
Kim Alvefur
4d9e30aff3
tools/linedebug: Print each line of source executed
...
The extremely verbose debug output. Nice for getting some idea which
code runs most often, or where it pauses for no reason etc.
5 years ago
Kim Alvefur
43ec58831c
tools/cfgdump: Reads Prosody config file and pretty-prints it back out
...
Useful for comparing what you think you have in your config with what
Prosody sees, e.g. wrt (lack of) significance of indentation, order of
options vs scope etc. (global options do not go at the end!)
Could probably be turned into a prosodyctl command, especially if it
learns to redact secrets and passwords.
5 years ago
Kim Alvefur
4cb9c49d95
tools/tb2err: Formats Lua traceback in errors.err format
...
Manually opening to the files and line numbers from a Lua traceback is
tedious. This tool converts tracebacks into a format that many compilers
and such tools use, which is also compatible with Vim (and possibly
other editors).
Thus if someone sends you a pastebin link with a traceback, a command
like the following gets you right to the relevant lines:
curl paste.example/abc123.txt | tb2err > errors.err; vim -q
5 years ago
Kim Alvefur
25685a3d1b
migrator: Don't create unused directory
...
I guess this contained the old per-store migrators
6 years ago
Kim Alvefur
8dceed3e9e
migrator: Inject data- and plugin paths during build
...
Same way as with the prosody and prosodyctl executables
6 years ago
João Duarte
8398643365
make_repo.lua: Moved to /tools/make_repo.lua
7 years ago
Kim Alvefur
037fc25b4c
migrator: Add support for archives ( fixes #651 )
7 years ago
Kim Alvefur
6041d3e4e8
migrator: Rewrite to use storage modules
...
This allows migrating to and from any storage module that supports the
right methods. Based on experimental mod_migrate work.
7 years ago
Kim Alvefur
f2dac55651
tools: Add a tool to generate net.http.codes from IANA registry
8 years ago
Kim Alvefur
91baabfede
SQL: Use standard quotes for columns and other identifiers, rewrite to grave accents for MySQL only ( fixes #885 )
9 years ago
Kim Alvefur
699dab7c6d
migration/prosody_sql: Commit transaction when all items have been processed
9 years ago
Kim Alvefur
6b3a33a083
migrator/prosody_sql: Abort and demand database be upgraded if it needs to be ( #635 )
9 years ago
Kim Alvefur
8a7bc589b3
migrator.prosody_sql: Switch to util.sql ( #635 )
9 years ago
Kim Alvefur
8716255d0c
migrator: Remove broken distinction between a load error or a missing storage handler (worked with module()?)
9 years ago
Kim Alvefur
fc7dadb6a7
migrator: Fix missing word
9 years ago
Kim Alvefur
00b6eff872
migrator: Fix argument parsing
9 years ago
Kim Alvefur
ff26455099
migrator: Unexpand whitespace
9 years ago
Kim Alvefur
0a385a3953
tools/migration/migrator/*: Remove use of module()
9 years ago
Kim Alvefur
f0918f4e1b
migrator: Remove wrapper around envloadfile since envloadfile does the right thing in a compatible way
9 years ago
Kim Alvefur
d3f66c0848
tools/erlparse: Remove use of deprecated module() function
9 years ago
Anton Shestakov
9129ea5b4c
ejabberdsql2prosody: rename variable 't' to prevent shadowing upvalues [luacheck]
...
Let's make the result of parseFile() have a more descriptive name.
10 years ago
Anton Shestakov
41c7847806
ejabberdsql2prosody: rename variable 'host' to prevent shadowing upvalue [luacheck]
...
Functions roster(), roster_pending(), roster_group(), private_storage() and
offline_msg() have argument named "host", which used to shadow upvalue of this
variable before this change. Instead of renaming this argument, let's rename
the variable to match what the script says in usage:
Usage: ejabberdsql2prosody.lua filename.txt hostname
10 years ago