Commit Graph

49 Commits

Author SHA1 Message Date
Marcus Schäfer
aeda61e8a8
Added helper script to test status of test builds
build_status fetches information from obs about the status
of the integration test builds. It also allows an easy refresh
of the tests regarding content changes on git when called
with the refresh parameter: build_status refresh
2019-10-24 10:36:43 +02:00
Marcus Schäfer
56d82845d5
Fixed install_devel_packages helper
Missing libffi and enchant devel packages. Also deleted
trang since it's not provided by default in the distro
and optional
2019-10-23 16:01:27 +02:00
Marcus Schäfer
88efb42d5f
Update contributing chapter
Simplify the setup of a development environment and
update the documentation appropriately
2019-10-02 09:52:04 +02:00
Dan Čermák
b015b91679
Stop inheriting from object
This is no longer required in Python3
2019-08-22 15:43:27 +02:00
Marcus Schäfer
8b128bf8e4
drop py2 variant of kiwi from completion 2019-07-10 15:07:28 +02:00
Marcus Schäfer
ab59d4d217
Delete obsolete repository types
Deleted red-carpet, slack-site, up2date-mirrors, urpmi and yast2
from the allowed values list of the repository type attribute.
This Fixes #1029
2019-04-22 23:15:42 +02:00
Alberto Planas
0c095a98b1 Replace @staticmethod with @classmethod when needed
@classmethod are used in Python to represent methods that can
query and update the class (cls parameter). Is expected to be
used for metaprograming, or advanced techniques that require the
access to the class itself, before we have an instance.

@staticmethod are used to associate a function to a class. It will
not be have access to the instance (self) not the class (cls). In
other programming languages are known as class methods.

This patch replace all the @classmethod with @staticmethod when
there is not need to access to the cls parameter, because the
intention is to be used as normal functions.
2019-03-26 16:27:43 +01: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
518ab4027c
Add consistency check to update_changelog
Don't take commits into account that are older than the
given reference commit. This would destroy the chronological
order. Missing commits older than the reference can be
incorporated by rebuild_changelog_reference.sh
2019-03-14 11:30:44 +01:00
Marcus Schäfer
31667dc8f7
Abandon the bumpversion helper
The bumpversion helper script updated the reference file
with changes since the latest date of the existing reference.
However even though the two pieces are in chronological order
that does not mean that the concatenated version of those
is still in chronological order. Thus that helper is deleted
and a new helper rebuild_changelog_reference exists. That
rebuilds the entire reference file from the history and
makes sure it is in chronological order. The tool should
only be called if the chronological order of the total changes
information is violated which under normal conditions
does not happen
2019-03-13 16:01:06 +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
bfc2f81420
Fixed bumpversion helper
Make sure the commit for the changelog reference update
and the commit for the version bump have different
timestamps by sleeping 2sec between the two actions
2019-03-13 14:53:52 +01:00
Marcus Schäfer
1dba376d67
Added bumpversion helper
Script that also updates the changelog reference file
before the version bump. It's optional to use this but
it would be handy as the commit would show the rpm
changelog differences from one tag to the other
2019-03-13 09:59:47 +01:00
Marcus Schäfer
d701cdd3ca
Fixed code smells on completion_generator
Also update python interpreter to use for the completion
and the changelog helpers
2019-03-13 09:59:47 +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
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
d46326d0a8
Update schema version in free schema doc generator 2018-03-23 15:05:12 +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
2b582a3339
Update schema version in documentation 2018-01-17 10:22:34 +01:00
Marcus Schäfer
170bb9c2fa
Fixup schema version in chapter topic 2017-07-28 14:07:21 +02:00
Marcus Schäfer
070ec3cd83
Fixup helper/kiwi-boot-packages
Make sure the code also works in python2
2017-07-17 10:20:51 +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
Marcus Schäfer
de42149868
Delete unused data from schema docs processing 2017-06-29 11:06:41 +02:00
Marcus Schäfer
1d9ac070e8 Build schema documentation with Oxygen
Given there is a valid Oxygen license owned by the company
as described in https://www.oxygenxml.com/oxygen_scripting.html
the schema documentation can be created using Oxygen. This
commit allows building the schema docs with alternative
doc builders and in case of Oxygen would change the way the
schema docs are generated in the following way:

1. Install Oxygen and setup the license to activate the tool

2. Setup the KIWI development shell environment to export
   the schema_tool variable to point to the schemaDocumentation.sh
   script provided by the Oxygen installation

   export oxygen_tool=/path/to/Oxygen/schemaDocumentation.sh

