Commit Graph

73 Commits

Author SHA1 Message Date
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
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
ed6c11f7d6
Added get_description method to XMLState
In preparation to access the contents of the <description>
section this pull requests adds a simple method to read
the contents.
2019-02-26 15:20:21 +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
fad1c0f1ef
Added support for %_install_langs rpm macro
During the image build the custom rpm macro %_install_langs
is configured with the <locale> setup from the KIWI XML
description. This allows to filter language specific packages
on the rpm level and Fixes #771
2019-02-07 16:05:25 +01:00
Marcus Schäfer
dcce7c38c5
Fixed Xen guest detection
We only support Xen setup e.g in the Amazon Cloud for the
x86_64 architecture. This Fixes bsc#1123186 and bsc#1123185
2019-01-25 16:20:32 +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
David Cassany
643d617bba
Refactor containerconfig xml evaluation
This commit refactors the extracted data from containerconfig section
to be tool agnostic.

Related to #863
2018-11-05 10:36:04 +01: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
David Cassany
dd21e6c8d7
Add '--add-container-label' flag
This commits adds a command line flag to add a label for container image
types. The flag can be used multiple times.

Fixes #770
2018-07-06 14:11:00 +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
9dcf00e4d1 Some improvements on size calculation
This commit simplifies the unpartitioned area size calculation.

Fixes #709 and it is related to fate#323874
2018-04-23 15:45:38 +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
ebbc4942b7
Fixed creation of machine settings file
If no vmnic setup is present a request to iterator over
a NoneType object is attempted and failed. This Fixes #710
2018-04-20 10:42:36 +02:00
Marcus Schäfer
009a218ea5
Fixup creation of vmware settings file
The kiwi schema allows for multiple vmnic sections but kiwi
only took the primary one into account. This patch uses all
configured vmnic sections. This Fixes #688
2018-04-10 19:50:59 +02:00
David Cassany
d3baa9d102 Fix default initrd_system values
This commit fixes the default initrd_system value for some image
types. Since this value is included in profile and potentially
taken into account for some of the config script functions, it is
important to have consistent values even when the image type
has no initrd choice or it doesn't have initrd at all.

