467 Commits

Author SHA1 Message Date
Matt Prahl
6e075951b8 Merge #962 Support the modulemd buildopts.rpms.whitelist option 2018-06-27 11:42:49 +00:00
mprahl
74e4c99984 Support the modulemd buildopts.rpms.whitelist option 2018-06-27 07:05:06 -04:00
Martin Curlej
0aa9f014ce Added search for modules by binary rpm.
Signed-off-by: Martin Curlej <mcurlej@redhat.com>

Updated PR according to review.

Signed-off-by: Martin Curlej <mcurlej@redhat.com>

Searching by multiple koji tags + tests

Signed-off-by: Martin Curlej <mcurlej@redhat.com>
2018-06-26 15:52:37 +02:00
Ralph Bean
6981449853 Fix local builds.
I discovered that local builds have been broken by recent (good) changes in
dnf.  At the end of every batch, we regenerate the local repo with createrepo
and we also call modifyrepo to include the modulemd file as we progress.  This
was added in #467.

What we really want, is for the modulemd file to be present at the *end* of the
build.

Recently, dnf started respecting the modulemd file natively, such that builds
we built in batch0 would not show up in batch1.  They would be present in the
repo, but they would be marked as belonging to a module which was not enabled,
and so could not be pulled in.  Every module build would fail because
module-srpm-macros was in a disabled module (the module being built at the
time).

This change makes it so that the module metadata is only added to the repo at
the very end of the build.  I moved it into a `finalize` method on the builder
which the copr builder was using, and for symmetry's sake I moved the koji
content generator code to the same method on that builder.

There was a circular import issue to solve between the koji module builder and
the koji content generator modules that generated a larger diff, but is mostly
cosmetic and mock changes.
2018-06-25 17:05:22 -04:00
Mikolaj Izdebski
a22f663d4a Add reproducer for #954 2018-06-18 14:17:13 +02:00
Matt Prahl
5e12152acd Merge #952 Get buildrequired modules for koji tag inheritance using NSVC, not just NSV. 2018-06-15 00:38:46 +00:00
Matt Prahl
764c467c1d Merge #950 New: Support querying of modules/components with multiple state value filtering 2018-06-15 00:36:33 +00:00
Jan Kaluza
ddbeb0aca7 Get buildrequired modules for koji tag inheritance using NSVC, not just NSV. 2018-06-14 11:37:52 +02:00
Filip Valder
f1fc7ed467 New: Support querying of modules/components with multiple state value filtering 2018-06-13 09:42:38 +02:00
Martin Curlej
e2e804b1d6 Added the ability to search mbs builds by the whole NSVC string.
Signed-off-by: Martin Curlej <mcurlej@redhat.com>

Found about the magical properties of zip.

Signed-off-by: Martin Curlej <mcurlej@redhat.com>
2018-06-13 09:30:52 +02:00
mprahl
2e6589ae41 Check the libmodulemd version instead of modulemd 2018-05-31 14:32:06 -04:00
Owen W. Taylor
ddee4f840b MockModuleBuilder: add artifacts to artifacts not components
The built RPM artifacts were being added to the components list (the
RPMs to build) instead of the proper artifacts section. Also, they
need to be in NEVRA format, so use 'rpm -qf' to query the epochs from
the built artifacts.
2018-05-30 15:47:14 -04:00
Owen W. Taylor
5093a94f20 Add epoch to RPM artifacts in testing modulemd files
RPM artifacts in modulemd files are required to be in name-epoch:version-release.arch
format - this is enforced since libmodulemd-1.4.
2018-05-30 12:33:31 -04:00
mprahl
a4d97f66b0 Remove "artifacts" in modulemd from local build test modulemds that caused libmodulemd to choke 2018-05-21 12:22:59 -04:00
mprahl
00e46c205b Show siblings and component_builds in the standard modules API 2018-05-10 11:48:00 -04:00
mprahl
15a7e322a6 Fallback to the old Koji tag format for the target when the tag name is too long 2018-05-08 09:11:22 -04:00
Qixiang Wan
062e92e209 Add test case for desc order by context
This is a test case for #868
2018-05-03 22:02:54 +08:00
Qixiang Wan
1ca6b61790 Add test for filtering module builds by context 2018-04-28 11:46:36 +08:00
Qixiang Wan
d83e6897ca Change ModuleBuild.context to db column
1. Changed ModuleBuild's context property to db column, it's
non-nullable and default value is '00000000' to keep it consistent
with previous behaviour.

2. Changed ModuleBuild.contexts_from_mmd to return a tuple of
(ref_build_context, build_context, runtime_context, context).

3. Updated tests affected by this change.
2018-04-28 11:46:31 +08:00
Qixiang Wan
8b807a9fcd Generate koji tag from MBS and use informative name
koji now supports tags with max length of 256, we can use
more informative tag name instead of the hash one.

The new format of koji tag name is:

    module-<name>-<stream>-<version>-<context>

However when the generated tag's length > (256 - len('build')), we
fallback to the old way of name in hash format (module-<hash>).

