Commit Graph

52 Commits

Author SHA1 Message Date
David Cassany
9e8eb94d6d Support for layered docker images
This commit includes support for building layered docker. A new
layer is added on top of the base image referenced by `derived_from`
attribute.
2017-03-13 20:20:24 +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
eaac155067 Add extension validation and data access
If an extension section exists the xml data in this section
is validated against the RelaxNG schema which must be part
of the xmlcatalog for the used extension namespace. If the
data validates the method get_extension_xml_data can be used
to access the etree parse result for each of the extension
configurations
2016-12-01 10:45:17 +01:00
Marcus Schäfer
cab73318bc Merge pull request #200 from SUSE/solver
Solver
2016-11-22 09:46:56 +01:00
Marcus Schäfer
119e96dc8f Added Sat solver class
Added implementation for Solver class based on the SUSE
libsolv C library and the solv python binding
2016-11-21 12:02:01 +01:00
Marcus Schäfer
39d5db9881 Fixed kernel name lookup
Complete the list of kernel names for the lookup. Normally
the kernel package provides a symlink to the actual kernel
image file. However if the link does not exist we extend the
search to a collection of names for possible kernel images.
The new list now also covers kernel names as used for arm

Along with the change this patch also provides an option to
raise an exception if the kernel lookup did not find any
kernel, which is used for the get_kernel() request in the
dracut initrd system setup where it is mandatory to find
a kernel image.

This fixes bnc#1010874
2016-11-21 09:07:50 +01:00
Marcus Schäfer
cdac18a92c Implemented SolverRepositoryRpmDir
Add support for local rpm-dir repositories
2016-11-08 18:17:51 +01:00
Marcus Schäfer
ebeb43eea6 Implement SolverRepositoryBase
Base class and interface for building a SAT solvable from
a given repository
2016-11-08 18:17:51 +01:00
Marcus Schäfer
16fdb5d978 Initial structure to support SAT solvables
A SAT solvable can be used together with python-solv to implement
performant package solving tasks. This is the initial structure
to allow the creation of such solvable files from specified
repositories. We will support the repo types yast2, rpm-md and
rpm-dir in the first place.
2016-11-08 18:15:37 +01:00
Marcus Schäfer
c9c71f4dc5 Added kiwi image resize command
The image resize command allows to resize a disk image
and its optional disk format to a new disk geometry
2016-10-18 10:13:41 +02:00
Marcus Schäfer
de76321da7 Added resize_raw_disk method in DiskFormatBase
Allow to increase the disk geometry of a disk image file
in order to create free space on this disk
2016-10-18 10:08:05 +02:00
Marcus Schäfer
6a611b2e91
Fixed secure boot setup for iso media
Provide the shim loader and the shim signed grub loader in the
required boot path. Normally this task is done by the shim-install
tool. However, shim-install does not exist on all distributions
and the script does not operate well in CD environments from which
we generate live and/or install media. Thus shim-install is used
if possible at install time of the bootloader because it requires
access to the target block device. In any other case the kiwi
fallback code applies
2016-09-30 15:00:22 +02:00
Marcus Schäfer
7cee5f9d41
Refactor DiskBuilder class
The DiskBuilder class is able to build a disk its corresponding
format and the installation image to install this disk by using
the InstallImageBuilder. However all three tasks were handled
in a row which lead to the problem that resources like active
mount processes were still open when e.g the disk format is
created. The race conditions produced here lead to an undefined
state of the resulting disk format and/or install image. In
order to avoid this the DiskBuilder class has been refactored
in a way that each tasks is an atomic operation which is
freeing its resources after success
2016-09-23 21:46:39 +02:00
Marcus Schäfer
93fae352ab
Added docstring for KiwiDescriptionConflict 2016-08-10 21:38:20 +02:00
David Cassany
0fdd209e73 Command validation
This commit includes a validation in Command.run and Command.call
in order to verify the existance of the command before running it.
It case it is not found in the specified environment it raises a
KiwiCommandNotFound Exception.
2016-08-05 18:38:27 +02:00
David Cassany
6a93cb83c4 extending kiwi/archive/tar 2016-07-22 17:11:52 +02:00
Marcus Schäfer
1eb337049b Refactor profile for volume setup
Don't use volume names in bash variables. In addition that
removes the name limitations we had for volume names
Related to #39
2016-07-05 15:54:25 +02:00
Marcus Schäfer
30260cc496 Merge pull request #97 from SUSE/exceptions-doc-strings
Exceptions doc strings
2016-06-15 15:54:29 +02:00
Marcus Schäfer
8d0df28296
Grammar fixes for doc strings 2016-06-15 13:01:27 +02:00
Marcus Schäfer
9aea83a7c1 Add documentation for Exceptions 2016-06-15 10:19:04 +02:00
Marcus Schäfer
4ca75860e7
Handle XML per content or file more explicit 2016-06-14 11:53:43 +02:00
Marcus Schäfer
3b7c4217eb Add check_image_include_repos_http_resolvable
Runtime checker method to check if repositories marked
with the imageinclude attribute are using a publicly
available protocol
2016-04-29 14:30:15 +00:00
Marcus Schäfer
91afaad923
Be more flexible for isoinfo lookup
isoinfo can either be provided by the community package in
/usr/lib/genisoimage/isoinfo or by the mkisofs package from
J. Schilling in /usr/bin/isoinfo. kiwi should be smart enough
to lookup which tool is installed. /usr/bin/isoinfo will be
preferred
2016-04-19 10:07:21 +02:00
Marcus Schäfer
8e6812dcf6
Update inline API documentation 2016-04-11 15:09:26 +02:00
Marcus Schäfer
d8c8480fd4
Make sure import_description preserves archives 2016-03-24 16:00:48 +01:00
Marcus Schäfer
8fb633257b
Delete obsolete shim setup code from kiwi
Due to the use of shim-install the code in kiwi to setup
for secure boot is no longer needed
2016-03-09 18:33:16 +01:00
Marcus Schäfer
147c0706eb
Refactor grub2 bootloader installation
Make use of grub2-install to install the bootloader
2016-02-25 17:18:31 +01:00
Marcus Schäfer
bdd80502b8
Added result bundler 2016-02-15 00:08:55 +01:00
Marcus Schäfer
a7fb5649f5 Refactor internal boot image task
Make a factory out of the task and allow to have e.g
a dracut boot image task at a later point in time.
The BootImageBase class creates an interface for this
implementation. So far only BootImageKiwi is implemented
2016-02-11 11:19:57 +01:00
Marcus Schäfer
a1aab40cae
Added git like command completion
Provide a 'Did you mean' log message for unclear task names
2016-02-09 21:12:03 +01:00
Marcus Schäfer
ff09a80349
Allow alternative locations for grub installation
Different distributions install grub2 to different places.
Therefore kiwi should not use a fixed location but allow
to lookup grub data at several places
2016-02-09 15:28:06 +01:00
Marcus Schäfer
f2ff481bf2
Added support for kiwi --compat
The --compat call will trigger the call of the kiwicompat
tool written to support legacy kiwi commandlines. An example
could look like the following call:

    sudo kiwi --compat -- --build /my/description --type vmx -d /my/dest

