Commit Graph

547 Commits

Author SHA1 Message Date
Neal Gompa
808a92ffe1 Add support for excluding packages when using DNF 2017-04-27 17:32:22 -04:00
Neal Gompa
e2d6642637 Add support for excluding packages when using Yum 2017-04-27 17:32:03 -04: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
Marcus Schäfer
9487a189ed Implement obsrepositories source on derived_from
The following reference to a derived container:

    obsrepositories:/container#latest

Will be translated into the following buildservice
local path:

    /usr/src/packages/SOURCES/containers/_obsrepositories/container#latest
2017-04-25 17:48:16 +02:00
Marcus Schäfer
f58d96ea6c Implement obs source on derived_from
The following reference to a derived container:

    obs:/project/repo/container#tag

Will be translated into the following buildservice
local path:

    /usr/src/packages/SOURCES/containers/project/repo/container#tag
2017-04-25 17:48:16 +02:00
David Cassany
38dbd7e76d Include '--delete' in OCI images DataSync
This commit includes #310 patch for OCI images.

It also corrects the end of line format for kiwi/container/docker.py
and test/unit/container_image_docker_test.py, so flake tests are all
green.
2017-04-24 12:29:44 +02:00
David Cassany Viladomat
269a220998 Merge branch 'master' into OCI_images_support 2017-04-24 12:18:53 +02:00
Marcus Schäfer
17cc60cede Merge pull request #301 from SUSE/enable_clearing_docker_commands
Add clear attribute for entrypoint and subcommand sections
2017-04-24 12:11:24 +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
d4a3b0b696 Merge pull request #305 from Conan-Kudo/nodeletingrepos
Do not purge the repositories before inserting them
2017-04-24 11:53:42 +02:00
Marcus Schäfer
85bb0345f5 Merge pull request #310 from SUSE/add_delete_flag_in_dervied_sync
Include --delete flag in DataSync for docker images
2017-04-23 10:04:01 +02:00
Marcus Schäfer
4b6b985724 Merge pull request #302 from SUSE/support_for_weak_and_strong_dependencies
Support for weak and strong dependencies
2017-04-23 09:58:26 +02:00
David Cassany
5d79d1580f Include --delete flag in DataSync for docker images
This commit includes the --delete flag in order to synchronize the
docker images. This is relevant for derived images where the new
layer might not only add files, but also remove something from the
base image.

Fixes #309
2017-04-20 12:55:24 +02:00
David Cassany
c35f9f3b23 Add support for OCI images
This commit adds support for OCI images. Most of the docker related
code is reused for OCI classes and Docker classes have been refactored
so now they are a splecialization of the OCI classes. It is done this
way since KIWI internally only uses OCI format to operate with
containers, therefore docker images just differ from OCI images by
the way they are packaged or unpackaged.
2017-04-19 16:44:33 +02:00
Neal Gompa
47b799b261 Do not purge the repositories before inserting them
There are no good reasons to be purging the repo directories, especially
when it is common for some distributions (Red Hat/CentOS/Fedora, for example)
to ship repository configuration as packages. Deleting them puts the package
manager in the system into a weird state, so we want to avoid this.
2017-04-13 22:12:41 -04:00
Neal Gompa
5af6981815 Fix default reposdir path for Yum 2017-04-13 18:18:20 -04:00
David Cassany
d521f8af54 Add require/recommend installation support for yum
This commit adds support to install required only or required plus
recommended packages using yum as the package manager.
2017-04-12 16:42:28 +02:00
David Cassany
6eeced1010 Add support for required/recommended packages
This commit enables support to install only required packages
or install required plus recommended packages.
2017-04-12 16:42:15 +02:00
David Cassany
0d0fd33a42 Include 'plusRecommended' management for dnf
Add support to enable/disable installation of recommended packages
for dnf package manager. With this commit 'plusRecommended'
patternType triggers on installation of recommended packages, which
is turned off by default.
2017-04-12 16:42:05 +02:00
Marcus Schäfer
7e24c41ecc Merge pull request #300 from SUSE/make_sure_apt_is_updated_before_install
Make sure debian repositories database is populated before install
2017-04-12 14:08:55 +02:00
David Cassany
d4681841e7 Make sure debian repositories database is populated before install
This commit includes an 'apt-get update' call before any 'apt-get
install' command. This way the packages database is always ready,
even if no bootstrap procedure has been executed.
2017-04-11 16:12:11 +02:00
David Cassany
cc5da88c73 Bypass bootstrap procedure if no bootstrap packages section
This commit updates kiwi to bypass bootstrap procedure in case
there is no bootstrap packages section.

It also adds extra validation in root_bind.
2017-04-11 16:02:27 +02:00
Marcus Schäfer
8459843b2a Merge pull request #295 from SUSE/fix_plus_recommended
Add method to setup installation of recommended packages
2017-04-10 19:08:28 +02:00
Marcus Schäfer
a83c78bc0e Merge pull request #294 from SUSE/handle_unknown_uris_for_derived_images
Added support for unknown uri types for base image references
2017-04-10 19:07:41 +02:00
David Cassany
19bf90073a Add warning logs for unkown base image URIs 2017-04-10 18:12:52 +02:00
David Cassany
1f05b212b3 Add method to setup installation of recommended packages
With this commit package manager are always set to include only
required packages or set to include required and recommended
packages.

