These methods return command as list which is never serialized to str and
never executed using bash. It is instead passed directly to
`kobo.shortcuts.run`.
The `shlex_quote` usage here actually breaks the code, because it adds
quotes there which are needed only if this command would be serialized
to string and passed to bash. But this never happens. As a result,
the arguments passed to `kobo.shortcuts.run` contain those extra
quotes.
In this commit the shlex_quote is removed completely from this
part of code.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
When testing if a variant has some modules,
it's no longer enough to look at `variant.modules`. That attribute
contains only names of modules configured in variants.xml.
With modules being specified in `pkgset_koji_module_builds` or
`pkgset_scratch_modules` options it is possible the code wouldn't
trigger even if there was a module.
JIRA: RHELCMP-3054
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
When Pungi receives a signal to terminate, it can sometimes get stuck
if there are threads running. It has to wait for all worker threads to
finish. They generally do finish, unless they get stuck waiting on a
subprocess.
This patch should reduce the likelihood of this happening by stopping
all subprocesses.
JIRA: RHELCMP-3056
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This is similar to image-build in terms of what it does, and somewhat
similar to OSBS phase in how it's implemented.
The phase reads configuration, submits the build via XMLRPC call and
waits for the task to finish. Then it downloads the built image and
includes it in the compose metadata.
JIRA: RHELCMP-315
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
Without that, the resulting string is `--foo="'bar'"`
which results in `'bar'` being passed to Koji task.
With this commit, the resulting string is `"'--foo=bar'"`
which results in `bar` being passed to Koji which is expected.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
When list is used in gather_lookaside_repos, the Pungi currently
fails with an exception. This is caused by inverted condition
in the code which tries to filter-out the lookaside repos
generated during the Pungin execution pointing to different
compose variants.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
This is useful when running pungi-patch-iso on VM with low amount of
memory but higher disk space. Without this option the operation will
fail because /tmp is tmpfs filesystem.
Signed-off-by: Jiri Konecny <jkonecny@redhat.com>
There are two thread pools for making package sets. If Pungi is being
terminated by external event and the exception is handled in the first
thread, the second one never gets to the `stop` method and the process
keeps hanging.
This patch should make sure that `stop()` is called on both pools.
JIRA: RHELCMP-2459
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
Sometimes full clone failed with error fatal: Not a git repository
and we found that .git/refs/ dir is missing after shallow clone failed.
JIRA: RHELCMP-724
Signed-off-by: Haibo Lin <hlin@redhat.com>
When running a Bodhi update, somehow the raise condition was triggered
before any exception was raised, which caused the compose to fail.
This shouldn't really happen often, but it's possible if the machine
adjusts time for any reason (e.g. DST).
This commit moves the check for timeout after the function is called.
This can cause an extra invocation of the function, which shouldn't be a
huge deal really.
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
get_graft_points has changed but without adapting pungi-patch-iso utility so the
exception was raised when executed.
Fixes: https://pagure.io/pungi/issue/1438
Signed-off-by: Jiri Konecny <jkonecny@redhat.com>
Also, reformat the invocation of Lorax, since
Lorax does not accept -c=%s, only -c %s.
Jira: RHELCMP-713
Signed-off-by: Bohdan Khomutskyi <bkhomuts@redhat.com>
The change allows for setting the parameters as described below to Lorax.
Lorax, a program called during the buildInstall phase, creates the SquashFS
during the buildInstall phase.
The Squash filesystem is present both on the DVD and the BOOT.ISO.
squashfs_only --- (str) passes --squashfs-only option.
configuration_file --- (str or scm_dict) passes -c option to Lorax.
The final goal of this change is to allow for optimization of
the installation medium size.
This pull request is related to the Fedora change proposal, which is available
at this location:
https://fedoraproject.org/wiki/Category:Changes/OptimizeSquashFS
See the change proposal for more information about the benefits of higher
compression ratio.
Jira: RHELCMP-693
Signed-off-by: Bohdan Khomutskyi <bkhomuts@redhat.com>
This uses a previous change that added ability to retry and simply
extends the conditions when it fires.
JIRA: RHELCMP-1863
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
Nose has been in maintenance mode for the past several years
and pytest is a good replacement.
Other changes:
- Replace deprecated assertRegexpMatches with assertRegex
- Replace deprecated assertRaisesRegexp with assertRaisesRegex
- Replace deprecated SafeConfigParser with ConfigParser
- Force reinstall pytest and mock in tox virtualenv. This is because
the globally installed packages may not work as expected(occured in
jenkins job).
JIRA: RHELCMP-1619
Signed-off-by: Haibo Lin <hlin@redhat.com>
Reusing old arch repo may fail for reasons such as arch not
available in old compose or unexpected error when copying data
from old compose.
JIRA: RHELCMP-994
Signed-off-by: Haibo Lin <hlin@redhat.com>
If the compose is aborted while koji tasks are running, we can be
left with empty log files. That complicates debugging.
JIRA: RHELCMP-1218
Signed-off-by: Ondrej Nosek <onosek@redhat.com>
Previously, we checked only for `compose_dir`, but it makes
more sense to really check for `composeinfo-base.json` instead.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>