Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1226407
| From | gregor herrmann <gregoa@debian.org> |
|---|---|
| Newsgroups | linux.debian.bugs.dist |
| Subject | Bug#1091856: libjson-validator-perl: Requires cache symlink for v3.0 schema |
| Date | 2025-01-01 18:10 +0100 |
| Message-ID | <K0aoh-4NFX-7@gated-at.bofh.it> (permalink) |
| References | <K08Pv-4Mwt-3@gated-at.bofh.it> <K08Pv-4Mwt-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Control: tag -1 + confirmed
On Wed, 01 Jan 2025 17:23:13 +0200, Wouter Verhelst wrote:
> Running 'strace -ff -o foo <application>; grep Validator.cache foo*' outputs:
>
> foo.146500:newfstatat(AT_FDCWD, "/usr/share/perl5/JSON/Validator/cache/a516498b60c53096b2ce2cd83ebe0abc", 0x56545a8b14b8, 0) = -1 ENOENT (No such file or directory)
>
> Creating a symlink with that name to
> '../../../../openapi-specificaction/schemas/v3.0/schema.yaml' resolves the
> issue.
>
> Presumably a symlink for v1.2 and v3.1 should be created too, but I
> didn't immediately find out how the hash is computed, so I don't know
> which ones to use.
Hm, indeed, there's only a symlink for v2.0.
The symlinks should be created in d/rules:
execute_after_dh_install:
find /usr/share/openapi-specification/schemas -name schema.json \
| while read SCHEMA; \
do jq '.["id"]' $${SCHEMA} | tr -d '"' \
| perl -pe 's/#?\n$$//' | md5sum | cut -d ' ' -f 1 \
| xargs -i ln -s $${SCHEMA} debian/libjson-validator-perl/usr/share/perl5/JSON/Validator/cache/{}; \
In pratice this does not end so well because:
# find /usr/share/openapi-specification/schemas -name schema.json
/usr/share/openapi-specification/schemas/v2.0/schema.json
v3.0 and v3.1 have a schema.yml:
# find /usr/share/openapi-specification/ -name schema.yaml
/usr/share/openapi-specification/schemas/v3.1/schema.yaml
/usr/share/openapi-specification/schemas/v3.0/schema.yaml
For v1.2 probably
/usr/share/openapi-specification/schemas/v1.2/apiDeclaration.json
is the closest thing …
Cc'ing Andrius, who also maintains the openapi-specification package.
Cheers,
gregor
--
.''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org
: :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06
`. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
`-
Back to linux.debian.bugs.dist | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Bug#1091856: libjson-validator-perl: Requires cache symlink for v3.0 schema Wouter Verhelst <wouter@debian.org> - 2025-01-01 16:30 +0100
Bug#1091856: libjson-validator-perl: Requires cache symlink for v3.0 schema gregor herrmann <gregoa@debian.org> - 2025-01-01 18:10 +0100
Bug#1091856: libjson-validator-perl: Requires cache symlink for v3.0 schema Karen Etheridge <karen@froods.org> - 2025-01-05 21:00 +0100
Bug#1091856: libjson-validator-perl: Requires cache symlink for v3.0 schema gregor herrmann <gregoa@debian.org> - 2025-01-05 23:30 +0100
csiph-web