Commit Graph

74 Commits

Author SHA1 Message Date
Marcus Schäfer
2ea7fbd13f
rebuild auto generated code with stable generateDS
For some reason the xml_parse code generated by generateDS v2.29.24
caused warnings on simple type XSD patterns. Therefore I rebuild
the code with the stable build version v2.29.14 which fixed that
issue
2018-10-08 15:47:53 +02:00
David Cassany
f28aced0e0
Make volume id customizable for installation ISOs
This commit makes volid attribute also available for OEM images.
The installation media makes use of the volid value. Only posix
safe names are allowed, up to 32 characters.

Fixes #811
2018-09-26 11:57:01 +02:00
Marcus Schäfer
efc0d63c88
Drop oem-ataraid-scan from schema
Along with the change we pin generateDS version to 2.29.14
because the newer version (2.29.19) creates broken python
syntax for elements with a value list for their content
like it's the case for the packagemanager element. The
tool uses the name k.packagemanager.content as class name
which is invalid for python.
2018-08-06 12:23:53 +02:00
Marcus Schäfer
c32121704d
Support label attribute in volumes
The optional label attribute in a volume section allows
to specify a filesystem label for the selected volume.
The label setup will have no effect on filesystems
which implements their own volume management like it's
the case for btrfs. This Fixes #738
2018-07-11 13:07:31 +02:00
Marcus Schäfer
9f77411162
Add support for activation of btrfs quota groups
If the new type attribute btrfs_quota_groups is set to true
this will enable the quota group system for btrfs based systems.
This Fixes #772 and bsc#1093518
2018-07-11 11:01:05 +02:00
David Cassany
2418d58dbe Adding license tag under description tag in schema
This license tag does not effect the resulting image in any way. The tag
is just included to state the license of the kiwi image sources in case
they are distributed.

Fixes #728
2018-06-04 17:16:12 +02:00
David Cassany
87769a3201 Add additionaltags containerconfig attribute
This commit adds `additionaltags` attribute, so multiple tags to
a container image can be defined in a comma separated value.

Fixes #713
2018-05-14 17:04:07 +02:00
David Cassany
74aa8a5c14 Adding unpartitioned size attribute
This commit adds the possibility of setting some unpartitioned area
after the systemdisl partition into the image.

Fixes #709
2018-04-20 17:04:33 +02:00
Marcus Schäfer
86a8cc9da7
Delete obsolete hybrid attribute from type
Any iso image we create will be a hybrid image. That was
already the default for any install iso image and was a
configuration option for live images. The optional selection
only existed for systems which do not provide tools to
make an iso hybrid. All distributions kiwi supports provides
this capabilities and there is no good reason why a live
or install iso should not be hybrid and bootable as iso
and as disk. Also the boot in disk mode became the preferred
boot method for the majority of our users which requires
to provide a hybrid iso
2018-03-23 09:42:23 +01:00
David Cassany
fba3ff74ba Add efiparttable type attribute
This commit allows to choose the partition table type for efi firmwares
using the efiparttable type attribute.

Fixes #638
2018-03-22 18:36:53 +01:00
David Cassany
22db94ab7e Add disk_start_sector type attribute
This commit adds the disk start sector attribute to configure the
first disk sector for the first partition of the disk.

Fixes #575
2018-03-13 18:31:40 +01:00
David Cassany
967bde8385 Add profile dependencies
With this commit the profile can include other profiles as a dependency.
This way it is possible build an image defined by multiple profiles by just
calling a single composed profile from the command line.

Fixes #658
2018-03-12 09:18:54 +01:00
Marcus Schäfer
a70d7bdccc Allow arch attribute for profiles specification
A profile could be relevant for only a specific architecture.
There was no way to express that in the XML description. With
the change in this commit a specification like the following
is possible:

<profiles>
    <profile name="A" description="..." arch="aarch64"/>
    <profile name="B" description="..."
</profiles>

Profile A is only usable on the aarch64 architecture, whereas
profile B would be usable on all architectures.

* Selecting an arch specific profile from the commandline via
  the --profile option on a system which is not of that architecture
  will result in an error message.

* Using the import="true" attribute in the <profile> definition
  for an arch specific profile will cause the import of that
  profile only on that architecture and silently ignore the
  import on any other architecture

