Commit Graph

251 Commits

Author SHA1 Message Date
Haibo Lin
65aa8fde2f Fix other flake8 complaints
E231 missing whitespace after ','
E265 block comment should start with '# '
E266 too many leading '#' for block comment
E302 expected 2 blank lines, found 1
E501 line too long (115 > 88 characters)
E713 test for membership should be 'not in'
E722 do not use bare 'except'
F812 list comprehension redefines 'g' from line 1499
F821 undefined name 'cmp'
F841 local variable 'ex' is assigned to but never used

JIRA: COMPOSE-4108
Signed-off-by: Haibo Lin <hlin@redhat.com>
2020-02-07 16:14:09 +08:00
Haibo Lin
c0193c9fca Fix flake8 complaints - E501
E501 line too long (92 > 88 characters)
E501 line too long (103 > 88 characters)
...

JIRA: COMPOSE-4108
Signed-off-by: Haibo Lin <hlin@redhat.com>
2020-02-07 14:36:46 +08:00
Haibo Lin
41a629969c Format code base with black
https://black.readthedocs.io/en/stable/

JIRA: COMPOSE-4086
Signed-off-by: Haibo Lin <hlin@redhat.com>
2020-02-05 17:35:47 +08:00
Haibo Lin
38142d30ba Format tests with black
JIRA: COMPOSE-4086
Signed-off-by: Haibo Lin <hlin@redhat.com>
2020-02-05 17:29:15 +08:00
Lubomír Sedlář
6f23c7b8ba 4.2.0 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2020-02-03 08:26:02 +01:00
Haibo Lin
3cf16eb42d cleanup: refactor scripts via entry points
Fixes: https://pagure.io/pungi/issue/1045
JIRA: COMPOSE-2946
Signed-off-by: Haibo Lin <hlin@redhat.com>
2019-12-10 10:53:31 +08:00
Lubomír Sedlář
0f53506765 Add version constraint to productmd dependency
This should be propagated to RPM level with F30+.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-12-06 09:49:01 +01:00
Lubomír Sedlář
ea2cd448a0 4.1.41 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-12-02 14:51:35 +01:00
Lubomír Sedlář
8829fc32ab 4.1.40 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-10-23 09:02:41 +02:00
Lubomír Sedlář
e814e1445a 4.1.39 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-09-09 09:30:45 +02:00
Lubomír Sedlář
46333b01ad 4.1.38 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-07-02 10:32:01 +02:00
Lubomír Sedlář
163d69713d 4.1.37 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-05-27 10:40:38 +02:00
Lubomír Sedlář
479d17c033 4.1.36 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-04-12 12:10:39 +02:00
Lubomír Sedlář
59a9c01304 setup: Fix missing comma in a list
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-04-03 10:25:46 +02:00
Lubomír Sedlář
724255a984 setup: Install some deps on Py2.7 only
Lockfile and dict.sorted are only used in pungi.gather module, which
does not work with Python 3 due to dependency on yum. There's no point
in always pulling in these two libraries there.

This change fixes issues with python dependencies generator that puts
python3.6dist(lockfile) into RPM requires.

For builds on Python 2.6 these libraries are actually needed, but there
are no generators on RHEL 6. So this change can only break development
on RHEL 6. And if someone needs to do that, they have bigger problems...

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-04-02 14:46:19 +02:00
Lubomír Sedlář
5f8b519941 4.1.35 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-03-26 10:03:26 +01:00
Lubomír Sedlář
31ef7736aa orchestrator: Monitor status of parts
When a phase is started or stopped, add a line to the to output. This
should help users keep track of what is happening in case the part takes
a long time to run.

JIRA: COMPOSE-3287
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-03-25 14:20:04 +01:00
Lubomír Sedlář
cc456d3e75 4.1.34 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-03-05 12:37:07 +01:00
Lubomír Sedlář
e21c49d9e2 4.1.33 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-02-13 10:37:48 +01:00
Miro Hrončok
3fe4beb20c Only require enum34 on Legacy Python
This resolves https://bugzilla.redhat.com/show_bug.cgi?id=1665501

Signed-off-by: Why Do You <enforce@this.qm>
2019-01-14 09:16:14 +01:00
Lubomír Sedlář
dbc0d5736c 4.1.32 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-01-08 12:17:29 +01:00
Lubomír Sedlář
90c60f8e64 Add script to orchestrate multiple composes
It may make sense to break a big compose into smaller chunks that can be
done independently. This script allows describing the smaller parts,
runs them with correct dependencies and arranges the result to look like
a single big compose.