3. In any case of a schema change manually call:

   tox -e schema

   This step was done before as part of the tox doc target
   but can't be done automatically because it would require
   a correctly licensed Oxygen installation in the travis
   environment. Thus the result data has to be part of the
   pull request

4. Build the documentation and review the result

   tox -e doc

5. Create the pull request
2017-06-29 10:38:45 +02:00
Marcus Schäfer
8c867eaae2
Add completion for versioned binaries
when installing kiwi via pip, no alternatives setup done
when installing via rpm will be performed. In order to
allow the bash completion to work also the versioned
binaries needs to be added in the completion script
2017-03-13 14:33:47 +01:00
David Cassany
2b83c803d5 Components of an Image Description section
This commit extends the doc/sources/workflow.rst documentation
by including details about config.sh and images.sh files.
2017-01-30 18:20:44 +01:00
Marcus Schäfer
5dacaad9cb
Adapt schema generator to rtd doc schema 2016-12-06 18:55:37 +01:00
Marcus Schäfer
aae06d011a
Prevent any type from attribute recursion
The schema parser to create the documentation run into
an endless recursion for the new k.any type. As any could
be anything there is not much do document for this type.
Thus it is now skipped from the traversal
2016-12-05 11:43:20 +01:00
Marcus Schäfer
f26a62ded9 Merge pull request #158 from SUSE/nitpicking_schema_parser
Modified few code lines to match landscape's quality standards
2016-10-07 15:51:00 +02:00
Marcus Schäfer
43114aa9ea Fix attributes_not_used helper script
The script is used to check which parts of the XML schema
are not used by the new (kiwi v8) version. The information
is helpful to find missing or obsolete attribute handling
in v8 vs. v7
2016-10-07 11:46:46 +02:00
David Cassany
57c0e12d17 Modified few code lines to match landscape's quality standards 2016-10-06 16:24:46 +02:00
Marcus Schäfer
2f7a957b7a Schema docs generation helper
A simple script to parse the RelaxNG schema that grabs relevant
information in order to produce autogenerated documentation from
the schema inline comments.
2016-09-12 16:31:48 +02:00
Marcus Schäfer
62b21ce449
Fixed changelog generator 2016-07-18 12:12:30 +02:00
Marcus Schäfer
75458c9e12
Fixed completion generator
In addition cleanup the main docopt definition
2016-05-26 00:33:13 +02:00
Marcus Schäfer
22bd4e4dcb
Fixed completion generator
complete for kiwi and kiwi-ng
2016-04-28 11:36:06 +02:00
Marcus Schäfer
7de75965ea
Move program name from kiwi-py3 to kiwi-ng 2016-04-19 11:02:43 +02:00
Marcus Schäfer
349d1a3387
Fixed completion generator
Some global options were missing
2016-03-09 12:16:04 +01:00
Marcus Schäfer
8fc71a4e34
Fixed completion generator
The generated completion code was confused by the -py3 in the
program name if used with kiwi-py3
2016-03-08 16:40:06 +01:00
Marcus Schäfer
1ab40fa33a
Continue Refactor into subpackage
Move task classes into tasks namespace
2016-03-08 16:21:00 +01:00
Marcus Schäfer
3c3ad79cfd
Sort output from helper/kiwi-boot-packages 2016-03-03 11:20:15 +01:00
Marcus Schäfer
9c2b77e0b5
Fixed helper/kiwi-boot-packages
Take care for packages marked for a specific architecture
2016-02-24 12:09:09 +01:00
Marcus Schäfer
066ad4d8de
Delete unused helper/run-pep8 2016-02-24 11:49:31 +01:00
Thomas Schraitle
4929c206aa Replace helper/coverage-check with coverage
Use --fail-under=99 option which fails for tests under 100%
2016-02-24 11:11:34 +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
13743b7ff5
Port helper tools to python3
Also fixes completion to correctly parse the toplevel --compat option
2016-02-18 11:40:51 +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
474262413f
Added kiwi-boot-requires buildservice meta package 2016-02-12 21:17:06 +01:00
Marcus Schäfer
8ce43af5b4 Prepare for package building 2016-02-02 23:26:17 +01:00
Marcus Schäfer
09daca60c0
KIWI - appliance builder next generation
a rewrite of the current kiwi from https://github.com/openSUSE/kiwi
2015-12-05 16:17:10 +01:00