forked from rpm-software-management/mock
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There are new options, --calculate-build-dependencies and --isolated-build. New buildroot_lock plugin added. Fixes: rpm-software-management#1358 Merges: rpm-software-management#1393 Relates: rpm-software-management#1380
- Loading branch information
Showing
24 changed files
with
1,239 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Feature: Mock 5.7+ supports isolated builds | ||
|
||
@isolated_build | ||
Scenario: Isolated build against a DNF5 distribution | ||
Given an unique mock namespace | ||
When deps for python-copr-999-1.src.rpm are calculated against fedora-rawhide-x86_64 | ||
And a local repository is created from lockfile | ||
And an isolated build is retriggered with the lockfile and repository | ||
Then the build succeeds | ||
And the produced lockfile is validated properly | ||
|
||
@isolated_build | ||
Scenario: Isolated build against a DNF4 distribution | ||
Given an unique mock namespace | ||
# Temporary image, until we resolve https://issues.redhat.com/browse/CS-2506 | ||
And next mock call uses --config-opts=bootstrap_image=quay.io/mock/behave-testing-c9s-bootstrap option | ||
And next mock call uses --config-opts=bootstrap_image_ready=True option | ||
When deps for mock-test-bump-version-1-0.src.rpm are calculated against centos-stream+epel-9-x86_64 | ||
And a local repository is created from lockfile | ||
And an isolated build is retriggered with the lockfile and repository | ||
Then the build succeeds | ||
And the produced lockfile is validated properly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
layout: default | ||
title: Plugin buildroot_lock | ||
--- | ||
|
||
buildroot_lock Plugin | ||
===================== | ||
|
||
This plugin generates an additional build artifact—the buildroot *lockfile* | ||
(`buildroot_lock.json` file in the result directory). | ||
|
||
The *lockfile* describes both the list of buildroot sources (e.g., a list of | ||
installed RPMs, bootstrap image info, etc.) and a set of Mock configuration | ||
options. Using this information, Mock can later reproduce the buildroot | ||
preparation (see the [Isolated Builds feature page](feature-isolated-builds)). | ||
|
||
This plugin is **disabled** by default but is automatically enabled with the | ||
`--calculate-build-dependencies` option. You can enable it (for all builds) by | ||
this configuration snippet: | ||
|
||
```python | ||
config_opts['plugin_conf']['buildroot_lock_enable'] = True | ||
``` | ||
|
||
**Note:** This plugin does not work with the `--offline` option. | ||
|
||
|
||
Format of the *buildroot_lock.json* file | ||
---------------------------------------- | ||
|
||
The file `buildroot_lock.json` is a JSON file. List of JSON Schema files is | ||
installed together with the Mock RPM package: | ||
|
||
rpm -ql mock | grep schema | ||
/usr/share/doc/mock/buildroot-lock-schema-1.0.0.json | ||
|
||
Currently, we do not provide a compatibility promise. Only the exact same | ||
version of Mock that produced the file is guaranteed to read and process it. | ||
For more information, see [Isolated Builds](feature-isolated-builds). |
Oops, something went wrong.