diff -up firewalld-0.3.9/config/Makefile.am.RHBZ#994479 firewalld-0.3.9/config/Makefile.am --- firewalld-0.3.9/config/Makefile.am.RHBZ#994479 2013-12-03 14:57:26.000000000 +0100 +++ firewalld-0.3.9/config/Makefile.am 2015-07-06 22:52:11.796675172 +0200 @@ -21,6 +21,10 @@ gsettings_in_file = org.fedoraproject.Fi org.fedoraproject.FirewallConfig.gschema.xml.in gsettings_SCHEMAS = $(gsettings_in_file:.xml.in=.xml) +xmlschemadir = $(prefixlibdir)/xmlschema +dist_xmlschema_DATA = xmlschema/icmptype.xsd xmlschema/service.xsd xmlschema/zone.xsd +dist_xmlschema_SCRIPTS = xmlschema/check.sh + BUILT_SOURCES = \ $(desktop_DATA) \ $(applet_desktop_DATA) \ diff -up firewalld-0.3.9/config/xmlschema/check.sh.RHBZ#994479 firewalld-0.3.9/config/xmlschema/check.sh --- firewalld-0.3.9/config/xmlschema/check.sh.RHBZ#994479 2015-07-06 22:53:44.286881231 +0200 +++ firewalld-0.3.9/config/xmlschema/check.sh 2015-07-06 19:17:33.315427513 +0200 @@ -0,0 +1,64 @@ +#!/bin/bash + +# requires libxml2 packages for xmllint +XMLLINT=/usr/bin/xmllint +PACKAGE=libxml2 + +prog=$(basename $0) +BASEDIR=$(realpath $(dirname $0)) + +checkdir=$(pwd) +while getopts "d:h" arg; do + case $arg in + d) + checkdir=$OPTARG + ;; + h) + cat < Check files in this directory + +EOF + exit 0 + ;; + \?) + echo "Invalid option: -$OPTARG" >&2 + exit 1 + ;; + :) + echo "Option -$OPTARG requires an argument." >&2 + exit 1 + ;; + esac +done + +if [ ! -f "$XMLLINT" ]; then + echo "$XMLLINT is not installed, please install the $PACKAGE package." + exit -1 +fi + +if [ ! -d "$checkdir" ]; then + echo "Directory '${checkdir}' does not exist" + exit -2 +fi + +for keyword in zone service icmptype; do + if [ -d "${checkdir}/${keyword}s" ]; then + echo "Checking ${keyword}s" + cd "${checkdir}/${keyword}s" + ls -f *.xml 2>/dev/null | while read -r file; do + echo -n " " + $XMLLINT --noout --schema "$BASEDIR"/${keyword}.xsd "${file}" + done + else + echo "Directory '${checkdir}/${keyword}s' does not exist" + fi +done diff -up firewalld-0.3.9/config/xmlschema/icmptype.xsd.RHBZ#994479 firewalld-0.3.9/config/xmlschema/icmptype.xsd --- firewalld-0.3.9/config/xmlschema/icmptype.xsd.RHBZ#994479 2015-07-06 22:53:52.718900017 +0200 +++ firewalld-0.3.9/config/xmlschema/icmptype.xsd 2015-07-06 19:17:33.319427521 +0200 @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -up firewalld-0.3.9/config/xmlschema/service.xsd.RHBZ#994479 firewalld-0.3.9/config/xmlschema/service.xsd --- firewalld-0.3.9/config/xmlschema/service.xsd.RHBZ#994479 2015-07-06 22:53:58.213912258 +0200 +++ firewalld-0.3.9/config/xmlschema/service.xsd 2015-07-06 19:17:33.319427521 +0200 @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -up firewalld-0.3.9/config/xmlschema/zone.xsd.RHBZ#994479 firewalld-0.3.9/config/xmlschema/zone.xsd --- firewalld-0.3.9/config/xmlschema/zone.xsd.RHBZ#994479 2015-07-06 22:54:05.453928390 +0200 +++ firewalld-0.3.9/config/xmlschema/zone.xsd 2015-07-06 19:17:33.320427524 +0200 @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +