Commit Graph

68 Commits

Author SHA1 Message Date
Marcus Schäfer
3220e357d3
Add schema upgrade opportunity for old schemas
kiwi files using a schema version < 7.4 are no longer supported
by kiwi >= v10.x.x. Thus this commit provides the required
XSL stylesheets to upgrade older schemas to v74 such that they
can be consumed by the latest kiwi version. The needed xsltproc
instruction is placed on the main page of the documentation.
2024-04-04 16:52:25 +02:00
Neal Gompa
7125211f9b
Switch to Poetry and use pyproject.toml definitions
This allows kiwi to be built, developed, tested, and installed
through Poetry. This also raises the minimum Python version to 3.9.
2024-03-06 09:28:26 +01:00
Marcus Schäfer
e19fb60f77
Apply changelog fixes by glob
Does not require Makefile changes when maintaining branches
2024-02-29 09:39:06 +01:00
Marcus Schäfer
03365689fb
Add changelog fix file for commit deb6ca
The commit used a wrong e-mail address which should not
land in the created changes file for the packaging
2024-02-28 17:12:33 +01:00
Marcus Schäfer
18347989dd
Drop PDF build of the documentation
The kiwi.pdf file as provided in the kiwi-man-pages package
was never really used by our users but comes with a huge
dependency chain to LaTex. We provide the documentation
online as well as converted to DocBook from where all other
formats could be derived. Thus there is no need for us to
produce an extra PDF document which is imho never consulted.
In addition to this change also the contributing chapter has
been reworked. Due to recent changes and drop of obsolete
components from kiwi as well as the effort to move the development
setup to poetry, there is only one non python tool needed
for the development of kiwi. The check for this tool has been
moved into the Makefile and all other checks formerly done
in the helper/install_devel_packages script were deleted.
2024-02-11 15:11:39 +01:00
Marcus Schäfer
c2766b23a6
Drop obsolete C tools from kiwi
For building custom initrd images kiwi provided some
optional helper tools. All these C written tools are
old and outdated and either not useful anymore or
replaced by other tools that are part of the distribution
matrix we support. Thus with the move to the next
major release those can go away. This also include the
package kiwi-tools which was used to provide them
2024-02-11 10:54:58 +01:00
Marcus Schäfer
600a6f97a6
Fixed call of tox for xdist
Passing arguments to modules called by tox has changed
its syntax
2023-07-25 13:38:50 +02:00
Marcus Schäfer
c4643ea15a Add dracut-kiwi-verity dracut module package
When building an image with an embedded verity hash via the
embed_verity_metadata="true" type attribute it is required
to setup the device map at boot time accordingly. The dracut
module in this commit provides the needed tooling as a
POSIX C implementation which is able to read the kiwi embedded
verityhash from the offset of the partition. Kudos goes to
Isaac True <isaac.true@canonical.com>

Co-authored-by: Isaac True <isaac.true@canonical.com>
Signed-off-by: Isaac True <isaac.true@canonical.com>
2023-03-16 11:09:57 +01:00
Marcus Schäfer
92ec2c0a49
Revert "Revert "Fix installation of man pages""
This reverts commit db7410f3c5.
2021-05-21 17:32:23 +02:00
Marcus Schäfer
db7410f3c5
Revert "Fix installation of man pages"
This reverts commit 286b26b5b6.
2021-05-21 17:01:26 +02:00
286b26b5b6 Fix installation of man pages
The generated source archive on PyPI has the man page files
in ./doc/build/man instead of ./doc/build/man/8.

