Commit Graph

47 Commits

Author SHA1 Message Date
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
David Cassany
40cf0d1515 Integrating Schematron syntax in schema
Using Schematron syntax in schema co-occurrence constraints can
be easily defined. This commit provides the schematron integration.
2016-10-20 12:32:29 +02:00
Marcus Schäfer
35ddb8e9d8
Fixup doc string for target_removable attribute
The default behaviour was not explained clear enough
2016-10-17 09:11:06 +02:00
Marcus Schäfer
b02b565d94 Added target_removable attribute
Indicate if the target disk for oem images is deployed to a
removable device e.g a USB stick or not. This only affects
the EFI setup if requested and in the end avoids the creation
of a custom boot menu entry in the firmware of the target
machine on first boot. This is related to bnc#993130
2016-10-14 08:31:23 +02:00
Marcus Schäfer
0b9acfc035 Added btrfs_root_is_readonly_snapshot attribute
The attribute allows to specify if the root filesystem should
be set to read-only if it is created as a btrfs snapshot.
The option only has an effect if a btrfs snapshot is used as
root filesystem. Fixes bnc#1000080
2016-10-06 09:30:26 +02:00
Marcus Schäfer
a6621aa148 Respect setup of devicepersistency for boot part
If an extra boot partition is requested it should be added
to the fstab file according to the device persistency setup
or the default uuid persistency type
2016-09-26 18:30:14 +02:00
Marcus Schäfer
d4d711f9e3 Make repository an optional element
So far one repository was mandatory in the XML description.
However, this is not required because all repositories can
be specified on the commandline
2016-08-18 15:34:37 +02:00
Marcus Schäfer
8b150f9f44 Delete obsolete <except> section
The <except> section was formerly used as part of the <split>
section. kiwi no longer supports static split images in favour
of overlay systems based on e.g overlayfs. Fixes #120
2016-08-11 10:58:34 +02:00
Marcus Schäfer
0ea630b658
Rebuild RNG schema and parser for 6.4 2016-08-01 11:15:52 +02:00
David Cassany
c0bcce3404 Updated the user schema layout
Now each user item may or may not have a groups attribute. The
groups attribute is a comma separated list of group names. If
present the first group name will be the login or primary group,
if not present, the underlying toolchain will assign the default
login group for that user.
2016-07-27 12:26:50 +02:00
David Cassany
25baf73b11 New generated schema and parser 2016-07-26 18:04:11 +02:00
Marcus Schäfer
a4a9ffa9aa Added support for setting the bootloader console
Some bootloader e.g grub supports graphics, text and also
serial consoles to hand over the output of the bootloader
menu. With this patch we allow to customize the console
used by the bootloader. So far only grub makes use of the
new attribute

    <type ... bootloader_console="serial|console|gfxterm"/>

This references Trello:

    https://trello.com/c/q9EhNKKV/155-support-for-grub2-serial-console
2016-06-20 18:24:43 +02:00
Marcus Schäfer
c3004b48eb Support for apt-get package manager
Starting to support Debian based distributions also means to support
the deb repository types. This commit adds the RepositoryApt class
to handle deb repositories for image building. Related to #37
2016-06-08 20:41:09 +02:00
Marcus Schäfer
ec35b4029c Add attribute <type ... overlayroot=true|false/>
Allow to activate the overlay root setup for disk images
2016-06-01 08:40:51 +02:00
Marcus Schäfer
a2f9684c25
Added support for custom rootfs label
A new attribute <type ... rootfs_label="name"/> has been added
This Fixes #66
2016-04-29 16:26:20 +02:00
Marcus Schäfer
08d39049bc Added support for virtual boot partition on arm
Triggered by the firmware="vboot" setup an EFI setup plus a
raw partition without filesystem is created as first partition.
The size of the partition can be controlled by the vbootsize
attribute. The vboot feature is used by the arm architecture
to provide a space in the partition table for custom code as
required by e.g the chromebook. The final customization of the
vboot space is board specific and can't be implemented in a
generic way in kiwi. For finalizing the vboot space the script
hooks editbootconfig and editbootinstall can be used
This is related to Issue #17
2016-03-22 16:20:51 +01:00
Marcus Schäfer
f954861f89 Added support for hybrid GPT
Embedding an MBR into a GPT is required for a collection of
boards, e.g arm rapberry PI. The kiwi configuration provides
a new attribute called

    <type ... gpt_hybrid_mbr="true|false"

which allows to control if the GPT should be hybrid or not.
On build procedures which do not create a GPT the attribute
has no effect. This references Issue #17
2016-03-18 21:41:14 +01:00
Marcus Schäfer
73ef1e5833 Update schema to version 6.3
- Deleted obsolete split section
- Deleted zfsoptions, fsreadwrite and fsreadonly attributes
- Updated allowed values for bootloader and filesystems
2016-03-18 11:21:06 +01:00
Marcus Schäfer
c2e7073456
Adding opal firmware type for ppc64 architectures 2016-03-10 14:23:55 +01:00
Marcus Schäfer
d0fa83681f
Added support for using dracut initrd
As of today only the kiwi initrd could be used with an image
build. This commit adds a new initrd_system attribute and
allows to select between kiwi and dracut as initrd system.
Please note the dracut initrd does not support all features
of the kiwi initrd. This fixes #25
2016-02-29 20:52:25 +01:00
Marcus Schäfer
9745d598d2 Regenerate xml_parse data structures for python3 2016-02-19 11:51:42 +01:00
Marcus Schäfer
40e6308aa9 Port application from python 2.7 to 3.4
For new applications like this kiwi version and its use cases
it is better to base it on a more recent python version
2016-02-17 22:38:38 +01:00
Marcus Schäfer
1d1ed36261
Recompile schema and data structures
New attribute btrfs_root_is_snapshot and methods
2016-01-29 14:38:29 +01:00
Marcus Schäfer
36dd77190d
Rebuild schema and data structures 2016-01-12 22:50:29 +01:00
Marcus Schäfer
09daca60c0
KIWI - appliance builder next generation
a rewrite of the current kiwi from https://github.com/openSUSE/kiwi
2015-12-05 16:17:10 +01:00