Skip to content

Commit

Permalink
Check schema correctness also with libxml2/xmllint
Browse files Browse the repository at this point in the history
Why both? The stars show their strong points:

|                            | jing      | xmllint         |
|----------------------------+-----------+-----------------|
| runtime dependencies       | big (JRE) | * small (glibc) |
| detects invalid documents  | yes       | yes             |
| explains what is wrong     |           |                 |
| ... with invalid documents | * yes     | no              |
  • Loading branch information
mvidner committed May 26, 2020
1 parent 7c3a73c commit 71514bf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM registry.opensuse.org/yast/head/containers/yast-ruby:latest
RUN zypper --gpg-auto-import-keys --non-interactive in --no-recommends \
autoyast2 \
libxml2-tools \
jing \
trang \
yast2 \
Expand Down
1 change: 1 addition & 0 deletions package/yast2-schema.changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Thu May 7 16:13:37 UTC 2020 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Allow optional types for string and map objects (bsc#1170886).
- Check schema correctness with jing and xmllint (bsc#1172131).
- 4.3.0

-------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions package/yast2-schema.spec
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Url: https://github.com/yast/yast-schema

# Dependencies needed to build the package
BuildRequires: jing
BuildRequires: libxml2-tools
BuildRequires: trang yast2-devtools

# All packages providing RNG files for AutoYaST
Expand Down
1 change: 1 addition & 0 deletions src/rng/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ clean-local:
# Test with a minimal valid profile that the schema is correct
check-local:
echo '<profile xmlns="http://www.suse.com/1.0/yast2ns"/>' | jing profile.rng /dev/stdin
echo '<profile xmlns="http://www.suse.com/1.0/yast2ns"/>' | xmllint --noout --relaxng profile.rng /dev/stdin

install-data-local:
$(INSTALL) -d $(DESTDIR)$(schemadir)/autoyast/rng
Expand Down

0 comments on commit 71514bf

Please sign in to comment.