In this change, koji tag is always generated from MBS itself, even
with pdc resolver.

FIXES: #918 #925
2018-04-26 22:04:16 +08:00
Matt Prahl
8351713828 Merge #922 Generate 'context' from hash based on buildrequires/requires stream. Reuse components only from module with the same stream_build_context. 2018-04-24 22:50:02 +00:00
Jan Kaluza
8d1d439737 Generate 'context' from hash based on buildrequires/requires stream. Reuse components only from module with the same stream_build_context. 2018-04-24 15:45:26 +02:00
Jan Kaluza
c1c95fc963 Allow defining list of packages which are blocked in the -build tag until they are built in a module. 2018-04-13 12:57:27 +02:00
Jan Kaluza
5d91c97386 Allow defining list of packages which are blocked in the -build tag until they are built in a module. 2018-04-12 09:45:57 +02:00
Jan Kaluza
836fb9db10 Keep the 'module_name:[]' in requires unexpanded in generate_expanded_mmds. 2018-04-06 10:48:59 +02:00
mprahl
05f34598eb Surface the error to the user when a module dependency can't be found 2018-04-05 14:37:08 -04:00
mprahl
c2824138d3 Fix a bug in MSE when a module requires a module that isn't also a buildrequire 2018-04-05 10:58:29 -04:00
Jan Kaluza
65513afd1a Share the same in the dist tag between all MSE builds. 2018-04-05 10:42:56 +02:00
mprahl
19db295795 Fix flake8 errors 2018-04-03 09:58:57 -04:00
mprahl
caadb13f0e Remove the COPR tests
The COPR tests were causing failures and since most of them were
skipped and haven't been updated in a long time, let's just delete
them.
2018-04-03 09:58:57 -04:00
Jan Kaluza
9b6fd2ba39 Split utils.py to multiple files based on the methods use-case. 2018-04-03 09:58:57 -04:00
Jan Kaluza
9503e4624e Support local build of modules with MSE. 2018-04-03 09:58:57 -04:00
mprahl
5b278211e6 Add API v2 which will return a list of modules on build submissions based on module stream expansion 2018-04-03 09:58:57 -04:00
mprahl
41814b42de Add siblings to the extended JSON output of module builds 2018-04-03 09:58:57 -04:00
Jan Kaluza
6fc8c646de Add 'mbs-manager import_module'. 2018-04-03 09:58:57 -04:00
Jan Kaluza
e5e9a24fce Allow adding bool to XMD. Fix flake8 issues. 2018-04-03 09:58:57 -04:00
Jan Kaluza
2482e47c07 Fix issues from review. Drop xmd['mbs']['requires']. Do not allow building MSE builds against non-MSE builds. 2018-04-03 09:58:57 -04:00
Jan Kaluza
31ddbe51a5 Add generate_expanded_mmds which returns list of MMDs which can be submitted as MSE builds and submit them. 2018-04-03 09:58:57 -04:00
Igor Gnatenko
90f292c7f5 tests/mmd_resolver: add test for multiple runtime requires
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
32d053dd98 tests/mmd_resolver: simplify testing
And try to use some real names.

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
d38d55451d tests/mmd_resolver: test empty inclusion/exclusion dependency
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
85af781920 mmd_resolver: add support for streams exclusion
Also fix support for dependencies with empty streams list.

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
e3490d129a mmd_resolver: generate combinations only for top-level dependencies
Reported-by: Petr Šabata <contyk@redhat.com>
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
mprahl
ee43b1bb7d Flake8 fixes 2018-04-03 09:58:57 -04:00
mprahl
eb0b2e1c38 Add the database resolver plugin 2018-04-03 09:58:57 -04:00
Jan Kaluža
c925ebbd34 tests/mmd_resolver: add tests for multi-dependency modules
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
0f26e1af62 tests/mmd_resolver: deduplicate code for generation test modules
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
8174b933b0 tests/mmd_resolver: add support for multi-dependency modules
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
7cbd0a0301 mmd_resolver: rework solvables generation
Now we have good separation between runtime and buildtime dependencies:
If mmd has context, it is built artefact which supposed to have only one
dependency entry, we create solvable with real arch for it. Otherwise we
create multiple solvables with "src" arch.

In "src" solvables, "context" is a number which represents index in
dependencies array.

Stream is not included anymore in "evr" because it's incomparable.
Version is not included anymore in "name" because it's there just for
comparison, nothing more (it's not different module-stream).

As a side, add_requires/add_conflicts/add_provides were replaced with
non-deprecated add_deparray method.

With all this, we are ready to handle MMDs which have multiple elements
in dependencies (modulemd v2).

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00
Igor Gnatenko
9ce5dffb14 mmd_resolver: rewrite function for finding alternatives
Previous version was assuming that number of alternatives is static
which is wrong, they can be appearing depending on solvables.

Also it was checking even impossible combinations (due to using
itertools.product).

Now we check only real possibilities.

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2018-04-03 09:58:57 -04:00