This Fixes #637
2018-02-22 15:10:10 +01:00
David Cassany
2928bba276 Adding publisher attribute for ISOs
This commit adds the 'publisher' attribute in type only for
ISO image type. It sets the publisher name of the resulting ISO.

Fixes #630
2018-02-20 17:57:18 +01:00
Marcus Schäfer
a64161df65 Delete hwclock section from schema
Deletes hwclock section from schema and provides xslt
style sheet for schema auto conversion from schema
version 6.7 to 6.8
2018-01-17 10:19:37 +01:00
David Cassany
adcdd6b463 Improve locale pattern in schema
Now the locale pattern in the schema also supports POSIX. Note
that POSIX will be only accepted if listed in the first place of the comma
separated list.

This commit fixes #570
2017-12-15 10:44:56 +01:00
Marcus Schäfer
cbccb76294
Allow to choose dracut live module
There is the standard dracut dmsquash-live module based on
the device mapper technology and the kiwi-live module based
on the overlayfs technology. The setup of the live iso structure
in kiwi is compatible to both modules. Thus it makes sense
to allow to choose the technology via the flags attribute

    <type image="iso" ... flags="overlay|dmsquash"/>

Please note both modules supports a different set of live
features. This Fixes #568
2017-12-13 09:53:21 +01:00
David Cassany
04f23ee6cd Limit the characters set for volid attribute
This commit fixes #493
2017-09-15 09:05:12 +02:00
David Cassany
642b514a59 Add runtimecheck for mediacheck attribute on non x86 hosts
This commit rearranges some method and variable names and includes
a new runtimecheck to ensure the mediacheck attribute is not set
when building non x86 images.

Patch related to bsc#1049304
2017-07-27 15:44:37 +02:00
David Cassany
8d696cd20b Adding mediacheck menu entry for liveCDs
This commit adds the checkiso attribute in type tag, only available for
iso image types. Checkiso is boolean that determines the presence of0
a Mediacheck menu entry or not in the bootloader.

This patch is related to bsc#1049304
2017-07-27 15:43:21 +02:00
Marcus Schäfer
b0b605f065 Update schema to version v6.7
Cleanup of the schema, delete obsolete and unused attributes
and sections. Details of the change can be found in the
conversion stylesheet convert66to67.xsl
2017-07-27 14:46:11 +02:00
Marcus Schäfer
983a74b4f0
Make vmdisk optional for the machine setup
The guest machine information might not require information about
the disk. Issue #429
2017-07-24 12:05:02 +02:00
Marcus Schäfer
9fb81db16d
Update schema to version 6.6
* Deleted domain attribute from machine section
* Added xen_server attribute to specify a type to be a Xen dom0
* Added xen_loader attribute in machine section to specify the
  target guest loader this image is expected to become loaded
  with
2017-07-19 16:33:07 +02:00
Marcus Schäfer
1d9ac070e8 Build schema documentation with Oxygen
Given there is a valid Oxygen license owned by the company
as described in https://www.oxygenxml.com/oxygen_scripting.html
the schema documentation can be created using Oxygen. This
commit allows building the schema docs with alternative
doc builders and in case of Oxygen would change the way the
schema docs are generated in the following way:

1. Install Oxygen and setup the license to activate the tool

2. Setup the KIWI development shell environment to export
   the schema_tool variable to point to the schemaDocumentation.sh
   script provided by the Oxygen installation

   export oxygen_tool=/path/to/Oxygen/schemaDocumentation.sh

3. In any case of a schema change manually call:

   tox -e schema

   This step was done before as part of the tox doc target
   but can't be done automatically because it would require
   a correctly licensed Oxygen installation in the travis
   environment. Thus the result data has to be part of the
   pull request

4. Build the documentation and review the result

   tox -e doc

5. Create the pull request
2017-06-29 10:38:45 +02:00
David Cassany
26e15929ab Include imageonly attribute for repositories
This commit adds imageonly attribute support for the repository
element. imageonly is a boolean attribute that if true indicates
that the repository is no used for the build but needs to be
configured for the resulting image.

