Skip to content

Commit

Permalink
enable use_bootstrap_image by default
Browse files Browse the repository at this point in the history
This feature exists for long time. I think it is time to enable it by default.
It will allows us to run Mock without package manager on host.
  • Loading branch information
xsuchy authored and praiskup committed Jul 20, 2023
1 parent 9d943a2 commit 6397cad
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/Feature-container-for-bootstrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ We come up with a nice feature. Mock will not install bootstrap chroot itself. I

Using this feature, **any** incompatible feature in either RPM or DNF can be used in the target chroot. Now or in future. And you will be able to install the final chroot. You do not even need to have RPM on a host. So this should work on any system. Even Debian based. The only requirement for this feature is [Podman](https://podman.io/). Do not forget to install the `podman` package.

This feature is now disabled by default. You can enable it using:
This feature is available since 1.4.20 and enabled by default from 5.0. You can disable it using:

config_opts['use_bootstrap_image'] = True
config_opts['use_bootstrap_image'] = False

It can be enabled or disabled on the command line using `--use-bootstrap-image` or `--no-bootstrap-image` options.

Expand Down
2 changes: 1 addition & 1 deletion mock/docs/site-defaults.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
# case, you may need to have "bootstrap" chroot pre-populated from a container
# image first (where the package manager stack is already pre-installed, so
# mock doesn't have to).
#config_opts['use_bootstrap_image'] = False
#config_opts['use_bootstrap_image'] = True
#config_opts['bootstrap_image'] = 'fedora:latest'

# Mock in a nutshell needs to have the selected config_opts["package_manager"]
Expand Down
2 changes: 1 addition & 1 deletion mock/mock.spec
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Recommends: btrfs-progs
Recommends: dnf-utils
Suggests: qemu-user-static
Suggests: procenv
Suggests: podman
Recommends: podman

%if %{with tests}
BuildRequires: python%{python3_pkgversion}-distro
Expand Down
2 changes: 1 addition & 1 deletion mock/py/mockbuild/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def setup_default_config_opts():
config_opts['use_container_host_hostname'] = True

config_opts['use_bootstrap'] = True
config_opts['use_bootstrap_image'] = False
config_opts['use_bootstrap_image'] = True
config_opts['bootstrap_image'] = 'fedora:latest'
config_opts['bootstrap_image_ready'] = False

Expand Down
2 changes: 1 addition & 1 deletion mock/py/mockbuild/package_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class _PackageManager(object):
@classmethod
def get_command(cls, config):
command = config.get(f"{cls.name}_command")
if config.get("use_bootstrap_image", False):
if config.get("use_bootstrap_image", True):
return command
if config.get("use_bootstrap", False):
sys_command = config.get(f"system_{cls.name}_command")
Expand Down

0 comments on commit 6397cad

Please sign in to comment.