Please be aware the -- is required to tell docopt to treat all
options as parameters
2016-02-04 15:06:56 +01:00
Marcus Schäfer
6a0292c958
Added fix_boot_catalog and relocate_boot_catalog 2016-01-27 12:36:44 +01:00
Marcus Schäfer
9fc642b1f8
Added BootLoaderInstallZipl class 2016-01-24 21:29:06 +01:00
Marcus Schäfer
ccdfc108da
Finished BootLoaderConfigZipl class and tests 2016-01-22 15:48:02 +01:00
Marcus Schäfer
1ede864322
Added BootLoaderConfigZipl class
The implementation is still unfinished
2016-01-21 17:06:19 +01:00
Marcus Schäfer
d7ded563f3
Added ContainerImage class
Factory plus implementation for docker
2016-01-19 11:53:34 +01:00
Marcus Schäfer
ae21222c61
Added ContainerSetup classes
Base and Factory plus implementation for docker
2016-01-18 16:59:58 +01:00
Marcus Schäfer
9c60b1f128
Added kiwi result task
Implementing 'kiwi result list' which marshal loads the
serialized result instance from a previous build and shows
the build results
2016-01-15 11:38:08 +01:00
Marcus Schäfer
8b056f9928
Started with LiveImageBuilder class
Added interface and required steps. tests and implementation
are missing and will follow
2016-01-10 19:12:58 +01:00
Marcus Schäfer
8b2a5690d1 Added archive builder 2016-01-10 14:46:29 +01:00
Marcus Schäfer
c081e364e5 Added DiskFormatGce class implementation 2016-01-04 13:15:40 +01:00
Marcus Schäfer
7ddb0ae86b
Added DiskFormat factory 2016-01-01 19:18:29 +01:00
Marcus Schäfer
660bd9ad28
Added DiskFormatVmdk class implementation 2016-01-01 19:07:19 +01:00
Marcus Schäfer
0bc56e824d
Added DiskFormatVhdFixed class implementation 2015-12-29 18:34:42 +01:00
Marcus Schäfer
b8192a6c45
Added DiskFormat base class
Also added implementation for DiskFormatQcow2.
More format classes will follow next
2015-12-23 12:57:54 +01:00
Marcus Schäfer
a724baf75e Add LuksDevice class and implementation
Also implemented luks support in DiskBuilder
2015-12-22 14:13:11 +01:00
Marcus Schäfer
05c3ccadcd Package check for packages marked for deletion
If none of the packages to become deleted are installed we
will raise an error, basically to force people to fixup the
image description
2015-12-21 12:18:53 +01:00
Marcus Schäfer
62c077e8ca
Added RaidDevice class
implementation in disk_builder
2015-12-14 17:31:55 +01:00
Marcus Schäfer
61ea327a4c
Added isolinux bootloader support 2015-12-09 10:39:21 +01:00