Software /
code /
prosody
Annotate
tools/migration/Makefile @ 12579:ca6a43fe0231 0.12
util.jsonschema: Fix validation to not assume presence of "type" field
MattJ reported a curious issue where validation did not work as
expected. Primarily that the "type" field was expected to be mandatory,
and thus leaving it out would result in no checks being performed.
This was likely caused by misreading during initial development.
Spent some time testing against
https://github.com/json-schema-org/JSON-Schema-Test-Suite.git and
discovered a multitude of issues, far too many to bother splitting into
separate commits.
More than half of them fail. Many because of features not implemented,
which have been marked NYI. For example, some require deep comparisons
e.g. when objects or arrays are present in enums fields.
Some because of quirks with how Lua differs from JavaScript, e.g. no
distinct array or object types. Tests involving fractional floating
point numbers. We're definitely not going to follow references to remote
resources. Or deal with UTF-16 sillyness. One test asserted that 1.0 is
an integer, where Lua 5.3+ will disagree.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 08 Jul 2022 14:38:23 +0200 |
parent | 10726:5d544b5e7d82 |
rev | line source |
---|---|
4216
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 include ../../config.unix |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 BIN = $(DESTDIR)$(PREFIX)/bin |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 CONFIG = $(DESTDIR)$(SYSCONFDIR) |
6574
cd0088c73daf
configure, Makefile: Add --libdir option to ./configure, allowing you to override the $PREFIX/lib/ default. Fixes #470.
Matthew Wild <mwild1@gmail.com>
parents:
5402
diff
changeset
|
6 SOURCE = $(DESTDIR)$(LIBDIR)/prosody |
4216
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 DATA = $(DESTDIR)$(DATADIR) |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 MAN = $(DESTDIR)$(PREFIX)/share/man |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 |
6574
cd0088c73daf
configure, Makefile: Add --libdir option to ./configure, allowing you to override the $PREFIX/lib/ default. Fixes #470.
Matthew Wild <mwild1@gmail.com>
parents:
5402
diff
changeset
|
10 INSTALLEDSOURCE = $(LIBDIR)/prosody |
4216
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 INSTALLEDCONFIG = $(SYSCONFDIR) |
6574
cd0088c73daf
configure, Makefile: Add --libdir option to ./configure, allowing you to override the $PREFIX/lib/ default. Fixes #470.
Matthew Wild <mwild1@gmail.com>
parents:
5402
diff
changeset
|
12 INSTALLEDMODULES = $(LIBDIR)/prosody/modules |
4216
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 INSTALLEDDATA = $(DATADIR) |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 |
10003
4d702f0c6273
migrator: Rewrite to use storage modules
Kim Alvefur <zash@zash.se>
parents:
6574
diff
changeset
|
15 all: prosody-migrator.install migrator.cfg.lua.install prosody-migrator.lua |
4216
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 install: prosody-migrator.install migrator.cfg.lua.install |
10003
4d702f0c6273
migrator: Rewrite to use storage modules
Kim Alvefur <zash@zash.se>
parents:
6574
diff
changeset
|
18 install -d $(BIN) $(CONFIG) $(SOURCE) |
4216
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
19 install -d $(MAN)/man1 |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 install -m755 ./prosody-migrator.install $(BIN)/prosody-migrator |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
21 test -e $(CONFIG)/migrator.cfg.lua || install -m644 migrator.cfg.lua.install $(CONFIG)/migrator.cfg.lua |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
22 |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 clean: |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 rm -f prosody-migrator.install |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
25 rm -f migrator.cfg.lua.install |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
26 |
4229
f15b4e9ba688
tools/migration: Rename main.lua -> prosody-migrator.lua and update the Makefile
Matthew Wild <mwild1@gmail.com>
parents:
4224
diff
changeset
|
27 prosody-migrator.install: prosody-migrator.lua |
5402
cb6f0afd8468
tools/migration/Makefile: Apply Lua runtime override (see 53f741a5a73a)
Kim Alvefur <zash@zash.se>
parents:
4229
diff
changeset
|
28 sed "1s/\blua\b/$(RUNWITH)/; \ |
cb6f0afd8468
tools/migration/Makefile: Apply Lua runtime override (see 53f741a5a73a)
Kim Alvefur <zash@zash.se>
parents:
4229
diff
changeset
|
29 s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \ |
10725
ddc2607ec89e
migrator: Inject data- and plugin paths during build
Kim Alvefur <zash@zash.se>
parents:
10003
diff
changeset
|
30 s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|; \ |
ddc2607ec89e
migrator: Inject data- and plugin paths during build
Kim Alvefur <zash@zash.se>
parents:
10003
diff
changeset
|
31 s|^CFG_DATADIR=.*;$$|CFG_DATADIR='$(INSTALLEDDATA)';|; \ |
ddc2607ec89e
migrator: Inject data- and plugin paths during build
Kim Alvefur <zash@zash.se>
parents:
10003
diff
changeset
|
32 s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(INSTALLEDMODULES)/';|;" \ |
4229
f15b4e9ba688
tools/migration: Rename main.lua -> prosody-migrator.lua and update the Makefile
Matthew Wild <mwild1@gmail.com>
parents:
4224
diff
changeset
|
33 < prosody-migrator.lua > prosody-migrator.install |
4216
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
34 |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
35 migrator.cfg.lua.install: migrator.cfg.lua |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
36 sed "s|^local data_path = .*;$$|local data_path = '$(INSTALLEDDATA)';|;" \ |
ff80a8471e86
tools/migration/*: Numerous changes and restructuring, and the addition of a Makefile
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
37 < migrator.cfg.lua > migrator.cfg.lua.install |