Adjust the Makefile to use the correct path to install the
man pages.
2021-05-21 08:35:42 -04:00
Marcus Schäfer
a9d07d7b08
Prevent explicit man page compression
The manual pages are compressed by the packager tooling.
There is no need to do this ourselves
2021-05-17 14:39:29 +02:00
Marcus Schäfer
b0b74e5f7e
Fixed package build
The new version of sphinx puts manual pages into doc/build/man/8
when it was doc/build/man before. This breaks the Makefile target
to install the documentation. This commit updates the Makefile
to follow the change.
2021-05-16 16:10:18 +02:00
Marcus Schäfer
750261a056
Fixed install of bash completion
The kiwi completion was installed as kiwi-ng.sh below
/usr/share/bash-completion/completions. This is wrong
because the completion does not pick up files with
a suffix like .sh. This commit changes the completion
file to be installed as kiwi-ng without the suffix
and Fixes #1603
2020-11-03 18:04:22 +01:00
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
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
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
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
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
6ecc45f3f2
Allow --since|--until opts in update_changelog
In addition to create changelog information since the
latest date of a reference changelog, also allow to create
changelog information until the latest data of a reference
changelog
2019-03-13 15:58:31 +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
Marcus Schäfer
942ed7a8ee
Speedup the make build target
Activated the pytest xdist feature Dan added for the
make build target to speedup package creation
2019-02-22 17:11:00 +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
30eb5c165f
Create a custom setup.py clean command
The default `setup.py clean` command does not clean `dist` and
`*.egg-info` folders. This commit makes sure those are cleaned and
also ands a `setup.py clean` command in the `clean` Makefile target
2018-11-23 12:27:00 +01: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
e7987be802
Include PDF build of documentation to the package
Bundle a PDF version of the online documentation with the rpm package
build. Due to the complexity of getting a latex build environment into
the travis CI which does not take forever to install, the bundling of
a built PDF into the pypi archive has been skipped. Users installing
from pypi would need to install a latex env on their machine and
run make latexpdf from the installed bundle.
This Fixes #819
2018-09-24 17:31:07 +02:00
Marcus Schäfer
a891fbac60
Separate dracut module install by Makefile target
The dracut modules like kiwi provides it should not be part of the
default install target. If kiwi gets installed from source or via
pip all dracut code gets installed on that system which is unwanted
and in the worst case leads to boot trouble next time this system
rebuilds its initrd via dracut. Therefore an extra Makefile target
which is used in the spec of an rpm but not in the install target
of setup.py is provided in this commit.

As a consequence the installation from pip will not install any
dracut modules on that system which is intentional. Installing from
source requires to run make install_dracut which if called assumes
the caller knows what he/she does :)
2018-09-07 10:13:58 +02:00
233e6e2835 Use the versioned Python interpreter path to run build helper scripts
The kiwi build process mostly does the right thing in terms of executing
with the correct Python interpreter throughout the build process, with
the exception of the Makefile not correctly locating the versioned Python
interpreter executable path, and the bash completion generator being executed
using '/usr/bin/python' without regard for what the target environment was.

This is a problem when a build environment complying with PEP 394 as it
stands today does not have Python 2 installed, such as when kiwi is being
built as a Python 3-only package in Fedora. Thus, the Makefile has been
adjusted to not only correctly locate the versioned Python interpreter, but
to also execute 'completion_helper' with the correct interpreter.

Additionally, a trivial change to the shebang to 'completion_helper'
was made to be consistent with other Python-based build helper scripts.

This is part of the overall effort to eliminate the dependencies on
Python 2 in Fedora.

Reference: https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
2018-06-06 08:45:52 -04:00
Marcus Schäfer
2034baf63f Update tox setup
Add python 3.6 target and activate it for the travis
and the local make targets

Use major python version for the check(flake) and doc
targets where the interpreter minor version is not
primarily important

