Commit Graph

147 Commits

Author SHA1 Message Date
Marcus Schäfer
cc19266600
Cleanup setup.py
The way kiwi uses setup.py assumes that pip runs this script
like a spec file in rpm is processed. However this is not the
case given that pip implicitly creates a static zip file called
wheel which looses all the code logic done in setup.py. Therefore
setup.py should not contain code that needs to run at install
time. Of course this change comes with an effect which is that
the following files will not be available when installing kiwi
from pip:

* man pages: /usr/share/man/man8/...
* command completion: /etc/bash_completion.d/kiwi-ng.sh
* kiwi default config file: /etc/kiwi.yml
* package docs: /usr/share/doc/packages/kiwi-ng/...
  (kiwi.pdf, LICENSE, README)

kiwi stays fully functional without this information. It is
expected that the installation of kiwi as a service will
be done by a package and its package manager. When using kiwi
from pip it is designed to provide a python module but not
a complete user application. The way pip and wheels interact
with each other seems to demonstrate that pip is not a
package manager but more a python module manager.

This Fixes #1415
2020-07-03 10:27:57 +02:00
Marcus Schäfer
72dafb799f
Fixed spec file on bare word comparison
on e.g Fedora Rawhide rpm complains about bare word comparison
error: bare words are no longer supported, please use "..."
This patch fixes the spec template to respect this
2020-05-26 10:30:44 +02:00
David Cassany
10896ad2fe
Remmove any Recommends for CentOS7
This commit fixes the package spec for CentOS 7. In CentOS 7 there is no
support for weak dependencies. In 9792cea1 a recommended dependency on
gpg tools was included for all builds and this caused a failure for
CentOS 7. With this commit, the recommended dependency, is omitted for
any pre CentOS 8 distro.
2020-05-22 11:08:46 +02:00
David Cassany Viladomat
354fdee5a8
Merge pull request #1446 from OSInside/fix_apt_signing_keys_management
Fix signing keys management for APT
2020-05-18 14:29:42 +02:00
David Cassany
9792cea153
Include recommend for gpg tool 2020-05-18 12:18:05 +02:00
Marcus Schäfer
aba2505524
Fixed spec file
This patch is two fold. First the py2 version of kiwi was
dropped since py2 is EOL. To indicate that correctly on the
package level python3-kiwi has to obsolete python2-kiwi.
The other part of the change is a file conflict of the
files:

    etc/bash_completion.d/kiwi-ng.sh
    /usr/share/doc/packages/python-kiwi/README

which were provided by the kiwi-man-pages sub-package but
were moved to be provided by the main python3-kiwi package
now. On update of the package with an older version of
kiwi that maintains this files to belong to kiwi-man-pages
a file conflict at install time appears. To solve this
python3-kiwi now conflicts with kiwi-man-pages < %{version}
This Fixes #1413 and Fixes bsc#1168973 and bsc#1156677
2020-05-14 17:06:05 +02:00
Marcus Schäfer
65dfa6d02e
Merge pull request #1433 from OSInside/refactor_xml_bootloader_settings_format
Refactor xml bootloader settings format
2020-05-11 10:55:36 +02:00
Marcus Schäfer
feaf6b0863
Refactor setup of bootloader parameters
The bootloader settings are handled through attributes in the
type element. Over the years some attributes were added and
there are requests for more settings. Therefore the bootloader
setup deservers its own section. With this commit the schema
changes from v7.1 to v7.2 and moves bootloader, bootloader_console
boottimeout and zipl_targettype into a new bootloader subsection
below type. The commit also adds an auto transformation template
such that customers don't have to change their image descriptions.
This is related to Issue #1401
2020-05-08 13:30:43 +02:00
David Cassany
feb574a913 Adding support for Pacman package manager
This commit adds support for pacman package manager and, in
consequence, support for Arch Linux images. It also adds
the package definition for Arch Linux.
2020-05-03 16:18:02 +02:00
Marcus Schäfer
9cc39a8f4b
Fixed spec file header information
Fixed copyright date/company and url path to project
2020-04-28 14:30:40 +02:00
David Cassany
4aef8543f3
Add kpartx dependency on dracut-kiwi-oem-dump package
This commit adds a missing dependency on dracut-kiwi-oem-dump
package. In images where The `kpartx` tool is missing the
dracut-kiwi-oem-dump was not applied for the initrd.

