The build steps assume that the the repository for the build is non-modular,
so after the final createrepo is run with include_module_yaml=True, it's
impossible to repeat a build steps. Running mock -c <failed_config> build is
quite useful for debugging a failed build (even though it's hard to find the
right config) - skipping the final createrepo step for failed module builds
makes it work as expected.
First, rename LocalBuilder to SRPMBuilder. Reading the manpage for mock tells
me that the `--rebuild` option is specifically for rebuilding a given srpm.
The class was just named poorly (imo).
Second, change the type detection. The bug I'm trying to fix is if you try to
pass a string for the `repository:` in your modulemd like
`file:///home/user/repos/libfoo/`. The old logic here would assume that it is
an srpm since it didn't start with "git" or "http", but that's not correct. We
have people who want to experiment with building modules with components that
are not publicly accessible over the network - which are only local. This
change allows that.
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.
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.
Multiple build threads would try to write to the same distgit-clone-wrapper
location, which could result in ETXTBSY when one thread tried to execute
a script that another was writing to or vice-versa.
Instead of using a wrapper script, use a sh -c invocation for distgit_get.
https://pagure.io/fm-orchestrator/issue/592
There's no good reason to have artifacts in both the thread-specific results directory
and in the main results directory, so just move them across instead of copying them.
https://pagure.io/fm-orchestrator/issue/591
createrepo_c recursively looks for RPMs in the target directory and
subdirectories, meaning that it was finding RPMs in the thread-specific
directories. Pass in an explicit list of RPMs at the toplevel.
https://pagure.io/fm-orchestrator/issue/591
Both pungi and dnf use the new multidocument format, with the
old one not really being supported by anything at this point.
Let's be compatible.
This change requires modulemd-1.2.0+.
Signed-off-by: Petr Šabata <contyk@redhat.com>
* 47c4363Fix#467 - Inject modules.yaml to mock repository
* eaeaf29 unused method
* 6412a7f use module owner for whitelisting Koji packages
* 80f78c7 rename to match what it actually does
* 4c57329 include %module_name, %module_stream and %module_version in the module-build-macros and fix sending active=True in pdc.py