From 75a25143073a33bcdb60709ae73c521a3755d248 Mon Sep 17 00:00:00 2001 From: David Rothenberg Date: Mon, 30 Mar 2015 15:32:37 -0400 Subject: [PATCH] Additional Core fixes from feedback Change to NotesType fix that removes backwards incompatibility for 5.10.1 or 5.11.0 content using substitution groups. Introduced needed debian_evr_string simple datatype to distinguish between rpm and dpkg comparisons. --- schemas/oval-common-schema.xsd | 12 ++- schemas/oval-definitions-schema.xsd | 83 +++++++++++++++---- .../oval-system-characteristics-schema.xsd | 36 +++++++- 3 files changed, 115 insertions(+), 16 deletions(-) diff --git a/schemas/oval-common-schema.xsd b/schemas/oval-common-schema.xsd index 2d19dd5..ba59501 100644 --- a/schemas/oval-common-schema.xsd +++ b/schemas/oval-common-schema.xsd @@ -25,6 +25,11 @@ The element_mapping element is used in documenting which tests, objects, states, and system characteristic items are associated with each other. It provides a way to explicitly and programatically associate the test, object, state, and item definitions. + + + Element for containing notes; can be replaced using a substitution group. + + @@ -177,7 +182,7 @@ The NotesType complex type is a container for one or more note child elements. Each note contains some information about the definition or tests that it references. A note may record an unresolved question about the definition or test or present the reason as to why a particular approach was taken. - + @@ -337,6 +342,11 @@ The evr_string datatype represents the epoch, version, and release fields as a single version string. It has the form "EPOCH:VERSION-RELEASE". Comparisons involving this datatype should follow the algorithm of librpm's rpmvercmp() function. Expected operations within OVAL for evr_string values are 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'. + + + The debian_evr_string datatype represents the epoch, upstream_version, and debian_revision fields, for a Debian package, as a single version string. It has the form "EPOCH:UPSTREAM_VERSION-DEBIAN_REVISION". Comparisons involving this datatype should follow the algorithm outlined in Chapter 5 of the "Debian Policy Manual" (https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version). An implementation of this is the cmpversions() function in dpkg's enquiry.c. Expected operations within OVAL for debian_evr_string values are 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'. + + The fileset_revision datatype represents the version string related to filesets in HP-UX. An example would be 'A.03.61.00'. For more information, see the HP-UX "Software Distributor Administration Guide" (http://h20000.www2.hp.com/bc/docs/support/SupportManual/c01919399/c01919399.pdf). Expected operations within OVAL for fileset_version values are 'equals', 'not equal', 'greater than', 'greater than or equal', 'less than', and 'less than or equal'. diff --git a/schemas/oval-definitions-schema.xsd b/schemas/oval-definitions-schema.xsd index e6d6764..ded5984 100644 --- a/schemas/oval-definitions-schema.xsd +++ b/schemas/oval-definitions-schema.xsd @@ -152,6 +152,32 @@ + + + The notes element is a container for one or more note child elements. It exists for backwards-compatibility purposes, for the pre-5.11.0 oval-def:NotesType, which has been replaced by the oval:notes element in 5.11.1. + + + 5.11.1 + Replaced by the oval:notes element. + This object has been deprecated and may be removed in a future version of the language. + + + + DEPRECATED ELEMENT: parent ID: + + + + + + + + + + + + + + @@ -199,7 +225,7 @@ - + @@ -263,14 +289,6 @@ - - - The NotesType complex type is a container for one or more note child elements. Each note contains some information about the definition or tests that it references. A note may record an unresolved question about the definition or test or present the reason as to why a particular approach was taken. - - - - - The CriteriaType complex type describes a container for a set of sub criteria, criteria, criterion, or extend_definition elements allowing complex logical trees to be constructed. Each referenced test is represented by a criterion element. Please refer to the description of the CriterionType for more information about and individual criterion element. The optional extend_definition element allows existing definitions to be included in the criteria. Refer to the description of the ExtendDefinitionType for more information. @@ -343,7 +361,7 @@ - + @@ -390,7 +408,7 @@ - + @@ -467,7 +485,7 @@ - + @@ -512,7 +530,7 @@ - + @@ -1163,6 +1181,9 @@ - The use of '' for the operation attribute of the entity is not valid given a datatype of evr_string. + + - The use of '' for the operation attribute of the entity is not valid given a datatype of debian_evr_string. + - The use of '' for the operation attribute of the entity is not valid given a datatype of fileset_revision. @@ -1570,7 +1591,7 @@ - The EntityStateEVRStringType type is extended by the entities of an individual OVAL State. This type provides uniformity to each state entity by including the attributes found in the EntityStateSimpleBaseType. This type represents the epoch, version, and release fields as a single version string. It has the form "EPOCH:VERSION-RELEASE". Note that a null epoch (or '(none)' as returned by rpm) is equivalent to '0' and would hence have the form 0:VERSION-RELEASE. Comparisons involving this datatype should follow the algorithm of librpm's rpmvercmp() function. + The EntityStateEVRStringType type is extended by the entities of an individual OVAL State. This type provides uniformity to each state entity by including the attributes found in the EntityStateSimpleBaseType. This type represents the epoch, version, and release fields, for an RPM package, as a single version string. It has the form "EPOCH:VERSION-RELEASE". Note that a null epoch (or '(none)' as returned by rpm) is equivalent to '0' and would hence have the form 0:VERSION-RELEASE. Comparisons involving this datatype should follow the algorithm of librpm's rpmvercmp() function. @@ -1582,6 +1603,40 @@ + + + The EntityStateDebianEVRStringType type is extended by the entities of an individual OVAL State. This type provides uniformity to each state entity by including the attributes found in the EntityStateSimpleBaseType. This type represents the epoch, upstream_version, and debian_revision fields, for a Debian package, as a single version string. It has the form "EPOCH:UPSTREAM_VERSION-DEBIAN_REVISION". Note that a null epoch (or '(none)' as returned by dpkg) is equivalent to '0' and would hence have the form 0:UPSTREAM_VERSION-DEBIAN_REVISION. Comparisons involving this datatype should follow the algorithm outlined in Chapter 5 of the "Debian Policy Manual" (https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version). An implementation of this is the cmpversions() function in dpkg's enquiry.c. + + + + + + + + + + + + + + The EntityStateDebianRPMEVRStringType type is extended by the entities of an individual OVAL State. This type provides uniformity to each object entity by including the attributes found in the EntityStateSimpleBaseType. This specific type describes the EVR string value for any Debian or RPM package. + + + + + + + + + + + + + + + + + The EntityStateVersionType type is extended by the entities of an individual OVAL State. This type provides uniformity to each state entity by including the attributes found in the EntityStateSimpleBaseType. This specific type describes simple version data. diff --git a/schemas/oval-system-characteristics-schema.xsd b/schemas/oval-system-characteristics-schema.xsd index da63cf7..3a61890 100644 --- a/schemas/oval-system-characteristics-schema.xsd +++ b/schemas/oval-system-characteristics-schema.xsd @@ -606,7 +606,7 @@ The EntityItemEVRStringType type is extended by the entities of an individual item. This type provides uniformity to each entity by including the attributes found in the EntityItemSimpleBaseType. - This type represents the epoch, version, and release fields as a single version string. It has the form "EPOCH:VERSION-RELEASE". Note that a null epoch (or '(none)' as returned by rpm) is equivalent to '0' and would hence have the form 0:VERSION-RELEASE. Comparisons involving this datatype should follow the algorithm of librpm's rpmvercmp() function. + This type represents the epoch, version, and release fields, for an RPM package, as a single version string. It has the form "EPOCH:VERSION-RELEASE". Note that a null epoch (or '(none)' as returned by rpm) is equivalent to '0' and would hence have the form 0:VERSION-RELEASE. Comparisons involving this datatype should follow the algorithm of librpm's rpmvercmp() function. @@ -618,4 +618,38 @@ + + + The EntityItemDebianEVRStringType type is extended by the entities of an individual item. This type provides uniformity to each entity by including the attributes found in the EntityItemSimpleBaseType. This type represents the epoch, upstream_version, and debian_revision fields, for a Debian package, as a single version string. It has the form "EPOCH:UPSTREAM_VERSION-DEBIAN_REVISION". Note that a null epoch (or '(none)' as returned by dpkg) is equivalent to '0' and would hence have the form 0:UPSTREAM_VERSION-DEBIAN_REVISION. Comparisons involving this datatype should follow the algorithm outlined in Chapter 5 of the "Debian Policy Manual" (https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version). An implementation of this is the cmpversions() function in dpkg's enquiry.c. + + + + + + + + + + + + + + The EntityItemDebianRPMEVRStringType type is extended by the entities of an individual item. This type provides uniformity to each entity by including the attributes found in the EntityItemSimpleBaseType. This specific type describes the EVR string value for any Debian or RPM package. + + + + + + + + + + + + + + + + +