Fixes #1364
2020-03-13 16:26:41 +01:00
Marcus Schäfer
b0eeff6067
Turn btrfs requirement into a recommend
Only on suse systems btrfs is eligable to be a required package
because it's the default filesystem of that distribution. In any
other case it should be a recommended package. As a side effect
of this change we will be able to activate the CentOS-8 build
target
2020-02-18 10:22:06 +01:00
Al
ad33c037dc Split kiwi-dump into 2 modules to allow inserting a module after the image dump and before system reboot 2020-02-11 10:04:19 -08:00
10d7e51bef
Merge pull request #1310 from OSInside/use_tftp_system_user_package
Start using tftp system user package
2020-01-20 07:53:17 -05:00
David Cassany
2ef9f6d04f
Start using tftp system user package
With this commit we start requiring tftp system user package. This
user was created and managed by multiple packages before, with the
risk of having inconsistent criteria on its defaults. Now there there
a system user package so whatever package that requries this user should
just require this package and do not create or modify the tftp user.

Related with bsc#1143454
2020-01-15 15:19:04 +01:00
Marcus Schäfer
550cccdbea
Refactor kernel version lookup
For the lookup of the kernel version kiwi provided a small
C program that reads the first bytes of the kernel binary
and extracts the version information. Given the various
compression formats and also the problem of kernel files
that contains the decompressor code which could be anything
it has turned out to be difficult to provide a stable tool
to read the version from the binary. Therefore the code in
kiwi was refactored to read the version via regexp match
from the filename which also makes kversion an obsolete
tool. This Fixes #1308
2020-01-11 22:31:02 +01:00
4af6507201 Exclude 'Recommends: kiwi-man-pages' for EL7 and older in the spec 2019-12-06 11:13:27 -05:00
Marcus Schäfer
2532202a7a
Fixed scope of kiwi-man-pages sub package
The kiwi-man-pages package provided data that belongs to
the main package, e.g the completion as well as the
license information. In addition kiwi-man-pages should
not be a requirement.
2019-12-06 16:28:32 +01:00
Marcus Schäfer
50511367a2
Add default /etc/kiwi.yml file
Provide a comment only etc/kiwi.yml file that contains all
parameters we support so far including a short description
This Fixes #1232
2019-10-28 16:44:27 +01:00
David Cassany
129e86c3c6
Use kiwi-ng and kiwicompat as console_scripts
This commit instead of installing kiwi-ng-3 and kiwicompat-3 as
console_scripts it makes use of kiwi-ng and kiwicompat. Then all others
are created as symlinks at rpm level in spec.

Fixes #1226
2019-10-15 15:08:07 +02:00
Marcus Schäfer
1843b9d0d0
Flexible use of linuxefi module
Not all distributions provides the grub linuxefi module anymore.
This means a static list for building an efi grub image if needed
is no longer appropriate. This patch changes the module handling
at the following places

1. Use linuxefi for building custom efi modules only if present
   on the host system

2. Use linuxefi related grub2-mkconfig variables only if the
   host grub2-mkconfig implementation supports it

3. Prevent building custom efi image on Fedora by extending
   the search path for the distro provided efi image and also
   adapt the spec file accordingly
2019-10-09 17:04:23 +02:00
Marcus Schäfer
641514c7d1
Do not require multipath in dracut-kiwi-oem-dump
Installation of multipath tools triggers storage devices
to be handled as multipath maps in dracut. If the deployment
happens in a non multipath system those devices do not exist
and the system later hangs in the dracut initqueue waiting
for mapper devices that never appears
2019-09-12 15:32:50 +02:00
629f5b4803 Fix the pyxattr dependency to allow kiwi to function
Most Linux distributions offer the pyxattr module, including
openSUSE Tumbleweed. Going forward, we will use the pyxattr
module by default as a dependency and only switch back to the
other xattr module when on older SUSE Linux distributions that
lack the pyxattr module.

