Commit Graph

59 Commits

Author SHA1 Message Date
Jan Kaluza
56fe201c33 Fill in the 'filterer_rpms' in backend to not access Koji from frontend. 2018-08-21 07:58:52 +02:00
Jan Kaluza
f0b35be067 Add BASE_MODULE_KOJI_ARCHES to override default Koji arches. 2018-08-14 13:18:56 +02:00
mprahl
d54422adeb Don't filter RPMs of reused components from a module that depends on itself
If a module has filters set and it buildrequires itself, issues occur
during component reuse. In that event, the filtered RPMs from the
previous module build will not be available in the buildroot because the NVRs
in the filters will match the RPMs from the reused component.

Co-authored-by: Jan Kaluza <jkaluza@redhat.com>
2018-08-13 11:13:40 -04:00
Jan Kaluza
6d2e4bbffa Fix filters generation 2018-08-09 15:16:13 +02:00
mprahl
f08135352a Use the NVR instead of the component name when responding to a tag message
This addresses an issue when a module contains builds that have different
names in their NVR than the component name in MBS. This happens with
SCLs for instance. MBS wouldn't be able to find the component to mark
as tagged in the database since it was searching by the wrong name, so the
build would just stall. This uses the NVR now to find the correct build
in the database.
2018-08-07 11:54:28 -04:00
mprahl
042b677a01 Raise an exception if the build is not returned from Koji when checking if the buildroot is ready 2018-08-07 10:33:14 -04:00
mprahl
a78c564073 Revert "Store the component's build ID and use that to identify the build when acting on a tag message"
This reverts commit 9bd16beeef.
2018-08-07 10:32:50 -04:00
mprahl
9bd16beeef Store the component's build ID and use that to identify the build when acting on a tag message
This resolves an issue where the component name is different than the
package being tagged due to a macro such as those used for SCLs.
2018-08-03 20:45:00 -04:00
Matt Prahl
e45863e8f4 Merge #967 Define %{_module_context} and %{disttag} 2018-06-29 15:28:20 +00:00
Mikolaj Izdebski
0d29633da9 Make repo_include_all setting configurable in xmd
Previously MBS configured all Koji build tags with
repo_include_all=True extra option.  But for some modules it was
desired to be able to have tags with repo_include_all=False.

Fixes #957
2018-06-29 17:06:58 +02:00
Petr Šabata
323880999b Define %{_module_context} and %{disttag}
No reason to hide module context from the consumers, plus it's useful to
keep it in the DISTTAG tag (not to be confused with the %{dist} tag) for
tracking.

The %{disttag} feature will do nothing until RPM supports it.  This is
planned in 4.14.2.

See https://bugzilla.redhat.com/show_bug.cgi?id=1596192.

Signed-off-by: Petr Šabata <contyk@redhat.com>
2018-06-29 16:36:01 +02:00
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
Owen W. Taylor
827546dc9a module-build-macros: Use /etc instead of %_sysconfdir
Commit 42aef7d5d2 moved the macros installed by module-build-macros
from %_rpmconfdir (which is unaffected by %_prefix) to %_sysconfdir/rpm
(which follows %_prefix). This interacts badly with the Flatpak module
macros which change %_prefix to /app - when flatpak-rpm-macros is
in the buildroot while module-build-macros is built, module-build-macros
installs its macros to /app and they aren't found when building the
rest of the packages in the module.