This commit fixes #285
2017-04-10 15:28:10 +02:00
Marcus Schäfer
de7ee77b84
Follow up fix for grub2 setup in live builder
The live iso builder still used a fixed boot/grub2 path
but due to the refactoring this path is now distro dependant
and should be obtained dynamically
2017-04-10 15:04:33 +02:00
Marcus Schäfer
5e91259a74 Merge pull request #292 from SUSE/keep_base_image_in_OCI_format
Keep imported image in OCI format instead of docker
2017-04-06 15:49:43 +02:00
Marcus Schäfer
883aaf3bf4
Fixup grub2 bios module setup
Only copy grub2 bios modules if the architecture supports it
2017-04-05 11:21:06 +02:00
Marcus Schäfer
44ba8803c8 Merge pull request #291 from SUSE/no_grub_distributor_setup
Avoid GRUB_DISTRIBUTOR setup in etc/default/grub
2017-04-05 10:21:03 +02:00
Marcus Schäfer
58a477e461 Merge pull request #290 from SUSE/no_prefix_if_displayname_is_set
Fixup bootloader menu title setup
2017-04-05 10:20:42 +02:00
Marcus Schäfer
295a7faaf3 Avoid GRUB_DISTRIBUTOR setup in etc/default/grub
The GRUB_DISTRIBUTOR information can't be provided in a generic
way for all distributions. The information should be either placed
by a package post script (as done by most of the distributions)
or by a custom kiwi config.sh or images.sh script. Fixes #286
Fixes (bsc#1032119)
2017-04-04 16:54:49 +02:00
Marcus Schäfer
20d12a18c2 Fixup grub2 setup and tool calls
Depending on the distribution the grub tools are either named
grub2-tool or grub-tool. Additionally the grub configuration
data is expected to live in boot/grub2 or boot/grub. This commit
handles the tool calls and also the grub boot directory setup
in a generic way
2017-04-04 16:17:31 +02:00
David Cassany
0438183ae2 Added support for unknown uri types for base image references
This commits bypasses any URI check if the uri schema is unknown in
RootImport class. This way the URI is bypassed to skopeo if it couldn't
be translated to any known type. That enables referencing images with
any URI supported by skopeo, i.e. DockerHub images.
2017-04-04 16:08:43 +02:00
David Cassany
0fda4f84b3 Keep imported image in OCI format instead of docker
Kiwi always uses OCI format for container manipulations, so it is
easier to assume the image kept between prepare and create step
is also in OCI format, this way less format convertions are needed.
2017-04-04 15:34:10 +02:00
Marcus Schäfer
d85e0899e3 Fixup bootloader menu title setup
If the menu title is setup via the displayname attribute in
the XML configuration, kiwi should not change this text by
a prefix or any other style adaptions. Fixes #287
Fixes (bsc#1032118)
2017-04-04 12:01:05 +02:00
Marcus Schäfer
c2a8435107 Merge pull request #281 from SUSE/grub_theme_setup
Fixup theme setup in boot
2017-03-30 10:29:25 +02:00
Marcus Schäfer
10917a588f Merge pull request #280 from SUSE/refactor_lock_vs_skip_request
Refactor method name of package manager interface
2017-03-29 17:46:26 +02:00
Marcus Schäfer
afe9d42d2e
Fixup theme setup in boot
Make sure grub theme data is populated in the boot directory.
Checking only for the presence of the theme directory is not
enough. If the theme directory in boot does not contain the
requested theme it must be provided including a warning if
the theme data could not be found in the system
2017-03-28 14:23:05 +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
4a0d1e9add Do not change the API in an incompatible way 2017-03-28 11:19:28 +02:00
Marcus Schäfer
9d2878a132 Use request_package_exclusion method in prepare 2017-03-28 11:19:28 +02:00
Marcus Schäfer
44d38c9997
Refactor method name of package manager interface
The request_package_lock was renamed into request_package_exclusion
because that is the goal, to actually exclude(skip) a package. From
an implementation point of view this is done to set a lock in the
zypper case. However other package managers might do it differently.
The interface should stay consistent with regards to the user goal
and not with the package manager specific implementation. This
Fixes #248
2017-03-27 15:19:14 +02:00
Marcus Schäfer
28e0656345
Delete no longer needed btrfs bootpath setup
The adaption of the bootpath in the grub.cfg file with regards
to the btrfs toplevel volume named '@' was the wrong solution.
The fixes in the btrfs filesystem setup and the config files
etc/default/grub and sysconfig/bootloader caused the grub
toolchain to work properly. This Fixes (bsc#1030038)
2017-03-27 10:28:12 +02:00
Marcus Schäfer
9445456192 Merge pull request #278 from SUSE/turn_to_absolute_paths
Convert user input to absolute paths
2017-03-24 21:33:26 +01:00
David Cassany
b3932de0a0 Convert user input to absolute paths
This commit converts the paths provided by the user with the
command line to absolute paths. The effected arguments are:
* --root
* --target-dir
* --bundle-dir

This supersedes and fixes #271
2017-03-24 17:24:13 +01:00
Marcus Schäfer
e16dc8702b
Support editbootconfig also for the iso type
This Fixes #274
2017-03-24 11:09:54 +01:00
Marcus Schäfer
c8304d0fb6
ensure grub.cfg exists in EFI path for iso images
For live and install iso image boot configurations the
bootloader configuration must also exist in the EFI boot
path
2017-03-23 18:16:07 +01:00
Marcus Schäfer
88525f981c
Throw a proper exception on missing boot reference 2017-03-22 15:00:32 +01:00
Marcus Schäfer
08275454e9 Fixed checksum file creation
If the checksum should be created from a compressed file
it is expected that the checksum of the uncompressed file
is added to the checksum file. This is because in a pxe
deployment the uncompressed version of the file is put
on disk and compared with the reference information in
the checksum file
2017-03-21 17:41:31 +01:00