Note that because kiwi uses setuptools to create the CLI entry
points, kiwi checks the Python dependencies before executing,
so we change the dependency in the setup.py accordingly so that
it will not fail to start.
2019-07-20 10:43:08 -04:00
Marcus Schäfer
527e8f4ce9
Update spec file requirements for xattr
On suse systems the python-xattr module is used. On any other
distribution the python-pyxattr module is used. This commit
modifies the spec file to reflect the Requires tag appropriately.
On CentOS there is currently no pyxattr build available. Thus we
provide that package for this target in the KIWI Staging area
at Virtualization:Appliances:Staging. There is an ongoing effort
to bring pyxattr to EPEL which would make it available on CentOS
and would obsolete the custom build we did.
2019-07-19 16:42:47 +02:00
Marcus Schäfer
583b2313f6
Fixed spec for use with Recommends
The Recommends tag is not known by CentOS/RHEL < v8
2019-07-12 08:40:09 +02:00
ec57224522 Simplify packaging and re-add support for building for CentOS 7 2019-07-10 06:26:37 -04:00
Marcus Schäfer
1566750242
Drop support for python2
Python2 is announced to be unmaintained from Jan 2020.
KIWI supports Python 2.7 and it should not support any python version that
is not maintained upstream. This Fixes #1036
2019-07-10 11:58:57 +02:00
Marcus Schäfer
de2813de38
Fixed spec file requirement list for arm on Fedora
The package u-boot-tools is named uboot-tools on Fedora and RHEL
2019-07-02 11:56:02 +02:00
Marcus Schäfer
640284f48c
Refactor incremental changelog update
The creation of the package changelog is based on a reference file.
However that reference file contained log information in a specific
timezone which requires to hardcode the region of that timezone
in the code to correctly run date/time calculations. This can
be done better from a conceptual point of view. This patch changes
the handling in a way that the reference file is a git log
excerpt including the dates as git log lists them. The dates
contains complete numeric time/date/zone information and can be
used for calculations. The changelog helper tool converts the
result data to match the requirements of rpm changelog files
and prints the time/date information localized to the callers
timezone or as UTC if the --utc switch is given. By default the
user local timezone settings applies. That way the setup of
the local timezone is immaterial to the changelog processor
and the workaround in the gitlab-ci rpm stage can be deleted
too.
2019-03-15 20:56:19 +01:00
Marcus Schäfer
a11c5d37e0
Update changelog reference 2019-03-13 15:53:15 +01:00
Marcus Schäfer
c473cc0fdc
Update changelog reference 2019-03-13 14:55:04 +01:00
Marcus Schäfer
c9c31abc53
Update changelog reference 2019-03-13 14:34:08 +01:00
Marcus Schäfer
326efed73f
Update changelog file
Fix changelog entries for their encoding, author name and format
Also make sure commits are shown in reverse chronological order
of the author date. We intentionally don't use the commit date
because a commit can be older than the latest entry in the current
reference file and would then not be part of the git log
information
2019-03-13 09:26:40 +01:00
Marcus Schäfer
64bb2694f6
Introduce better changelog handling
The current way of creating the changelog file for the package
is based on reading the entire history of the git repository and
turns that information into a changelog. The downside of this
approach is that any change in the code that creates this changelog
information will impact older entries and could cause a conflict
on the changes file of the released package. This usually leads
to declined package submissions and blocks us in fixing bugs
in the changelog generator. This commit changes the process in
a way that only changes related to the oldest entry of a reference
changelog file compared to the current branch are taken into
account. This Fixes #979
2019-03-13 09:26:40 +01:00
Dan Čermák
0936db8fc1
Extend the GitLab-CI pipeline
- build the documentation in the build_doc stage
- run tests for all supported Python versions in tox_check
- build an RPM for Fedora 29 & OpenSUSE Tumbleweed in RPM stage
2019-03-12 12:29:56 +01:00
f0392f4b16 Ensure DNF is installed for kiwi itself and the test CentOS 7 appliance
In e33f53aa45, we switched to DNF when requesting YUM.
This now means we need to ensure DNF is installed for images where
we previously used YUM for that.
2019-03-01 08:48:44 -05:00
e33f53aa45 Rework package manager selection to use DNF when YUM is requested
YUM v3 is no longer developed, having been superseded by DNF for
several years. With DNF now available as a usable package manager
in Red Hat Enterprise Linux 7 through the Extras channel and
SUSE Linux Enterprise 15 through PackageHub, there is no reason for
keeping support for YUM v3 around.

