Commit Graph

96 Commits

Author SHA1 Message Date
Marcus Schäfer
94c7a7cdf6
Added new oem-resize-once element
The new element controls the behavior of the repart/resize code
in the oem-repart dracut module. By default the repart/resize
happens on every reboot and therefore also allows for disk
geometry changes during the livetime of the machine. If the
element is set to false the repart/resize operation happens
only once and then never again. To check for this condition
a new profile environment variable kiwi_rootpartuuid which
holds the PARTUUID of the root partition has been added to
the disk builder.
2020-03-27 10:37:42 +01:00
Marcus Schäfer
44a1d78e96
Added new image type: wsl
Support for building appx container images for
Windows Subsystem Linux (WSL). This Fixes #1235
2020-03-26 19:42:25 +01:00
Marcus Schäfer
8ed3a047f3
Fixed schema regexp validation
Regexp patterns used in the schema are translated into python
expressions by generateDS. It's required to use the XSD schema
to run generateDS, xsd however has some restrictions on pattern
use which leads to a warning message for the ones fixed here
2020-02-28 09:48:55 +01:00
David Cassany
e670b4a760
Make squashfs compression configurable
This commit adds the `squashfscompression` attribute in type element. It
can take `gzip`, `zstd`, `xz`, `lzo`, `lz4` or `none`. The default is `xz`.

Fixes #1315
2020-02-24 10:40:57 +01:00
Marcus Schäfer
04b345e7aa
Added support for spare partition fs attributes
Added new type attribute:

```xml
<type ... spare_part_fs_attributes="..."/>
```

which can be a comma separated list of the following currently
supported filesystem attributes:

* no-copy-on-write
* synchronous-updates

See chattr and filesystem manual pages for details on those
attributes. More attributes for the spare part context can be
added on request. This Fixes #1233
2020-01-15 16:15:48 +01:00
Marcus Schäfer
f958994a7e
Version 2.29.24 fixes the pattern problem
and avoids the recursion bug
2019-10-21 11:28:23 +02:00
David Cassany
09e84933ed
Upadate xml_parser autogenerated code
This commit updates xml_parser.py autogenerated code using a newer
generateDS version. The previous generateDS version is not properly
handling the regular expressions of some element's content.

Fixes #1217
2019-10-08 17:28:46 +02:00
Marcus Schäfer
5e42c38e3a
Support specifying the source type of repos
Repository source paths can be more than just a baseurl.
There is also the opportunity to point to a metalink
file or a mirrorlist. In both cases the packagemanager
needs to know the type of this target. Therefore a new
attribute called sourcetype exists which allows to
specify the type the repo path uri is associated with.
Currently the dnf repository class is the only one that
makes use of the information. This change is required to
support Fedora >= 30 images. I also expect this concept
to be used by other distributions in the future
2019-09-30 15:24:30 +02:00
Dan Čermák
b015b91679
Stop inheriting from object
This is no longer required in Python3
2019-08-22 15:43:27 +02:00
Marcus Schäfer
21d48c74c6
Allow multiple values for grub terminal setup
With regards to the grub documentation from
https://www.gnu.org/software/grub/manual/grub/grub.html#terminal_005finput
multiple terminal consoles can be active. This patch allows
to specify terminal collection between serial, console and gfxterm
This Fixes #1123
2019-07-23 11:25:59 +02:00
Marcus Schäfer
30e18d1398
Added support for fscreateoptions attribute
Along with the fsmountoptions attribute there is now also the
fscreateoptions attribute which allows to control the options
used for creating the filesystem. Please note, it's not kiwi's
task to validate that the given option string is supported
by the selected filesystem. This means providing wrong values
here will cause the build to fail at the time the filesystem
gets created. This Fixes #1109
2019-07-18 15:55:39 +02:00
Dan Čermák
669421011e
Add embedded_vagrantfile attribute to vagrantconfig
This element allows the user to specify a relative path to an alternative
Vagrantfile that will be embedded inside the finished Vagrant box.

- update XML schema
- add additional logic to DiskFormatVagrantBase.create_image_format
- add unit test for the custom Vagrantfile
- fix other vagrant unit tests
2019-07-05 10:50:11 +02:00
Marcus Schäfer
0e6bb6ab33
Extend spare partition setup
The spare partition could be used to introduce one additional
partition table entry. With this patch the following new type
attributes will be added:

