frontend, cli, python, rpmbuild: better bootstrap config
Drop "image" configuration option in build and project, and keep it only
in CoprChroot. There's no sane existing container image that could be
used for successful bootstrapping of all the supported chroots, so it
isn't necessary to give the users this gun to shoot themselves.
Make sure that per-project we use "bootstrap=default" by default, and
that per-chroot config by default doesn't affect the per-project
configuration (which means the default bootstrap=unchanged). Similar
per-build option by default doesn't affect the per-project and
per-chroot configuration. So we fallback from per-build => per-chroot
=> per-project => default configuration (the first in the chain wins).
Since we may make this happen now, we finally don't default the
bootstrap configuration to "off" - but we default to what's shipped in
mock-core-configs. First it means that bootstrap is by default turned
on (was off) in all chroots, but second it allows us to tweak
bootstrap/bootstrap_image on/off per-mock chroot in the configuration in
future.
Changed forms.py:
- drop the unused 'description=' argument from create_mock_*() methods
- allow mock bootstrap image name without an explicit tag
- without javascript, by default - we need to have the bootstrap image
field shown (not hidden as before)
- the jquery needs to use .val() instead of .value (which is undefined
on the initial load otherwise).
- centralize form rendering on one place
In the Web-UI, the chroot form labels are now right aligned (which is
the default). It is then compliant with the render_field() default.
Rename 'bootstrap_config -> bootstrap'. Also Rename the cli option
'--use-bootstrap' to just '--bootstrap'.
Implement the forgotten parts in 'edit-chroot'.
Make everything consistent to use 'on' and 'off' instead of mixup of
'on/enabled' and 'off/disabled' in cli/frontend/python/etc.
Move the new fields from ModifyChrootForm to parent ChrootForm.
Do the necessary mock's child.cfg config jinja changes, so the options
actually have some effect on builder. Wile on it, we had some weird
code chunk in the template behind use_bootstrap_container condition,
which was setting up some bootstrap_* mock options. This doesn't seem
to be needed, and use_bootstrap_container is dropped itself - so I
dropped that chunk.
The same jinja template fixes are added to 'copr-cli mock-config'
template.
Fix repeate-build route form to also accept the arguments.
For backward compatibility, I re-added use_bootstrap_container into
the appropriate frontend API routes, and to python-copr -- so we support
old clients by frontend, and old user's script in Python API.
In 'rpmbuild', we have to cleanup 'root-cache' after each build too,
otherwise no matter we '--scrub=bootstrap', the chroot wouldn't be
re-initialized in the next build.
Drop .swo binary file which broke our Jenkins CI.
Add testsuite, and fix some PyLint issues.
Complements/Replaces: #1445
Merges: #1525
Fixes: #1308