Commit Graph

451 Commits

Author SHA1 Message Date
Marcus Schäfer
374be7c042 Completion for grub bootloader configuration
The configuration files /etc/sysconfig/bootloader and
/etc/default/grub needs to be created/updated with the
relevant values regarding the bootloader setup done by
kiwi. This Fixes #226
2017-01-23 17:24:04 +01:00
Marcus Schäfer
5c5fb719ea
Apply volume attributes for btrfs and lvm
The chattr utility is used to apply file attributes
So far only the no-copy-on-write attribute can be
specified in a volume setup. If further attributes
are needed they will be added on demand
2017-01-20 16:00:59 +01:00
Marcus Schäfer
2411c3352d Added attributes element in volume type 2017-01-20 10:26:14 +01:00
Marcus Schäfer
88686d3253
Make sure there is a storage default setup on s390
Storage disks on s390 requires an information about the
type and the blocksize. In case these information is not
provided in the kiwi XML configuration, None was set as
value in the zipl configuration which lead to an error.
This commit provides default values for those parameters
2017-01-19 14:47:27 +01:00
David Cassany
6029c81a91 Fixup duplication of btrfs toplevel volume
If using root btrfs snapshot, the default toplevel subvolume is set to
/@/.snapshots/1/snapshot, thus all defined subvolumes are mounted
under that cusomized default subvolume. For the first time
subvolumes are mounted it is fine to include /@/.snapshots/1/snapshot
prefix as root is not yet set to that specific path, however in any
future mount this path prefix is not needed any more, as the root
get mounted in /@/.snapshots/1/snapshot by default. Fixes (bsc#1015549)
2017-01-18 14:29:29 +01:00
Marcus Schäfer
987ffd22e2
Added .coveragerc
Clearly indicate which source files are excluded from the
coverage report
2017-01-17 12:08:41 +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
3c7ba8b924
Auto update image descriptions to schema v6.5 2017-01-09 11:04:10 +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
Marcus Schäfer
e3bb8e77f1
Added check_volume_setup_has_no_root_definition
The root volume in a systemdisk setup is handled in a special
way. It is not allowed to setup a custom name or mountpoint for
the root volume. Therefore the size of the root volume can be
setup via the @root volume name. This check looks up the volume
setup and searches if there is a configuration for the '/'
mountpoint which would cause the image build to fail
2016-12-05 12:24:57 +01:00
Marcus Schäfer
9d575537eb Merge pull request #208 from SUSE/xml_extensions
Xml extensions
2016-12-05 10:09:06 +01:00
Marcus Schäfer
c7044da7d5 Merge pull request #210 from SUSE/disk_storage_add_offset
Including minimum volume size offset in disk size calculation
2016-12-02 16:10:38 +01:00
David Cassany
e50dfded7a Including minimum volume size offset in disk size calculation
This commit adds Defaults:get_min_volume_mbytes() to the disk size
calculation algorithm. This should be sufficient to hold fdisk
default offset when creating the first partition and also to hold
the LVM metadata.
2016-12-01 22:09:11 +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
35a77008af Merge pull request #206 from SUSE/grub_install_mountpoints
LVM volumes management during grub2 install
2016-12-01 09:45:50 +01:00
David Cassany
0cfcf2fb9a LVM volumes management during grub2 install
During the grub2 install process volumes were not mounted properly,
a proper mount order was not taken into consideration and LV device
information was not given by the method get_volumes in VolumeManger.
This commit forces the mount (and umount) operations to be done in
coherent order and also modifies the get_volumes method in order
to return the device associated to each volume.
2016-11-30 15:54:34 +01:00
Marcus Schäfer
6f4af3725b Merge pull request #204 from SUSE/kernel_name_fix
Kernel name fix
2016-11-24 13:48:10 +01:00
Marcus Schäfer
996d9f4abe
Fixed setup_disk_image_config in bootloader setup
The parameter for the uuid is not enough to handle all
supported disk geometries. If the disk has an extra boot
partition the bootloader setup must read the boot data
from the boot partition but must set the root for the
kernel cmdline to the root partition. Therefore the
interface needs to change and must provide both the
boot_uuid and the root_uuid in oder to allow the method
to setup the correct values
2016-11-24 13:29:08 +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
Marcus Schäfer
c3bad3f8f2
Fixup kernel name setup in disk builder
The Kernel instance is the only correct place to ask
for the kernel name. This class has the responsibility
to know information about the selected kernel. The
additional arch based assumption on the kernel name
in the disk builder were wrong. This fixes bnc#1011936
2016-11-24 10:39:10 +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
85b482acd6 Merge pull request #197 from SUSE/kernel_search
Fixed kernel name lookup
2016-11-22 08:58:52 +01:00
David Cassany
e1c85d631b No more hard links in result bundle
This commit changes the copy command of the result bundle task. Now
instead of creating hardlinks a relugar copy is performed. This way
we ensure that the bundled files will not be modified by
overwritting a linked file.
2016-11-21 18:44:46 +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
271a5f25af Fixup code smell for kernel name list
Iterating over only one list item doesn't need a loop
2016-11-21 09:12:31 +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
5a0587577d Merge pull request #196 from SUSE/vhdfixed_compression
vhdfixed images compression
2016-11-16 11:32:13 +01:00
Marcus Schäfer
ccabfd0ee1
Fixup btrfs property setup
The readonly property is set on the filesystem toplevel.
kiwi has set the toplevel before any property is set.
2016-11-15 21:58:51 +01:00
David Cassany
7504683b3d vhdfixed images result compression
This commit adds compression to the Result instance of the vhdfixed
disk. This concrete format is not compressed or dynamic, so that,
it makes sense compress them. Also this was the behavior in previous
kiwi versions.
2016-11-15 18:54:55 +01:00
Marcus Schäfer
87556d4ba1
Fixup mount_volumes in VolumeManagerBtrfs
It is required to mount the toplevel btrfs filesystem if
not already mounted, prior to mounting the subvolumes
2016-11-15 12:25:59 +01:00
Marcus Schäfer
893efe30ad Fixup creation of etc/default/grub config file
Only create the file if the base directory structure
in etc/default exists.
2016-11-14 14:24:39 +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
6d1841be50 Merge pull request #192 from SUSE/btrfs_grub_setup_fix
Btrfs grub setup fix
2016-11-10 11:25:05 +01:00
Marcus Schäfer
45d9a1eaa3
grub.cfg: Fixes for btrfs as rootfs
This addresses the following issues

* An image based on btrfs using the entire boot as a subvolume
  causes grub to be unable to find its config file. Thus kiwi
  now raises an exception in this situation

* Don't prefix the bootpath with the snapshot path if the
  btrfs root is placed in a snapshot. Instead the file
  etc/default/grub must be written/updated with the
  SUSE_BTRFS_SNAPSHOT_BOOTING variable set to true. Once
  this is done the bootpath is consistently set to /boot
  no matter which snapshot is active
2016-11-09 17:15:56 +01:00
David Cassany
7b4eca3e61 No need to mock Path.which
There is no need to mock Path.which as isoinfo binary from the
platform is needed to run the test, so better let the system look
for it, note that the binray can be located in the alternate
location (/usr/lib/genisoimage/) which is not part of the PATH.
In that particular case the iso_test would fail if we mock
Path.which.
2016-11-09 11:17:33 +01:00
Marcus Schäfer
0416849de3 Merge pull request #188 from SUSE/sat_solver_plugin
SAT solvable interface for package repository types
2016-11-09 09:56:50 +01:00
Marcus Schäfer
6f5873256f Merge pull request #187 from SUSE/vhdfixed_rename
vhdfixed format naming inconsistency
2016-11-08 20:13:25 +01:00
David Cassany
83c99ffcd0 Updated system size calculations test 2016-11-08 18:46:38 +01:00
David Cassany
c4fd7635fd Updated test for vhd-fixed subformat type 2016-11-08 18:40:51 +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
0e733c29a9 Implemented SolverRepositoryRpmMd
Add support for rpm-md repository types
2016-11-08 18:17:51 +01:00
Marcus Schäfer
2c14ee71de Implemented SolverRepositorySUSE
Add support for SUSE online and media repository types
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
2549437b4d Add repo_type info to Uri class
This allows to eliminate the repo_type from the paramter list
of the SolverRepository class, which then only needs an instance
of Uri
2016-11-08 18:15:38 +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
4ac554355d
Fixup root init with existing host cache
Creating a new root init with a shared location which already
provides directories of the system failed on init of those
directories. Only create the not yet existing directories
2016-10-31 15:18:28 +01:00
Marcus Schäfer
ca6b56d2f6 Merge pull request #174 from SUSE/cache-location-configurable
Cache location configurable
2016-10-27 16:43:45 +02:00
Marcus Schäfer
bde93e42d4
Fixup initial directory creation for new root
During testing of alternative cache locations an init
problem with the var/ directory was observed
2016-10-27 12:02:47 +02:00
Marcus Schäfer
12696b01b8 Merge pull request #173 from SUSE/attr_co_constraints
Attribute co-constraints based on image type
2016-10-26 14:40:59 +02:00
Marcus Schäfer
aa296716c8
Use docopt's default value feature for cache dir 2016-10-25 21:59:51 +02:00