We are keeping support for requesting YUM because in Red Hat Enterprise
Linux 7, DNF is referred to as "YUM v4", and it is simply referred to
as "YUM" in Red Hat Enterprise Linux 8. To avoid confusion from people,
we're just going to leave it in place as an alias to the DNF package
manager.

As for why this is happening now, Fedora is retiring YUM v3 in
Fedora 31, so we might as well get it over with and cut over now.

Reference: https://fedoraproject.org/wiki/Changes/Retire_YUM_3
2019-02-28 15:09:21 -05:00
Marcus Schäfer
9c0855753a
Fix package conflict for completion file
The completion can only be provided by one package if not
python version specific completion files are provided. Due
to the fix in #920 the completion file must be provided by
another sub-package. This commit moves it to the
kiwi-man-pages package. Actually kiwi man pages provides
more than just the man pages, but also the PDF documentation
and I think the completion information serves the purpose of
documentation to some degree too.
2019-01-24 11:27:48 +01:00
Marcus Schäfer
eb4076bdaf
Fixed file name of completion file
The bash completion file must match one of the alternatives links.
Otherwise the bash completion mechanism will not match. kiwi-ng is
the unique alternative link name compared to the still present
legacy kiwi version and should be used preferably
2019-01-24 09:32:44 +01:00
David Cassany
daab92ae05
Add parted dependency for dracut-kiwi-live package
dracut-kiwi-live requires `partprobe` tool and this is provided by
parted package. Persistent overlay setup fails if parted is not
installed in the image.
2018-11-19 11:19:36 +01:00
David Cassany
5de35d1733
Fix spec to better support Debian and Ubuntu builds
This commit fixes the spec to properly build for Debian and Ubuntu.
More specific:

* update-alternatives path has been adapted
* python3-kiwi are now enabled for Debian 9 and Ubuntu 18.04
2018-11-15 17:07:33 +01:00
Marcus Schäfer
733012c5a1
Make gfxboot a recommended package
gfxboot is needed on the host for certain boot graphics
operations. It's used if the boot theme provides a gfxboot.cfg
In this case the tool is also required. The setup of the
boot themes is differently implemented in each of the
distributions we support. In addition on suse distributions
gfxboot is no longer in the core system. Given that we are
not able to find a common base on requirement of the package
we changed gfxboot from a required to a recommended package
and deleted the requirement on debian based distros
2018-11-12 11:37:35 +01:00
Marcus Schäfer
a1be962200
Use %{ix86} rather than %ix86 in spec template
Clear macro annotation prevents clarity issues
2018-10-19 08:51:47 +02:00
Marcus Schäfer
65c7d71c07
Fixed spec file for gfxboot requires
Require gfxboot but only for the x86 architecture
2018-10-18 17:58:36 +02:00
Marcus Schäfer
8220b6f582
Delete obsolete rhel/fedora doc move
With the fix to use the rpm macro consistently it
is no longer required to move around the docs
2018-10-11 17:35:54 +02:00
Marcus Schäfer
ebe2e746e7
Merge pull request #841 from SUSE/fix_pdf_doc_installation
Fixed package doc install target
2018-10-11 17:12:55 +02:00
Marcus Schäfer
f1042730cb
Fixed package specs for dracut modules on fedora
dracut-network is a separate package on Fedora/RHEL too
2018-10-11 16:03:32 +02:00
Marcus Schäfer
e64ccbe74c
Fixed package doc install target
The spec file uses the %{_defaultdocdir} macro but the
corresponding Makefile target used a hardcoded path which
lead to inconsistencies on debian/ubuntu based systems.
This Fixes #838
2018-10-11 15:29:20 +02:00
Marcus Schäfer
9eaebb15c3
Fixed package specs for dracut modules on debian
btrfs tools are provided by btrfs-tools package and not by
btrfs-progs. In addition dracut-network is a separate package
on debian/ubuntu based distributions. This Fixes #837
2018-10-11 15:04:48 +02:00
Marcus Schäfer
9df816c064
Don't require gfxboot on rhel/fedora 2018-10-09 12:28:46 +02:00