aif-ng/aif.xsd
2019-10-28 03:44:56 -04:00

722 lines
43 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://aif-ng.io/"
xmlns="http://aif-ng.io/"
xmlns:aif="http://aif-ng.io/"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:simpleType name="t_diskdev">
<xs:restriction base="xs:string">
<xs:pattern value="/dev/([A-Za-z0-9_]+/)?[A-Za-z0-9_]+[0-9]?"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_diskfmt">
<xs:restriction base="xs:token">
<xs:enumeration value="gpt"/>
<xs:enumeration value="bios"/>
<xs:enumeration value="dos"/>
<xs:enumeration value="msdos"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_disksize">
<xs:restriction base="xs:string">
<xs:pattern value="[-|+]?\s*([0-9]+)\s*(%|B|kB|MB|GB|TB|KiB|MiB|GiB|TiB|)\s*"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_fstype">
<!-- ', '.join(sorted(list(dict(vars(parted.filesystem))['fileSystemType'].keys()))) -->
<xs:restriction base="xs:token">
<xs:enumeration value="affs0"/>
<xs:enumeration value="affs1"/>
<xs:enumeration value="affs2"/>
<xs:enumeration value="affs3"/>
<xs:enumeration value="affs4"/>
<xs:enumeration value="affs5"/>
<xs:enumeration value="affs6"/>
<xs:enumeration value="affs7"/>
<xs:enumeration value="amufs"/>
<xs:enumeration value="amufs0"/>
<xs:enumeration value="amufs1"/>
<xs:enumeration value="amufs2"/>
<xs:enumeration value="amufs3"/>
<xs:enumeration value="amufs4"/>
<xs:enumeration value="amufs5"/>
<xs:enumeration value="apfs1"/>
<xs:enumeration value="apfs2"/>
<xs:enumeration value="asfs"/>
<xs:enumeration value="btrfs"/>
<xs:enumeration value="ext2"/>
<xs:enumeration value="ext3"/>
<xs:enumeration value="ext4"/>
<xs:enumeration value="fat16"/>
<xs:enumeration value="fat32"/>
<xs:enumeration value="hfs"/>
<xs:enumeration value="hfs+"/>
<xs:enumeration value="hfsx"/>
<xs:enumeration value="hp-ufs"/>
<xs:enumeration value="jfs"/>
<xs:enumeration value="linux-swap(v0)"/>
<xs:enumeration value="linux-swap(v1)"/>
<xs:enumeration value="nilfs2"/>
<xs:enumeration value="ntfs"/>
<xs:enumeration value="reiserfs"/>
<xs:enumeration value="sun-ufs"/>
<xs:enumeration value="swsusp"/>
<xs:enumeration value="udf"/>
<xs:enumeration value="xfs"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_iface">
<xs:restriction base="xs:token">
<!-- https://github.com/systemd/systemd/blob/master/src/udev/udev-builtin-net_id.c.
I have no idea if this will work. TODO: simplify, validate in-code. -->
<xs:pattern
value="(auto|((en|sl|wl|ww)(b[0-9]+|c[a-z0-9]|o[0-9]+(n.*(d.*)?)?|s[0-9]+(f.*)?([nd].*)?|x([A-Fa-f0-9]:){5}[A-Fa-f0-9]|(P.*)?p[0-9]+s[0-9]+(([fnd].*)|u.*)?)))"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_address_ip4">
<xs:restriction base="xs:string">
<!-- This is a REALLY LAZY regex. Matching IPv4 in regex is ugly as heck, so we do that in-code.
This is just a gatekeeper. -->
<xs:pattern value="(dhcp|[0-9.]{7,15}/[0-9]{1,2})"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_address_ip6">
<xs:restriction base="xs:string">
<!-- This is a REALLY LAZY regex. Matching IPv6 in regex is ugly as heck, so we do that in-code.
This is just a gatekeeper. -->
<xs:pattern value="(dhcp6|slaac|([A-Za-z0-9:]+)/[0-9]+)"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_resolver_addr">
<xs:restriction base="xs:string">
<!-- This is a REALLY LAZY regex. Matching IPv4/IPv6 in regex is ugly as heck, so we do that in-code.
This is just a gatekeeper. -->
<xs:pattern value="([0-9.]{7,15}|[A-Za-z0-9:]+)"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_netproto">
<xs:restriction base="xs:token">
<xs:pattern value="(both|ipv4|ipv6)"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_netprov">
<xs:restriction base="xs:token">
<xs:enumeration value="netctl"/>
<xs:enumeration value="nm"/>
<xs:enumeration value="systemd"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_scripturi">
<xs:restriction base="xs:anyURI">
<xs:pattern value="(https?|ftps?|file)://.+"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_posixUserGroup">
<!-- https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_437
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_282
https://unix.stackexchange.com/a/435120/284004 -->
<xs:restriction base="xs:token">
<xs:pattern value="[a-z_]([a-z0-9_-]{0,31}|[a-z0-9_-]{0,30}$)"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_shadowhash">
<!-- http://man7.org/linux/man-pages/man3/crypt.3.html#NOTES -->
<xs:restriction base="xs:token">
<xs:pattern value="(\$1)?(\$[a-zA-Z0-9./]{1,16})\$[a-zA-Z0-9./]{22}"/><!-- md5 -->
<xs:pattern value="(\$2[abxy]?)?(\$[0-9]+)\$[a-zA-Z0-9./]{53}"/><!-- Blowfish -->
<xs:pattern value="(\$5)?(\$[a-zA-Z0-9./]{1,16})\$[a-zA-Z0-9./]{43}"/><!-- sha256 -->
<xs:pattern value="(\$6)?(\$[a-zA-Z0-9./]{1,16})\$[a-zA-Z0-9./]{86}"/><!-- sha512 -->
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_pacuri">
<!-- xs:anyURI is too permissive. -->
<!-- <xs:restriction base="xs:anyURI"> -->
<xs:restriction base="xs:token">
<xs:pattern value="(file|https?)://.+"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_bootloaders">
<!-- TODO: expand?
https://wiki.archlinux.org/index.php/Category:Boot_loaders
https://wiki.archlinux.org/index.php/Arch_boot_process#Boot_loader -->
<xs:restriction base="xs:token">
<xs:enumeration value="grub"/>
<xs:enumeration value="systemd"/>
<xs:enumeration value="syslinux"/>
<xs:enumeration value="lilo"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_authselect">
<xs:restriction base="xs:token">
<xs:pattern value="(basic|digest|none)"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="t_cmdopts">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" use="required" type="xs:token"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="t_filepath">
<xs:restriction base="xs:string">
<xs:pattern value="((/[^/]+)+/?|swap)"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_raid_meta">
<xs:restriction base="xs:token">
<xs:enumeration value="0"/><!-- Same as 0.90 -->
<xs:enumeration value="0.90"/><!-- Same as 0 -->
<xs:enumeration value="1"/><!-- Same as 1.2, default -->
<xs:enumeration value="1.0"/>
<xs:enumeration value="1.1"/>
<xs:enumeration value="1.2"/><!-- Same as 1, default -->
<xs:enumeration value="default"/><!-- Same as 1, 1.2 -->
<xs:enumeration value="ddf"/>
<xs:enumeration value="imsm"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_raid_levels">
<xs:restriction base="xs:integer">
<xs:enumeration value="0"/>
<xs:enumeration value="1"/>
<xs:enumeration value="4"/>
<xs:enumeration value="5"/>
<xs:enumeration value="6"/>
<xs:enumeration value="10"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="t_nonempty">
<xs:restriction base="xs:token">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="t_nixpass">
<xs:choice minOccurs="1" maxOccurs="1">
<xs:element name="passwordPlain" type="t_nonempty"/>
<xs:element name="passwordHash">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="aif:t_shadowhash">
<xs:attribute name="hashType" use="optional" default="(detect)">
<xs:simpleType>
<xs:restriction base="aif:t_nonempty">
<xs:enumeration value="md5"/>
<xs:enumeration value="bcrypt"/><!-- "blowfish" in crypt(3) -->
<xs:enumeration value="sha256"/>
<xs:enumeration value="sha512"/>
<xs:enumeration value="(detect)"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:complexType name="t_provscript">
<xs:simpleContent>
<xs:extension base="aif:t_scripturi">
<xs:attribute name="user" type="aif:t_nonempty" use="optional"/>
<xs:attribute name="password" type="aif:t_nonempty" use="optional"/>
<xs:attribute name="realm" type="aif:t_nonempty" use="optional"/>
<xs:attribute name="authtype" type="aif:t_authselect" use="optional" default="none"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<!-- ROOT -->
<xs:element name="aif">
<xs:complexType>
<xs:all>
<!-- BEGIN STORAGE -->
<xs:element name="storage" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:all>
<!-- BEGIN BLOCKDEVICES -->
<xs:element name="blockDevices" minOccurs="1">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="disk" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="part" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="id" type="aif:t_nonempty"
use="required"/>
<xs:attribute name="name" type="aif:t_nonempty"
use="optional"/>
<xs:attribute name="label" type="aif:t_nonempty"
use="optional"/>
<xs:attribute name="start" type="aif:t_disksize"
use="required"/>
<xs:attribute name="stop" type="aif:t_disksize"
use="required"/>
<xs:attribute name="fsType" type="aif:t_fstype"
use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="device" type="aif:t_diskdev" use="required"/>
<xs:attribute name="diskFormat" type="aif:t_diskfmt" use="required"/>
</xs:complexType>
<xs:unique name="uniq_diskdev">
<xs:selector xpath="aif:disk"/>
<xs:field xpath="@device"/>
</xs:unique>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- END DISK -->
<!-- BEGIN FILESYSTEMS -->
<xs:element name="fileSystems" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="fs" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="opt" minOccurs="0" maxOccurs="unbounded"
type="aif:t_cmdopts"/>
</xs:sequence>
<xs:attribute name="source" type="aif:t_nonempty" use="required"/>
<!-- We validate this in-code because there's way too many and
it's way too variable per-host. -->
<xs:attribute name="type" type="aif:t_nonempty" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- END FILESYSTEMS -->
<!-- BEGIN LUKS -->
<xs:element name="luks" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="luksDev" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="secrets" minOccurs="1"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="passphrase" minOccurs="0"
maxOccurs="unbounded"
type="aif:t_nonempty"/>
<xs:element name="keyFile" minOccurs="0"
maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="aif:t_filepath">
<xs:attribute name="size"
type="xs:positiveInteger"
use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="aif:t_nonempty" use="required"/>
<xs:attribute name="name" type="aif:t_nonempty" use="required"/>
<xs:attribute name="source" type="aif:t_nonempty" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- END LUKS -->
<!-- BEGIN LVM -->
<xs:element name="lvm" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="lvmGroup" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="lvmLogical" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="id" type="aif:t_nonempty"
use="required"/>
<xs:attribute name="name" type="aif:t_nonempty"
use="required"/>
<xs:attribute name="source" type="aif:t_nonempty"
use="required"/>
</xs:complexType>
<xs:unique name="uniq_lv">
<xs:selector xpath="aif:lvmLogical"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="aif:t_nonempty" use="required"/>
<xs:attribute name="name" type="aif:t_nonempty" use="required"/>
</xs:complexType>
<xs:unique name="uniq_vg">
<xs:selector xpath="aif:lvmGroup"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- END LVM -->
<!-- BEGIN MDADM -->
<xs:element name="mdadm" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="array" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="member" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="source" type="aif:t_nonempty"
use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" use="required" type="aif:t_nonempty"/>
<xs:attribute name="name" use="required" type="aif:t_nonempty"/>
<xs:attribute name="meta" use="optional" default="1.2"
type="aif:t_raid_meta"/>
<xs:attribute name="level" use="required" type="aif:t_raid_levels"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- END MDADM -->
<!-- BEGIN MOUNTPOINTS -->
<xs:element name="mountPoints" minOccurs="1">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="mount" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="opt" minOccurs="1" maxOccurs="unbounded"
type="aif:t_cmdopts"/>
</xs:sequence>
<xs:attribute name="source" type="aif:t_nonempty" use="required"/>
<xs:attribute name="target" type="aif:t_filepath" use="required"/>
</xs:complexType>
<xs:unique name="uniq_mnts">
<xs:selector xpath="aif:mount"/>
<xs:field xpath="@source"/>
<xs:field xpath="@target"/>
</xs:unique>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- END MOUNTPOINTS -->
</xs:all>
</xs:complexType>
</xs:element>
<!-- END STORAGE -->
<!-- BEGIN NETWORK -->
<xs:element name="network" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="iface" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:all>
<xs:element name="addresses" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="ipv4">
<xs:complexType>
<xs:sequence>
<xs:element name="address" type="aif:t_address_ip4"
minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="gateway" type="aif:t_address_ip4"
use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="ipv6">
<xs:complexType>
<xs:sequence>
<xs:element name="address" type="aif:t_address_ip6"
minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="gateway" type="aif:t_address_ip6"
use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="uniq_ip4">
<xs:selector xpath="ipv4"/>
<xs:field xpath="address"/>
</xs:unique>
<xs:unique name="uniq_ip6">
<xs:selector xpath="ipv6"/>
<xs:field xpath="address"/>
</xs:unique>
</xs:element>
<xs:element name="resolvers" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="resolver" minOccurs="1" maxOccurs="unbounded"
type="aif:t_resolver_addr"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="device" type="aif:t_iface" use="required"/>
</xs:complexType>
<xs:unique name="uniq_resolver">
<xs:selector xpath="resolvers"/>
<xs:field xpath="resolver"/>
</xs:unique>
</xs:element>
</xs:sequence>
<!-- It's nearly impossible to validate FQDNs/hostnames in XSD, so we do it in-code. -->
<xs:attribute name="hostname" type="aif:t_nonempty" use="required"/>
<xs:attribute name="provider" type="aif:t_netprov" use="optional" default="netctl"/>
</xs:complexType>
<xs:unique name="uniq_iface">
<xs:selector xpath="aif:iface"/>
<xs:field xpath="@device"/>
</xs:unique>
</xs:element>
<!-- END NETWORK -->
<!-- BEGIN SYSTEM -->
<xs:element name="system" maxOccurs="1" minOccurs="1">
<xs:complexType>
<xs:all>
<xs:element name="rootPassword" minOccurs="1" maxOccurs="1"
type="aif:t_nixpass"/>
<xs:element name="locales" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="locale" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:token">
<xs:attribute name="name" type="aif:t_nonempty" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="users" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="user" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="password" minOccurs="0" maxOccurs="1"
type="aif:t_nixpass"/>
<xs:element name="xGroup" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" type="aif:t_posixUserGroup"
use="required"/>
<xs:attribute name="create" type="xs:boolean" use="optional"
default="0"/>
<xs:attribute name="gid" type="xs:positiveInteger"/>
</xs:complexType>
<xs:unique name="uniq_grp">
<xs:selector xpath="aif:xGroup"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="aif:t_posixUserGroup" use="required"/>
<xs:attribute name="home" type="aif:t_filepath" use="optional"/>
<xs:attribute name="uid" type="xs:positiveInteger" use="optional"/>
<xs:attribute name="group" type="aif:t_posixUserGroup" use="optional"/>
<xs:attribute name="gid" type="xs:positiveInteger" use="optional"/>
<xs:attribute name="comment" type="aif:t_nonempty" use="optional"/>
<xs:attribute name="sudo" type="xs:boolean" use="optional" default="0"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="uniq_usr">
<xs:selector xpath="aif:user"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
<xs:element name="services" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="service" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="aif:t_nonempty">
<xs:attribute name="status" type="xs:boolean" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:unique name="uniq_svc">
<xs:selector xpath="aif:service"/>
<xs:field xpath="@name"/>
<xs:field xpath="@status"/>
</xs:unique>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:all>
<!-- timezone and kbd/xkbd are validated in-code. -->
<xs:attribute name="timezone" type="aif:t_nonempty" use="required"/>
<xs:attribute name="chrootPath" type="aif:t_filepath" use="required"/>
<xs:attribute name="kbd" type="aif:t_nonempty" use="optional" default="us"/>
<xs:attribute name="xkbd" type="aif:t_nonempty" use="optional" default="us"/>
<xs:attribute name="reboot" type="xs:boolean" use="optional" default="0"/>
</xs:complexType>
</xs:element>
<!-- END SYSTEM -->
<!-- BEGIN PACMAN -->
<xs:element name="pacman" maxOccurs="1" minOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="repos" maxOccurs="1" minOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="repo" maxOccurs="unbounded" minOccurs="1">
<xs:complexType>
<xs:attribute name="name" type="aif:t_nonempty" use="required"/>
<xs:attribute name="enabled" type="xs:boolean" use="required"/>
<xs:attribute name="sigLevel" type="aif:t_nonempty" use="required"/>
<xs:attribute name="mirror" type="aif:t_pacuri" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="mirrorList" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="mirror" type="aif:t_pacuri" maxOccurs="unbounded"
minOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="software" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="package" maxOccurs="unbounded" minOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="aif:t_nonempty">
<xs:attribute name="repo" type="aif:t_nonempty" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="uniq_repos">
<xs:selector xpath="aif:repos"/>
<xs:field xpath="repo"/>
</xs:unique>
<xs:unique name="uniq_mirror">
<xs:selector xpath="aif:mirrorList"/>
<xs:field xpath="mirror"/>
</xs:unique>
<xs:unique name="uniq_pkg">
<xs:selector xpath="aif:software"/>
<xs:field xpath="package"/>
</xs:unique>
</xs:element>
</xs:sequence>
<xs:attribute name="command" type="aif:t_nonempty" use="optional" default="pacman -S"/>
</xs:complexType>
</xs:element>
<!-- END PACMAN -->
<!-- BEGIN BOOTLOADER -->
<xs:element name="bootloader" maxOccurs="1" minOccurs="1">
<xs:complexType>
<xs:attribute name="type" type="aif:t_bootloaders" use="required"/>
<xs:attribute name="target" type="aif:t_nonempty" use="required"/>
<xs:attribute name="efi" type="xs:boolean" use="optional" default="1"/>
</xs:complexType>
</xs:element>
<!-- END BOOTLOADER -->
<!--- BEGIN SCRIPTS -->
<xs:element name="scripts" maxOccurs="1" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="pre" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="script" minOccurs="1" maxOccurs="unbounded"
type="aif:t_provscript"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="post" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="script" minOccurs="1" maxOccurs="unbounded"
type="aif:t_provscript"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="pkg" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="script" minOccurs="1" maxOccurs="unbounded"
type="aif:t_provscript"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="uniq_script">
<xs:selector xpath="aif:script"/>
<xs:field xpath="@order"/>
</xs:unique>
</xs:element>
<!-- END SCRIPTS -->
</xs:all>
<xs:attribute name="version" type="aif:t_nonempty" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>