Fixes #362
2017-06-12 16:46:52 +02:00
David Cassany
62095aeaf3 Improve package/repository signature checking setup
This commit adds repository_gpgcheck and package_gpgcheck attributes
to the repository tag in schema. With this change each repository
can be configured individualy to enable repository signatures check
and/or enable signature package check. The configuration is done at
repository level, thus it is not conflicting with the wide package
manager configuration flag <rpm-signatures-check>.

Fixes #358
2017-06-08 16:40:20 +02:00
Marcus Schäfer
afebd3897e Fix/workaround invalid xsd pattern translation
The data structures are auto generated by the generateDS
tool which works nicely except for the arch-name xsd pattern
used in the RelaxNG schema. For some reason the used regular
expression is translated by generateDS into a python
expression not matching the original expression from the
schema. The result is an invalid python warning message after
the schema has successfully validated the arch string.
The problem has been reported to the generateDS developer.

As long as their is no fix available in generateDS the
following workaround in kiwi applies: The original xs:token
pattern validation will be disabled on the generateDS
level and applies only to the schema. This Fixes #347
2017-06-01 11:37:35 +02:00
David Cassany
b26969d53c Add clear attribute for entrypoint and subcommand sections
This commit adds the possibility of clearing asny subcommand or
entrypoint. This is relevant for docker derived images, as they
inherit the configuration and it might lead to some bad behavior.
2017-04-24 11:59:45 +02:00
Marcus Schäfer
249871eaea Added <oem-nic-filter> element
Allow network interface names to be filtered by the given
regular expression. The expression is handled by the bash
regexp operator. Interface names matching the rule will be
filtered out, all others stay. It is also possible to pass
the variable kiwi_oemnicfilter as kernel command line in a
PXE deployment. Fixes #245
2017-03-28 11:26:03 +02:00
Marcus Schäfer
b0030f4a19
Update schema documentation
Add explanation for attributes with no documentation
Fixup explanation for hybrid attribute
2017-03-22 13:00:35 +01:00
Marcus Schäfer
9992b8c0f3 Update flags attribute and its documentation
Delete the seed and compressed value as it is not implemented
and won't be supported in the future. Properly document the
existing overlay methods
2017-03-22 12:35:31 +01:00
David Cassany
1fe0c9a266 Import root system from a given image
This commit includes the root import feature. A `derived_from`
attribute has been included with the <type> section to make
reference to the image file to import. The image format to import
is assumed to be the same as the build type to import.

The current format supported is docker
2017-03-07 15:14:03 +01:00
Marcus Schäfer
3e6848ed88 Refactor docker container creation
Instead of creating a simple tarball the tools umoci and skopeo
from the docker tool chain are used to create official docker
images. Along with those tools more information to describe a
container has been added to the schema. A complete container
setup now consists of the following elements

<type image="docker">
    <containerconfig name="..." maintainer="..." user="..." workingdir="...">
        <entrypoint execute="command">
            <argument name="option"/>
            ...
        </entrypoint>
        <subcommand execute="command">
            <argument name="option"/>
            ...
        </subcommand>
        <expose>
            <port number="..."/>
            ...
        </expose>
        <volumes>
            <volume name="..."/>
            ...
        </volumes>
        <environment>
            <env name="variable" value="value"/>
            ...
        </environment>
        <labels>
            <label name="..." value="..."/>
            ...
        </labels>
    </containerconfig>