All parts use the same koji event, that is either obtained from Koji, or
from command line argument.

JIRA: COMPOSE-2654
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2019-01-08 09:40:36 +01:00
Lubomír Sedlář
7c48b808f1 4.1.31 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2018-11-26 13:14:09 +01:00
Lubomír Sedlář
df35f26910 Add script to merge and dump multiple configuration files
The script can either take config from an existing compose, or load
files by path. By default it will perform full validation (and add
default values and resolved git references). This can be turned off.

The final JSON is printed to stdout.

JIRA: COMPOSE-3066
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2018-11-26 07:59:31 +01:00
Lubomír Sedlář
65a1779e3a 4.1.30 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2018-10-26 14:27:53 +02:00
Lubomír Sedlář
0c8702cd6d 4.1.29 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2018-10-10 12:51:04 +02:00
Marek Marczykowski-Górecki
2aeb8de459 Make sure .treeinfo file is sorted
OrderedDict used by default by ConfigParser isn't enough because order
of entries being added may not be deterministic (depends on directory
list order). To solve this problem, use SortedDict as a base.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
2018-10-08 13:33:29 +02:00
Lubomír Sedlář
21b8f3af3c 4.1.28 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2018-09-06 13:43:04 +02:00
Jan Kaluza
d2f392fac8 Use dogpile.cache to cache the listTaggedRPMS calls if possible
If the same tag is queried with the same event, Pungi can cache the
response and call the API again. Particularly for small composes this
can save up significant amount of time.

Merges: https://pagure.io/pungi/pull-request/1022
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2018-08-30 13:21:01 +02:00
Lubomír Sedlář
5be2798c6b 4.1.27 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2018-08-17 08:37:41 +02:00
Lubomír Sedlář
c8bd967a57 4.1.26 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2018-07-16 10:37:23 +02:00
Ondrej Nosek
420b744193 4.1.25 release
Signed-off-by: Ondrej Nosek <onosek@redhat.com>
2018-05-22 14:12:31 +02:00
Lubomír Sedlář
182a5a399b 4.1.24 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2018-05-02 14:16:44 +02:00
Ondrej Nosek
f3b5a66614 4.1.23 release
Signed-off-by: Ondrej Nosek <onosek@redhat.com>
2018-03-29 14:11:58 +02:00
Ondrej Nosek
f1f6ca74f1 4.1.22 release
Signed-off-by: Ondrej Nosek <onosek@redhat.com>
2018-01-24 10:11:30 +01:00
Lubomír Sedlář
25907f61ce 4.1.21 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-12-06 13:43:10 +01:00
Lubomír Sedlář
385002fe94 4.1.20 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-11-01 15:01:02 +01:00
Lubomír Sedlář
44c523339c 4.1.19 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-09-18 13:17:18 +02:00
Lubomír Sedlář
5379fb5e28 Check for correct string class
Use python-six and check against correct string class on both Python 2
and Python 3.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-08-28 14:31:09 +02:00
Lubomír Sedlář
c9d95f5f6f 4.1.18 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-08-22 10:22:27 +02:00
Lubomír Sedlář
c0bac63f4d 4.1.17 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-07-17 09:58:35 +02:00
Lubomír Sedlář
f7a9c77626 ostree: Add notification handler to wait for signature
This script can be used as a notification handler. For most messages it
does nothing, but when it sees a new commit in an ostree repo, it will
wait for a signature of the new commit to appear.

This is useful for building images later so that they include the
signature as well.

Fixes: https://pagure.io/pungi/issue/650
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-07-11 10:24:49 +02:00
Lubomír Sedlář
d3dd7aa7ce 4.1.16 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-06-09 13:12:19 +02:00
Lubomír Sedlář
e549c732a4 4.1.15 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-05-05 08:16:11 +02:00
Lubomír Sedlář
9784961568 4.1.14 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-03-27 18:04:26 +02:00
Lubomír Sedlář
8cc912c5aa Install new executable
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-03-24 09:24:49 +01:00
Lubomír Sedlář
ec67eac1cc Use enum for flags
This adds an extra dependency on python-enum34.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-03-24 09:24:49 +01:00
Lubomír Sedlář
36f57b26b8 Add scripts to compare YUM and DNF gathering
There are scripts to re-run depsolving with any backend based on config
and log file.

