-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add XSD schema to support info plugin's GH repo #1
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
<?xml version="1.0"?> | ||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
elementFormDefault="qualified" | ||
attributeFormDefault="unqualified"> | ||
|
||
<xs:annotation> | ||
<xs:appinfo>Support Info XML</xs:appinfo> | ||
<xs:documentation xml:lang="en"> | ||
This schema defines a document that describes the support statements | ||
for RPM packages in a YUM repository. This allows a user to map what | ||
packages they have installed to a support statement both as of now, | ||
and into the future. It also allows an OS vendor to deprecate parts | ||
of the Operating System before other parts in order to provide extended | ||
support, and for that to be clear and machine readable. | ||
</xs:documentation> | ||
</xs:annotation> | ||
|
||
<xs:element name="package_support" type="PackageSupport"> | ||
<xs:annotation> | ||
<xs:documentation xml:lang="en"> | ||
The top level package_support element contains support statements, notes on | ||
those statements, along with a single top level attribute on when the package | ||
support statement is current as of. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:element> | ||
|
||
<xs:complexType name="PackageSupport"> | ||
<xs:all> | ||
<xs:element name="statements" type="Statements" minOccurs="1" maxOccurs="1" /> | ||
<xs:element name="notes" type="Notes" minOccurs="0" maxOccurs="1" /> | ||
</xs:all> | ||
<xs:attribute name="current_as" type="xs:dateTime" /> | ||
</xs:complexType> | ||
|
||
<xs:complexType name="Statements"> | ||
<xs:sequence> | ||
<xs:element name="statement" type="Statement" minOccurs="1" maxOccurs="unbounded"> | ||
<xs:annotation> | ||
<xs:documentation xml:lang="en"> | ||
The main part of this document is a series of statements about particular | ||
packages. Optionally, these statements have start and end dates. These dates | ||
can be used to transition packages through different support phases, and out | ||
to a final unsupported state. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
|
||
<xs:complexType name="Statement"> | ||
<xs:sequence> | ||
<xs:element name="summary" type="xs:string" minOccurs="1"/> | ||
<xs:element name="text" type="xs:string" minOccurs="1"/> | ||
<xs:element name="link" type="xs:string" minOccurs="1" maxOccurs="1"/> | ||
<xs:element name="packages" type="Packages" minOccurs="1" maxOccurs="1"/> | ||
</xs:sequence> | ||
<xs:attribute name="id" type="xs:string" use="required"> | ||
<xs:annotation> | ||
<xs:documentation xml:lang="en"> | ||
A unique (for the document) identifier. Must conform with requirements for | ||
a html anchor name. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
<xs:attribute name="start_date" type="xs:date"/> | ||
<xs:attribute name="end_date" type="xs:date"/> | ||
<xs:attribute name="marker" type="xs:string"> | ||
<xs:annotation> | ||
<xs:documentation xml:lang="en"> | ||
The marker indicates what kind of statement this is, and thus can be used | ||
by compliance software to join the set of installed packages with a policy | ||
as to what's allowed. | ||
A value of 'unsupported' means that this statement is about the non-support | ||
of software. A value of 'supported' means that it's a positive affirmation | ||
of support. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
</xs:complexType> | ||
|
||
<xs:complexType name="Notes"> | ||
<xs:sequence> | ||
<xs:element name="note" type="Note" minOccurs="0" maxOccurs="unbounded"> | ||
<xs:annotation> | ||
<xs:documentation xml:lang="en"> | ||
Matching a package to a support statement can come with an additional note | ||
as to why that particular package is there. For example, as part of a deprecation | ||
campaign for a custom OS inside a company, one could deprecate all packages that | ||
aren't installed on any host, and indicate that in a note. A note is designed | ||
to be useful to someone wondering why a package is in a particular category. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
|
||
<xs:complexType name="Packages"> | ||
<xs:sequence> | ||
<xs:element name="package" type="Package" minOccurs="1" maxOccurs="unbounded"/> | ||
</xs:sequence> | ||
</xs:complexType> | ||
|
||
<xs:complexType name="Note"> | ||
<xs:simpleContent> | ||
<xs:extension base="xs:string"> | ||
<xs:attribute name="id" type="xs:string"/> | ||
</xs:extension> | ||
</xs:simpleContent> | ||
</xs:complexType> | ||
|
||
|
||
<xs:complexType name="Package"> | ||
<xs:sequence> | ||
<xs:element name="max_version" type="Version" minOccurs="0" maxOccurs="1"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to have it documented if this is inclusive or not. I would suggest we say that it is inclusive. that is, if we have |
||
<xs:element name="min_version" type="Version" minOccurs="0" maxOccurs="1"/> | ||
</xs:sequence> | ||
<xs:attribute name="name" type="xs:string"/> | ||
<xs:attribute name="note" type="xs:string"/> | ||
</xs:complexType> | ||
|
||
<xs:complexType name="Version"> | ||
<xs:attribute name="arch" type="xs:string"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the intent here that we specify all arches that we have built, and thus the code doing the comparison needs to do this comparison? |
||
<xs:attribute name="epoch" type="xs:string"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be optional, and documented as such, defaulting to zero. |
||
<xs:attribute name="release" type="xs:string"/> | ||
<xs:attribute name="version" type="xs:string"/> | ||
</xs:complexType> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should very much have tests and examples here. |
||
|
||
</xs:schema> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest we just have something shorter here, as we don't need to give the example of the makefile
Invoking it as part of building the package would only be needed if doing the generation here, which would likely be a different
generate.py
script rather than the main package.