</type>
2017-02-27 15:28:38 +01:00
Marcus Schäfer
68c217c3d9 Added DNF package management implementation
DNF is the package manager used on Fedora systems and will also most
likely replace yum for the next generation of RHEL. Along with the
implementation here an example JeOS image description for Fedora can
be found on: https://github.com/SUSE/kiwi-descriptions.
This Fixes #36
2017-02-24 14:50:59 +01:00
Marcus Schäfer
37c1e1e3a1
Allow to convert GPT into MBR
The type attribute force_mbr allows to convert a system selected
for use with a GPT to use an MBR (msdos table). The attribute
only takes effect on image configurations which would select the
GPT partitioner. This Fixes #236
2017-02-20 16:27:52 +01:00
Marcus Schäfer
75275e8010
Added efipartsize attribute in type setup
The attribute allows to specify a custom size for the
EFI partition. Fixes #237
2017-02-09 16:47:48 +01:00
Marcus Schäfer
501d8a8955 Allow bootloader="custom" for bootloader attribute
If specified as such the bootloader configuration and
installation will be skipped. However the editbootinstall
and editbootconfig scripts will still be called. This
Fixes #235
2017-02-09 15:54:24 +01:00
Marcus Schäfer
85f9b2bc4c Added new type attribute spare_part
spare_part receives a size value with an optional unit (M|G)
and is used for disk images to allow the creaton of a spare
partition of the configured size. Issue #234
2017-02-08 16:28:47 +01:00
Marcus Schäfer
865f3bb2ca
Delete all traces of vboot firmware
The vboot firmware setup was a workaround on arm for the
chromebook platform several years ago. From a todays
perspective the setup and the way to boot would be different
and obsoletes the special case implementation. Thus this
is gone now. Related to Issue #234
2017-02-08 15:53:10 +01:00
Marcus Schäfer
7ff1844e6f
Eliminate instsource element and requirements
The schema defintions for kiwi v8 still contained the
product schema definitions aka instsource which is no
longer supported by this version of kiwi. Building
SUSE products is done with the kiwi v7 code base and
will most probably be handled by an extra product
builder tool in the future maintained and developed
by the buildservice team. We would be proud if the api
of the kiwi v8 code base can be helpful for the product
builder in the future
2017-02-02 15:56:42 +01:00
Marcus Schäfer
7141ee16e4
Added arch attribute for ignore section
The packages subsection <ignore> only accepted a package
name to become ignored. However a <package> subsection
to install a package allows for an arch selection. The
same should apply to ignore a package. In addition the
allowed content for the arch attribute has been changed
from simple text to a regular expression. Allowed is a
comma seperated list of reserved architecture words like
they are displayed by uname -m
2017-02-01 15:30:06 +01:00
Marcus Schäfer
fc7b2ada67 Added volume attribute copy_on_write
The copy_on_write attribute allows to activate or deactivate
the copy on write functionality for the desired volume.
This Fixes #218
2017-01-20 10:24:31 +01:00
Marcus Schäfer
b7f7fa11eb
Update schema for container setup
In preparation to support creation of native docker containers the
way docker likes it, the kiwi schema has to be adapted. So far there
was no way to specify additional metadata information for containers.
With this commit a new section called <containerconfig> is provided.
containerconfig is a subsection of the type and only allowed for
the docker image type. This constraint is checked via a schematron
rule. In addition an xslt stylesheet moves the currently existing
container attribute, which was used to set a name for the container,
into the new containerconfig section as name attribute
2017-01-09 10:52:41 +01:00
Marcus Schäfer
71be75e728 Update vagrantconfig schema setup
Delete the virtualbox provider, As long as there is no
opensource variant for the ovf creation available we won't
support that provider
2016-12-12 11:18:58 +01:00
Marcus Schäfer
965139c370
Add a docstring for the extension section
Short description what the extension section is good for
2016-12-05 11:45:45 +01:00
Marcus Schäfer
c879c2b172 Allow <extension> section for custom plugins
For the use case to add additional image description information
an extension section exists which allows to add custom section
and attributes. Custom XML information must be connected to a
namespace in order to avoid conflicts with the existing
structure. The following example shows how to place additional
XML information:

<image>
    <extension xmlns:my_plugin="http://www.my_plugin.com">
        <my_plugin:my_feature>
            <my_plugin:title name="cool stuff"/>
        </my_plugin:my_feature>
    </extension>
</image>
2016-12-01 10:45:17 +01:00
David Cassany
e5cd3e9426 Fixed a couple of constraints 2016-10-25 15:52:13 +02:00
David Cassany
c233e7ba4a Redo of xml_parse.py with updated generateDS 2016-10-25 15:22:22 +02:00
David Cassany
8257f65c33 Some tests slightly modified in order to improve coverage
This commit improves some example kiwi files and tests in order
to achieve a 100% code coverage.
2016-10-24 14:35:09 +02:00
David Cassany
4b90a67862 Co-occurrence constraints included in the schema
Constraints for pxe, iso, vmx, oem and docker image types have
been included.
2016-10-21 18:08:04 +02:00