There is a new script to compare logs from two runs and report
differences. This script will be installed system wide in final RPM.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-03-24 09:24:46 +01:00
Lubomír Sedlář
4b90822115 Add a script for modifying ISO images
With this script it's possible to add additional files into an ISO file.
If the file happens to be ks.cfg, the boot configs are tweaked so that
the kickstart is actually used.

Resolves: #503
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-03-21 07:55:19 +01:00
Lubomír Sedlář
345308464f 4.1.13 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-03-03 14:34:45 +01:00
Lubomír Sedlář
d3e701e10f 4.1.12 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-01-18 08:07:42 +01:00
Lubomír Sedlář
20d035befa spec: Add a separate subpackage for extra utils
This subpackage currently includes:

 * pungi-config-validate
 * pungi-create-unified-isos
 * pungi-fedmsg-notification

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2017-01-04 10:22:20 +01:00
Dennis Gilmore
13c1c4da69 4.1.11 release
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-11-15 15:12:02 -06:00
Dennis Gilmore
b2b5dd919b 4.1.10 release
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-10-08 12:15:32 -05:00
Lubomír Sedlář
9a3b0f089e 4.1.9 release
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-09-21 14:07:21 +02:00
Lubomír Sedlář
f9a6c8418f Add JSON Schema for configuration
The schema is written in Python to reduce duplication. When
configuration is loaded, the validation checks if it's correct and fills
in default values.

There is a custom extension to the schema to report deprecated options.

The config dependencies are implemented as a separate pass. While it's
technically possible to express the dependencies in the schema itself,
the error messages are not very helpful and it makes the schema much
harder to read.

Phases no longer define `config_options`. New options should be added to
the schema. Since the default values are populated automatically during
validation, there is no need to duplicate them into the code.

The `pungi-config-validate` script is updated to use the schema and
report errors even for deeply nested fields.

The dependencies are updated: pungi now depends on `python-jsonschema`
(which is already available in Fedora).

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-09-01 10:56:15 +02:00
Lubomír Sedlář
d3b9ae79a5 [createiso] Remove unused script
The pungi-createiso script should have been removed in f37a14fb, but was
forgotten. The script is obsoleted by a new method in which ISOs are
created. It's now broken as it calls methods that no longer exist.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-08-30 10:28:18 +02:00
Lubomír Sedlář
a72a38b278 Add full Pungi version to log output
This should help with debugging by providing better information on which
Pungi version created the compose. In development, the version will show
output of git describe, in production it asks which version is installed
in site-packages/. The egg-info directory must be installed for this to
work.

It is no longer necessary to synchronize version in `setup.py` with
`pungi/__init__.py`.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-08-16 08:12:40 +02:00
Dennis Gilmore
fc23ca5fdf 4.1.8 release
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-08-10 07:21:40 -05:00
Lubomír Sedlář
f37a14fb60 [createiso] Use shell script for runroot
Instead of installing pungi itself in the runroot, we can prepare the
commands to be run on compose box, write the shell script into work/
directory, which is mounted in the chroot, and execute that. This way
there is no business logic in runroot (except for finding lorax
templates).

The main advantage of this approach is that we don't need to pull any
extra dependencies into buildroot.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2016-08-10 13:39:50 +02:00
Dennis Gilmore
00e11b2f51 4.1.7 release
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-06-23 05:14:21 -05:00
Nils Philippsen
698805f62b add missing dependencies
... which are available from pypi.python.org

Signed-off-by: Nils Philippsen <nils@redhat.com>
2016-06-06 11:39:53 +02:00
Nils Philippsen
53f93b27c2 add lxml dependency
Signed-off-by: Nils Philippsen <nils@redhat.com>
2016-06-03 14:28:35 +02:00
Dennis Gilmore
8de7d685d9 4.1.6 release
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-05-24 16:36:07 -05:00
Dennis Gilmore
00f2e24bce 4.1.5 release
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-05-16 20:56:48 -05:00
Dennis Gilmore
d8272bd0fa 4.1.4 release
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-04-29 15:36:41 -05:00
Dennis Gilmore
4f76425c9f 4.1.3 release
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-04-08 07:34:57 -05:00
Dennis Gilmore
36e7279a5e 4.1.2 release
Signed-off-by: Dennis Gilmore <dennis@ra.ausil.us>
2016-04-06 17:44:40 -05:00
Dennis Gilmore
f69ca2c5fa 4.1.1 release
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-04-01 09:42:24 -05:00
Dennis Gilmore
6b07dcead3 install scripts
pungi-config-validate
pungi-make-ostree

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-04-01 09:13:19 -05:00
Dennis Gilmore
133cb97aa0 4.1.0 dev start
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-02-23 12:19:59 -06:00
Dennis Gilmore
f6c4f166bf 4.0.5 release
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-02-23 12:08:33 -06:00
Dennis Gilmore
39ce2556c3 4.0.4 release
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-01-20 09:41:18 -06:00
Dennis Gilmore
10a90f97b4 Merge #75 Start of development guide 2015-12-08 17:41:00 +00:00
Dennis Gilmore
a2ace9e05c fix up the pungi-fedmesg-notification script name
fix up spec so that the package builds
2015-12-02 08:50:32 -06:00
Lubomír Sedlář
ba8ae15eb1 Allow running scripts with any python in PATH
Instead of hardcoding /usr/bin/python in shebangs, use /usr/bin/env.
This allows Pungi to work with dependencies installed in virtualenv.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-11-27 08:38:47 +01:00
Lubomír Sedlář
066855a039 Add ability to send messages about progress
With this patch, Pungi can invoke an arbitrary command on various
moments of the compose process. The invoked command can the decide on
what message to send (and using what messaging system).

