Commit Graph

54 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
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
Marcus Schäfer
9e597e6a53
Adapt make flake target to changed tox target 2016-02-24 11:47:21 +01:00
Marcus Schäfer
bd0449bc49 Tox setup updates
Integrate with Makefile, delete pep8 target from Makefile,
use flake8, update travis script, delete coverage reference,
we want 100% anywhere
2016-02-24 10:24:08 +01:00
Marcus Schäfer
ef2fca16c1
Don't track root/usr/share/locale in boot images
The data there is now generated by the make po target
2016-02-23 12:25:37 +01:00
Marcus Schäfer
40e6308aa9 Port application from python 2.7 to 3.4
For new applications like this kiwi version and its use cases
it is better to base it on a more recent python version
2016-02-17 22:38:38 +01:00
Marcus Schäfer
2df90b0c34 Don't require python-Sphinx at build time
Sphinx is not available on all platforms and required only to
build the manual pages. Thus the make build target can build
the man pages and pack the result into the source tarball
2016-02-15 10:53:58 +01:00
Marcus Schäfer
474262413f
Added kiwi-boot-requires buildservice meta package 2016-02-12 21:17:06 +01:00
Marcus Schäfer
b2bb34f57f Fixed rpm package build 2016-02-09 17:30:22 +01:00
Marcus Schäfer
5494ce0915
Make man install target more stable 2016-02-06 14:16:39 +01:00
Marcus Schäfer
04020611a8
Include installation of man pages to spec file 2016-02-06 14:10:04 +01:00
Marcus Schäfer
131904e8aa Add kiwicompat to Makefile build and install target 2016-02-03 15:52:09 +01:00
Marcus Schäfer
8ce43af5b4 Prepare for package building 2016-02-02 23:26:17 +01:00
Marcus Schäfer
ed7be57e6e
Fixed Makefile target to build data structures
A change in kiwi/schema/kiwi.rnc triggers the build of the
schema rng version as well as an auto update of the data
structures via python's generateDS. The intermediate xsd
schema format is only relevant for the data structure
creation process
2016-01-12 10:38:53 +01:00
Marcus Schäfer
cd3ae5e3c5 Added __githash__ to version.py
Any time the version.py is changed and committed the git ident
will be reset by git. After a checkout of version.py the ident
will be updated in version.py to the git commit id of version.py
Whenever we relase a new kiwi version the process is as follows:

1. run bumpversion to set the version for the release
2. run tox to create the source tarball for the release
   We have to make sure tox calls a git checkout of
   version.py
2015-12-18 16:46:04 +01:00
Marcus Schäfer
65466ea8e7
Consolidate use of Makefiles for schema conversion
As we are going to switch to tox the Makefile setup should be
cleaned up. The make targets to build xsd and rng schemas has
been moved to the master Makefile
2015-12-17 15:46:58 +01:00