Related to #689
2018-04-06 16:08:24 +02:00
David Cassany
703747c718 Make build type mandatory in XMLState 2018-03-14 17:59:23 +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
David Cassany
d334a89d84 Adding package_gpgcheck flag as an option for set-repo and add-repo
Fixes #565
2018-01-23 19:03:27 +01:00
Marcus Schäfer
fce043d6eb Only add package manager on image package requests (#550)
If an image description only contains package requests
from a bootstrap section but no image packages, it's not
required to install a package manager package into the
system
2017-11-21 10:57:36 +01:00
Marcus Schäfer
9500232ba1
Prefer image packages section for bootincludes
If a package is marked bootinclude prefer <packages type="image">
section in the target XML as primary target and only if no such
section exists put the package in the <packages type="bootstrap">
section
2017-10-13 15:35:54 +02:00
Marcus Schäfer
77fa8de510
Make get_initrd_system a state method
Make sure the default initrd_system is set to dracut
for the vmx image type and to kiwi if no initrd_system
is specified. This allows to simplify other code parts
as we can trust there is a value set
2017-09-06 18:01:37 +02:00
Marcus Schäfer
e59270c09b
Added handling of formatoptions attribute
Custom disk format options passed in the formatoptions
attribute were not handled. In addition options with a
value passed to qemu were handled in the wrong way.
This commit addresses both problems and Fixes #463
2017-08-11 15:46:40 +02:00
Marcus Schäfer
bc1089b257 Refactor code which deals with Xen
Provide two methods is_xen_guest and is_xen_server which
are used instead of the former machine domain and firmware
processing. Issue #429
2017-07-20 10:42:49 +02:00
Marcus Schäfer
dee0a5af7f Refactor handling of obs repositories
* Delete kiwi internal ibs: and suse: types
* Delete handling for --obs-repo-internal and provide a
  compatibility message to the user
* Buildservice download server url and scope can be configured
  via ~/.config/kiwi/config.yml
* Translate obs urls to http in import_repositories_marked_as_imageinclude
* Use new Uri.is_public method in renamed runtime check
  check_image_include_repos_publicly_resolvable
2017-07-05 16:07:29 +02:00
David Cassany
edfd755df1 Fix xml_state test 2017-07-04 09:31:12 +02:00
David Cassany
a8dfa4a5a5 Accept an empty string as a repo priority
xml_parse code is autogenerated, thus no changes there should be
considered. When adding a repository from the command line it
can happen that the repository priority is mapped to an empty instead
to a None valuei, when the priority is not specifically set. xml_parse
will only support a parseable string to int or a None value as the
default option, so, if an empty string is used, it throws an
exception. With the current patch anything that cannot be casted
to an int, will be considered as None.

Fixes #408
2017-07-03 18:17:29 +02:00
David Cassany
c9f7802637 Merge branch 'master' into translate_derived_from_image_uris 2017-06-30 12:21:11 +02:00
David Cassany
3ad92a1477 Translate obs to suse derived from image uris
This commit performs a translation from obs scheme to suse
scheme for derived from image uris when kiwi is running in a
buildservice worker.

Fixes #399
2017-06-30 12:16:58 +02:00
Marcus Schäfer
c544dd178b
Allow imageinclude in add|set-repo commandline
The --set-repo and --add-repo commandline options now allows
additionally to specify a true|false value to indicate if the
repository should be part of the system image repository
setup or not. This Fixes #398
2017-06-29 16:44:09 +02:00
David Cassany
4f18d2da22 Flag --ignore-repos do not ignore imageonly repos
This commit fixes #395, with it, using --ignore-repos, does not
delete imageonly repositories from the description file. This way
imageonly is prepared to be used in the buildservice even when using
the 'obsrepositories:/' reference style.
2017-06-27 10:02:42 +02:00
David Cassany
21dd3e73db Removing has_repositories_marked_as_imageinclude method
With the current repository management this method is not required
anymore, since the setup repositories method does not modify the image
if no repositories are present.

It is related to #305 and #191
2017-06-14 09:41:47 +02:00
David Cassany
475a5ab526 Handle rpm-check-signatures flag for each package manager
This commit adds support for the rpm-check-signatures flag, which
sets the package manager to verify or not each package signature.
By default KIWI assumes no gpg checks are done.
2017-05-15 19:38:53 +02:00
Marcus Schäfer
cec1512ba1 Additional container commandline options
Added --set-container-derived-from and --set-container-tag
commandline options which allows to overwrite the data set
in the XML configuration
2017-04-26 16:47:15 +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
0f68081211 Handle derived image as Uri instance 2017-03-13 20:20:24 +01:00
Marcus Schäfer
6cc0b2085d Flake cleanup for unit tests 2017-03-07 13:03:10 +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
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
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
d2c5f64434
Added support for package locking for zypper
Zypper supports the al (add lock) command which allows to ignore
a package in the dependecny resolution process. This is useful
to prevent installation of a package which was pulled in by e.g
a recommendation flag from the spec file. Packages marked to be
ignored are not handled for apt and yum right now. Using this
feature together with an unsupported package manager backend
results in a warning to the user
2017-02-01 11:14:32 +01:00
Marcus Schäfer
2411c3352d Added attributes element in volume type 2017-01-20 10:26:14 +01:00
Marcus Schäfer
760c88682f
Update container builder code to new schema layout 2017-01-09 11:30:01 +01:00
Marcus Schäfer
f549b03886 Added DiskFormatVagrantLibVirt class
Allow to build vagrant boxes for the libvirt provider
This Fixes #15
2016-12-12 11:27:19 +01:00
David Cassany
21dfce6595 Parse arch attribute as a comma separated list
This commit ensure that the arch attribute of each package section
is parsed as a comma separated list. This way, as in previous kiwi
versions, each package might be suitable for one or more specified
architectures.
2016-11-24 12:26:04 +01:00
David Cassany Viladomat
71d902e4dd Do not delete all repositories if there aren't repositories to import (#191)
This commit adds a tester method to check if there is any 
repository marked as imageinclude. The method is used to
execute import_repositories_marked_as_imageinclude
method only when it is actually needed.
2016-11-10 15:22:53 +01:00
Marcus Schäfer
f021b16fff
Added handling for rpm-excludedocs for zypper
In zypper zypp.conf can be setup to prevent the installation
of %doc marked items from rpm packages. The <rpm-excludedocs>
section in the kiwi XML description is used to provide this
functionality. So far this feature is only implemented for
zypper. References #133
2016-09-12 15:58:13 +02:00
Marcus Schäfer
9480518178
Fixup get_build_type_vmconfig_entries
Make sure we can rely on a list return even if no
machine section exists at all.
2016-08-23 16:38:19 +02:00
Marcus Schäfer
9ee697f87a
Add evaluation of machine's vmconfig_entry
As part of the machine section it is possible to setup a custom
entry which is stored in the machine configuration file. The
evaluation of such an entry for the vmdk (.vmx) config file
was still missing. This Fixes #122
2016-08-23 12:03:18 +02:00
Marcus Schäfer
08bbe74abc
Added --ignore-repos for build and prepare tasks
The option allows to ignore all repos configured in the
XML description. This allows to specify a complete set
of repositories via the commandline
2016-08-17 16:26:35 +02:00