The actual command is specified in the config file.

There is a script provided that sends the messages via fedmsg.

The documentation is updated to have details about the new config option
as well as the interface for the messaging script.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
2015-11-25 15:46:50 +01:00
Dennis Gilmore
2599a42a14 4.0.3 release
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2015-09-08 22:06:45 -05:00
Dennis Gilmore
8b1d5ab9b2 4.0.2 release
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2015-07-24 12:39:14 -05:00
Daniel Mach
81e935fe0e Fix test data, improve Makefile.
Previous test data was insufficient for proper testing.
Test compose runs and depsolving tests require precisely
set NVRs, dependencies, sub-packages, etc.
Using rpmfluff for these would be an overkill, it's better
to create RPMs directly from specs.
2015-06-25 08:02:57 -04:00
Dennis Gilmore
b53f2ba9bf 4.0.1 release
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2015-06-11 22:12:58 -05:00
Adam Miller
e71f8026fc add comps_filter 2015-06-06 13:45:48 -05:00
Dennis Gilmore
eba5a8bd96 include the dtd files in /usr/share/pungi
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2015-03-14 15:03:32 -05:00
Dennis Gilmore
a3158ec144 rename binaries
rename the pungi binary to pungi-koji since it does is tasks in koji
rename pungi-gather to pungi as it is the standalone old pungi binary

there is scripts that expect pungi to be the old pungi, the new binary
is not yet in use, pungi-koji semes to make sense, open to better ideas
2015-03-12 13:15:29 -05:00
Dennis Gilmore
dfd0cc947b fixup setup.py and MANIFEST.in to make a useable tarball 2015-03-12 11:03:48 -05:00
Daniel Mach
f5c6d44000 Initial changes for Pungi 4.0. 2015-02-10 06:47:16 -05:00
Dennis Gilmore
fedc440159 3.13 release 2014-12-12 20:21:03 -06:00
Dennis Gilmore
21021f521a 3.12 release 2014-09-11 11:09:13 -05:00
Dennis Gilmore
1175551e2c 3.11 release3.11 release3.11 release3.11 release3.11 release3.11 release3.11 release3.11 release3.11 release3.11 release3.11 release 2014-07-31 06:04:25 -05:00
Dennis Gilmore
2bb948fce7 3.10 release 2014-07-31 04:25:26 -05:00
Dennis Gilmore
ea8f3909ac 3.09 release 2014-07-30 11:36:11 -05:00
Dennis Gilmore
af9f7520f4 3.08 release 2014-07-23 11:19:20 -05:00
Dennis Gilmore
9d339e774b 3.07 release 2014-07-20 12:04:58 -05:00
Dennis Gilmore
6820ad7c23 3.06 release 2014-07-14 15:42:54 -05:00
Dennis Gilmore
fb3d4ca185 3.05 release 2014-07-09 01:27:55 -05:00
Dennis Gilmore
1ba64d6e6b 3.04 release 2014-04-29 16:29:34 -05:00
Dennis Gilmore
293143d8f1 revert to the old way of doing versioning as the change in 3.01 did not work 2013-10-31 20:22:35 -05:00
Dennis Gilmore
e7d19b70ee 3.02 release 2013-10-31 19:05:59 -05:00
Daniel Mach
cdf9916906 3.01 release 2013-10-27 15:44:10 -04:00
Dennis Gilmore
09ebeccd4d 3.00 release 2013-08-20 11:41:56 -05:00