Hardcoding /etc rather than using %_sysconfdir fixes this.
2018-05-31 17:52:04 -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
Jan Kaluza
9236133cd2 Fix wrong rebase of #919. 2018-04-13 13:07:00 +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
mprahl
f0852d9009 Port to libmodulemd and support v2 modulemd without module stream expansion 2018-04-03 09:58:57 -04:00
Yash Nanavati
1d3fd2af64 Minor changes towards Python 3 Compatability 2018-02-28 09:01:51 -05:00
mprahl
df594da8a5 Remove the Koji proxyuser functionality 2018-01-30 11:49:03 -05:00
mprahl
bf80ce4537 Don't traceback on failed task cancellations and log those exceptions 2018-01-22 15:20:41 -05:00
mprahl
a67b53f5c3 Add a "context" field on component and module releases in Koji for uniqueness for when Module Stream Expansion is implemented 2018-01-16 10:36:09 -05:00
mprahl
a54045e518 Don't run KojiModuleBuilder.buildroot_connect in the stale module builds poller 2017-12-11 13:27:30 -05:00
Jan Kaluza
7de120c17b Get the weight of Koji tasks and use it to sort the components in a batch instead of builds time. 2017-11-28 10:52:17 -05:00
Nils Philippsen
3f746582eb honor custom RPM %_sourcedir
If the user redefines %_sourcedir in ~/.rpmmacros, `mbs-build local`
will fail trying to build module-build-macros otherwise because rpmbuild
will look for sources -- macros.modules -- in the wrong place.
2017-11-28 13:49:06 +01:00
mprahl
30ef85af01 Fix "instant complete" builds and reusing all components 2017-11-27 16:20:28 -05:00
mprahl
cf44455ff2 Add a missing docstring to 'untag_artifacts' 2017-11-27 16:20:28 -05:00
mprahl
ef5dc64f2b Transition stale failed builds to the "garbage" state and untag their components 2017-11-17 12:07:51 -05:00
mprahl
ea34df0fd1 Set the timeout on Koji sessions to 10 minutes 2017-11-15 12:57:49 -05:00
Martin Curlej
60b3d97c97 flake8 cleanup
Signed-off-by: Martin Curlej <mcurlej@redhat.com>

removed some noqa tags
2017-10-25 12:13:59 +02:00
mprahl
f5de140521 Schedule components based on build time 2017-10-23 15:33:57 -04:00
Ralph Bean
c92a967042 Fix incorrect call to koji API.
This was introduced months ago, but we never hit it.  I just saw it in
the error logs.

It looks like the call to `session.untaggedBuilds` expects a `name`
argument, but `session.listTagged` does *not*.
2017-10-10 18:33:59 -04:00
Ralph Bean
42aef7d5d2 Try to ensure that our macros are sourced last.
... because we think last-sourced wins and the competition is stiff.
2017-09-22 16:57:54 -04:00
Jan Kaluza
c6b2189110 Use repo_include_all to inherit all packages to buildroot once Koji https://pagure.io/koji/issue/588 is merged. 2017-09-18 09:39:47 +02:00
Jan Kaluza
7ebb4a8bc5 Conflict with packages filtered out from the build-requires to ensure they won't appear in a buildroot. 2017-09-15 13:47:33 +02:00
Filip Valder
7ef2975984 PEP8 fixes 2017-07-17 18:29:10 +02:00
Ralph Bean
35558f86bc Merge #611 Koji perm_id cache 2017-07-17 14:53:34 +00:00
Neha Prasad
459ffb241d Configure dogpile.cache 2017-07-17 08:56:17 -04:00
Neha Prasad
83b0c1562e fix koji cache 2017-07-14 13:58:16 -04:00
Ralph Bean
bb56e4f057 Refactor get_build_by_artifact so that it always returns the same kind of dict. 2017-07-14 09:21:52 -04:00
Jan Kaluza
439767cbcf Tag the component to final tag in case it is built, but not tagged. 2017-07-13 13:37:10 -04:00
Neha Prasad
5ff58867f4 Koji perm_id cache 2017-07-07 12:37:17 -04:00
Ralph Bean
a755104bd4 Fix the test suite.
We had some circular imports that caused the tests (and more?) to fail.

I ran into this when looking at the tests for #583 and #595.
2017-07-06 21:02:32 -04:00
Jan Kaluža
c1eb07289f Merge #551 Do not fail a module build in buildroot_ready when repo is not generated yet. 2017-05-16 08:31:38 +00:00
Jan Kaluza
2c202bcf00 Do not fail a module in buildroot_ready when repo is not generated yet. 2017-05-12 10:24:47 +02:00
Jan Kaluža
7c117c01d1 Merge #544 Add support for modulemd buildopts.rpms.macros 2017-05-11 14:13:18 +00:00
Jan Kaluza
0ecbadeaad Add support for modulemd buildopts.rpms.macros 2017-05-11 16:08:30 +02:00