* spare_part_fs="fsname"
* spare_part_mountpoint="/location"
* spare_part_is_last="true|false"

Along with the setup of the partition size the filesystem and
its mountpoint can be specified. If set the contents of the
rootfs at the specified spare location will be synced to that
partition. The spare_part_is_last attribute will place the
spare partition at the end of the disk. Note this attribute
is only available for the simple vmx disk type. This is
related to bsc#1129566
2019-06-03 10:47:07 +02:00
Marcus Schäfer
c148d661b9
Deleted pxedeploy section
There is no further demand in the client config creation for the
legacy netboot code. Customers using the netboot initrd already
create the client config.<MAC> file manually or through another
system. With the next generation kiwi we also recommend the disk
based network deployment using the dracut capabilities and marked
the netboot code as still supported but on the legacy stream.
Along with the deletion in the schema the following changes
were also done:

* Deleted use of pxedeploy section in implementation
* Increase schema version to v7.0
* Update documentation on schema version update
* Added xsl stylesheet conversion from v6.9 to v7.0
  Automatic schema version upgrade from v6.9 to v7.0 deletes
  the pxedeploy section from any type specification

This Fixes #19
2019-04-05 14:26:54 +02:00
Alberto Planas
0c095a98b1 Replace @staticmethod with @classmethod when needed
@classmethod are used in Python to represent methods that can
query and update the class (cls parameter). Is expected to be
used for metaprograming, or advanced techniques that require the
access to the class itself, before we have an instance.

@staticmethod are used to associate a function to a class. It will
not be have access to the instance (self) not the class (cls). In
other programming languages are known as class methods.

This patch replace all the @classmethod with @staticmethod when
there is not need to access to the cls parameter, because the
intention is to be used as normal functions.
2019-03-26 16:27:43 +01:00
Dan Čermák
2b17684d2c
Add support to build vagrant boxes with the Virtualbox provider
This commits adds initial support to build Vagrant boxes with the Virtualbox
provider.
- The attribute 'provider' of the option <vagrantconfig> now supports the option
  "virtualbox".
- A new boolean attribute 'virtualbox_guest_additions_present' was added to
  <vagrantconfig>. When set to true, KIWI will assume that guest additions have
  been installed into the base image and configure the shared folders to use
  vboxfs, otherwise rsync will be used.

This fixes #532 (https://github.com/SUSE/kiwi/issues/532).
2019-03-05 15:33:18 +01:00
Marcus Schäfer
f8265bb607
Added new preferences subsection
In the preferences section the following optional subsection
can be configured:

   <rpm-locale-filtering>true|false</rpm-locale-filtering>

If set to true the default locales POSIX, C, and C.UTF-8 are
applied as rpm install_lang macro. If the locale section is
configured in addition the list is extended by that information
too
2019-02-08 16:56:56 +01:00
Marcus Schäfer
0af8028387
Allow to switch off install image boot timeout
This commit adds a new attribute called:

    <type ... install_continue_on_timeout="true|false"/>

It allows to setup the boot timeout for install images
build with KIWI. If not set or set to 'true' the configured
boottimeout or its default applies to the install image
as it was before. If set to 'false' there will be no
timeout in the install image bootloader setup and the boot
only continues on manual intervention.
2019-01-17 10:09:40 +01:00
Marcus Schäfer
646042a963
Merge pull request #909 from SUSE/add_protocol_on_exposed_ports
Allow setting the protocol for exposed ports
2019-01-04 18:34:24 +01:00
David Cassany
6fa997888e
Allow setting the protocol for exposed ports
With this commit it is possible to set tcp or upd (e.g. "80/tcp") for
exposed container ports. If no protocol is provided OCI defaults are
applied.

Fixes #906
2018-12-21 17:22:57 +01:00
Thomas Schraitle
3156bd14d8
Use cls in @classmethods instead of self
For consistency reasons.
2018-12-20 08:47:43 +01:00
David Cassany
f0612486dd
Add history metadata for container builds
This commit adds the history section in contianerconfig. With it
'author', 'created_by' and 'comment' can be customized. In addition
'created' is always included with the image creation date time.
'created_by' entry is set to 'KIWI __version__' by default if nothing
is provided.

Fixes #852
2018-11-08 15:33:04 +01:00
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