This references #641
2018-02-27 11:21:23 +01:00
Marcus Schäfer
6553936265 Deleted obsolete boot descriptions
The custom kiwi boot descriptions has been moved into
the kiwi-descriptions github repo and builds the compat
package kiwi-boot-descriptions from there. The build
of the boot image(initrd) is done by dracut and the
dracut module packages provided by kiwi. The classic
custom boot descriptions can still be used as alternative
method if the above package is installed. Related to
Issue #576
2018-02-14 18:42:49 +01:00
Marcus Schäfer
383187157a
Update build test image descriptions
Update to latest schema by auto conversion and delete use
of oemboot kiwi code by switching to dracut
2018-01-22 17:44:10 +01:00
Marcus Schäfer
030806f084
Fix and cleanup tox setup
Along with the cleanup of the tox setup also the workaround
using an older version of the py module has been fixed
2017-11-29 17:30:24 +01:00
Marcus Schäfer
f939de53be Added kiwi-live dracut module and package
Package dracut-kiwi-live providing kiwi-live dracut module
2017-09-06 09:53:18 +02:00
Marcus Schäfer
feb4f7a58b Added Makefile target obs_test_status
Call make obs_test_status and get an overview about the current
integration test builds and their status
2017-07-18 16:53:55 +02:00
Marcus Schäfer
80ba6e15c6 Search for python interpreter in path
Allow more flexible path spec to find python interpreter
2017-07-17 10:02:42 +02:00
Marcus Schäfer
e3c5868c1c
Cleanup use of python interpreter invocation
Prevent strict call of a specific version of the python
interpreter. All code has been written to work with py2
and py3 thus the venv environment setup should decide
what version a call of python is. Fixes #424
2017-07-14 11:25:23 +02:00
Neal Gompa
c6858d9162 Move man pages to correct section
The man pages were incorrectly written to section 2, which is for
syscalls. Since KIWI is an administrator's tool, it has been moved
to section 8.
2017-07-05 16:35:04 -04:00
Marcus Schäfer
afebd3897e Fix/workaround invalid xsd pattern translation
The data structures are auto generated by the generateDS
tool which works nicely except for the arch-name xsd pattern
used in the RelaxNG schema. For some reason the used regular
expression is translated by generateDS into a python
expression not matching the original expression from the
schema. The result is an invalid python warning message after
the schema has successfully validated the arch string.
The problem has been reported to the generateDS developer.

As long as their is no fix available in generateDS the
following workaround in kiwi applies: The original xs:token
pattern validation will be disabled on the generateDS
level and applies only to the schema. This Fixes #347
2017-06-01 11:37:35 +02:00
Marcus Schäfer
2b2bb847eb Make sure LICENSE and README got installed 2017-03-13 16:55:55 +01:00
Marcus Schäfer
557d29ac45 Setup package for multipython build
Build package for both python2 and python3
2017-03-13 09:48:18 +01:00
Marcus Schäfer
40f46c09d2
Dereference boot arch symlinks 2016-10-19 21:17:27 +02:00
Marcus Schäfer
041205c1ed
Fixed typo in build Makefile target 2016-10-19 20:35:51 +02:00
Marcus Schäfer
88fd8211d8 Package kiwi/boot/arch into sub archive
The sdist target runs into an infinite loop if installed via
pip. It seems the symlink files below boot/arch confuses
distutils
2016-10-18 23:52:05 +02:00
Marcus Schäfer
232716fc1b
Move to tar.gz as sdist target
PyPI is planning to support only .tar.gz in the near future.
See https://www.python.org/dev/peps/pep-0527. This Fixes #132
2016-08-25 16:05:57 +02:00
Marcus Schäfer
fbb8a03f89 Added pypi make target for upload
Please note an appropirate ~/.pypirc file and registered
user is required to upload
2016-06-01 15:32:38 +02:00
Marcus Schäfer
b77f4ba05f
Integrate git attribute setup to sdist command 2016-05-31 13:02:41 +02:00
Marcus Schäfer
69992390ee Create completion data at build time 2016-05-31 10:02:22 +02:00
Marcus Schäfer
8c60ef66c5
Move all build and install tasks to setup.py
In an effort to distribute kiwi on pypi it should not be
required to call make targets for a complete installation.
Therefore the compilation of the C tools as well as the
installation of the man pages and the bash completion
has been added to setup.py. The spec file to build an rpm
package has been changed to use setup.py exclusively
2016-05-30 19:07:49 +02:00
Marcus Schäfer
606b131d77 Set ident export-subst git attribute on version.py 2016-04-21 16:21:00 +02:00
Marcus Schäfer
545421f3ab Added make valid target to Makefile
make valid applies the latest XSLT processing to the boot
and test image descriptions
2016-03-18 11:21:06 +01:00