Skip to content

Commit 485486b

Browse files
committed
New [mock] release [5.0-1] and [mock-core-configs] release [39-1]
Created by command (mock): /usr/bin/tito tag --use-version=5.0 Created by command (mock-core-configs) /usr/bin/tito tag --use-version=39
1 parent bd38f5c commit 485486b

File tree

6 files changed

+89
-45
lines changed

6 files changed

+89
-45
lines changed

.tito/packages/mock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.1-1 mock/
1+
5.0-1 mock/

.tito/packages/mock-core-configs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
38.6-1 mock-core-configs/
1+
39-1 mock-core-configs/

docs/Release-Notes-Next.md renamed to docs/Release-Notes-5.0.md

Lines changed: 77 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
layout: default
3-
title: Release Notes - Mock v?.?
3+
title: Release Notes - Mock v5.0
44
---
55

6-
Released on ????-??-??.
6+
Released on 2023-08-09.
77

8-
## Mock v?.? new features:
8+
## Mock v5.0 new features:
99

1010
- The `use_bootstrap_image` feature has been turned on as it was stabilized in
1111
this release and it speeds up the bootstrap chroot preparation a lot
1212
(by not installing potentially hundreds of packages into the bootstrap chroot,
13-
but just extract the `boostrap_image` contents). For the RHEL based chroots
13+
but just extracting the `boostrap_image` contents). For the RHEL based chroots
1414
(where UBI `bootstrap_image` is in use, and where `python3-dnf-plugins-core`
1515
is installed by default) we also turned on the `bootstrap_image_ready=True`
1616
which drastically speeds the bootstrap preparation. See the explanation for
@@ -46,46 +46,76 @@ Released on ????-??-??.
4646
container, the credentials passed down by Podman are automatically detected
4747
and used ([PR#1130][]).
4848

49-
- Even though the buildroot is supposed to be initialized with cross-arch
50-
packages (using the --forcearch RPM feature), the bootstrap chroot is newly
51-
always prepared with the native architecture. This change has been done to
52-
optimize the final buildroot installation because using the "native" DNF is
53-
much faster than cross-arch emulation using `qemu-user-static`. As a benefit,
54-
we can simply use the native pulled Podman `bootstrap_image` even for
55-
cross-arch builds without any problems. See [issue#1110][].
56-
57-
- An easier way to skip Mock plugin execution in the Bootstrap chroot has been
58-
invented. It is now enough to specify the `run_in_bootstrap = False` global
59-
variable in such plugin, see [PR#1116][] for more info. The plugin `hw_info`
60-
has been newly disabled for the bootstrap chroot this way.
49+
- Even though the requested buildroot is cross-arch (must be initialized with
50+
cross-arch packages using the `--forcearch RPM` feature), the bootstrap chroot
51+
is newly always prepared with the native architecture. This change has been
52+
done to optimize the final buildroot installation — using the "arch natively"
53+
compiled DNF stack is much faster than cross-arch emulation using
54+
`qemu-user-static`. As a benefit, we can newly simply use the "native"
55+
Podman-pulled `bootstrap_image` even for cross-arch builds (we have to play
56+
with Glibc's "personality" a bit, but still). See [issue#1110][].
57+
58+
- The bootstrap-related logging has been changed so the corresponding log
59+
entries are now appended to the default `root.log` file. This change should
60+
lead to a better understanding what is going on in the bootstrap chroot
61+
([issue#539][] and [PR#1106][]).
62+
63+
- An easier way to skip Mock plugin execution in Bootstrap chroot has been
64+
invented. It is now enough to just specify `run_in_bootstrap = False` global
65+
variable in such a plugin, see [PR#1116][] for more info. The plugin
66+
`hw_info` has been newly disabled this way.
6167

6268
- The bootstrap chroot installation was made smaller; newly only the
6369
`python3-dnf` and `python3-dnf-plugins-core` are installed, instead of `dnf`
6470
and `dnf-plugins-core` (which used to install also unnecessary documentation
6571
files).
6672

67-
- Automatic downloads (for example with `mock https://exmaple.com/src.rpm`
73+
- Automatic file downloads (for example with `mock https://exmaple.com/src.rpm`
6874
use cases) have been changed to automatically retry the download several times
6975
to work around random network failures ([PR#1132][] and [PR#1134][]).
7076

7177
- The `dnf` and `dnf5` processes are newly always executed with the
7278
`--setopt=allow_vendor_change=yes` option. This is done in belief that we
73-
don't have to protect the Mock builds against `Vendor` changes, and we do this
74-
because overriding the distro-default RPMs is quite common thing (`mock
75-
--chain` e.g.) while mimicking the distro-default `Vendor` tag would be
76-
a painful task. The thing is that the `allow_vendor_change=no` is going to be
77-
set by default in DNF5 soon and we want to prevent unnecessary surprises.
78-
Also, openSUSE has been reported to use this even now with DNF4 ([PR#1160][]).
79+
don't have to protect the Mock builds against `Vendor:` changes, while
80+
overriding the distro-default RPMs is quite a common thing (`mock --chain`
81+
e.g.) while mimicking the distro-default `Vendor` tag would be a painful task.
82+
The thing is that the `allow_vendor_change=no` is going to be set by default
83+
in DNF5 soon and we want to prevent unnecessary surprises. Also, openSUSE has
84+
been reported to use this even with DNF4 ([PR#1160][]).
85+
86+
- Mock now considers DNF5 to be a valid package manager alternative. For
87+
example considering
88+
89+
1. that Bootstrap chroot is generated from a bootstrap image,
90+
2. expected package manager is DNF4 (`package_manager == 'dnf'`)
91+
3. but the selected image has only `dnf5` installed by default
92+
93+
then Mock properly finds the `/bin/dnf5` command in-bootstrap, uses it to
94+
install `/bin/dnf-3` into the bootstrap chroot first and then it uses
95+
`/bin/dnf-3` in bootstrap for the final target buildroot installation.
96+
97+
98+
## Mock v5.0 bugfixes:
7999

80-
## Mock v?.? bugfixes:
100+
- The orphan-process killing feature was enhanced to also properly kill
101+
processes started by `dnf install` post-scriptles (installing from bootstrap
102+
to buildroot), see [issue#1165][].
103+
104+
- The `podman pull` logic that Mock does in the background with
105+
`--use-bootstrap-image` (now by default) was fixed to not affect the
106+
`mock --shell` stdout. That was a bug, stdout is often parsed by callers.
107+
108+
- The fact that we use in-bootstrap package manager for *installation stuff into
109+
the bootstrap chroot itself* revealed that we have to do certain mountpoints
110+
[earlier than we used to][PR#1167].
81111

82112
- Make sure we properly unmount all the Mock mount internal points even though
83113
the Mock process was interrupted using `CTRL+C` (`KeyboardInterrupt`
84-
exception). This has fixed a long-term bug which, when observed before, broke
85-
the subsequent `mock` processes including `mock --scrub`. Also, the directory
86-
removal method has been fixed to re-try under [certain
87-
circumstances][PR#1058]. Relates to [rhbz#2176689][], [rhbz#2176691][],
88-
[rhbz#2177680][], [rhbz#2181641][], etc.
114+
exception). This has fixed a long-term observed bug that kept things mounted
115+
longer than necessary, eventually breaking even subsequent `mock --scrub`
116+
attempts. Also, the internal directory removal method has been fixed to
117+
*try its job harder* under [certain circumstances][PR#1058]. Relates to
118+
[rhbz#2176689][], [rhbz#2176691][], [rhbz#2177680][], [rhbz#2181641][], etc.
89119

90120
- Python `imp` module was removed from Python 3.12, so the code was migrated to
91121
`importlib`, [issue#1140][].
@@ -96,16 +126,13 @@ Released on ????-??-??.
96126
`email.message` library which now provides the same functionality
97127
([PR#1134][]).
98128

99-
- The default recursion limit of Python scripts is set to 1000 for non-root
100-
users; this isn't enough for Mock in some use-cases so the limit was increased
101-
to 5000. For example, some utilities have directory-tree stress-tests in
102-
test suites, and for such cases a very large directory tree can cause too deep
103-
recursive calls of the `shutil.rmtree()` method.
104-
105-
- The bootstrap-related logging has been fixed so the corresponding log entries
106-
are now added to the default `root.log` file. This change should lead to
107-
a better understanding what is going on in the bootstrap chroot ([issue#539][]
108-
and [PR#1106][]).
129+
- The default recursion limit for Python scripts is set to 1000 (for non-root
130+
users); this hasn't been enough for Mock in some use-cases so the limit has
131+
been increased in v5.0+. For example, some utilities have directory-tree
132+
stress-tests their test suites, and for such cases a very large directory tree
133+
can cause too deep recursive calls of the `shutil.rmtree()` method. Users
134+
can newly also override the Mock's default via the
135+
`config_opts["recursion_limit"]` option.
109136

110137
- Mock newly never uses the `--allowerasing` option with the `dnf5 remove`
111138
command (this option has not been implemented in DNF5 and DNF5 simply fails,
@@ -120,7 +147,10 @@ Released on ????-??-??.
120147
- Mock no longer dumps the long output of the `rpmbuild --help` command into
121148
`build.log`, fixes [issue#999][].
122149

123-
## mock-core-configs v?.? changes:
150+
## mock-core-configs v39 changes:
151+
152+
- Fedora 39 configuration is branched from Rawhide, as branching date
153+
is [2023-08-08](https://fedorapeople.org/groups/schedule/f-39/f-39-all-tasks.html).
124154

125155
- The new `mock-core-configs` package is not compatible with older Mock
126156
versions, therefore the requirement was bumped to `v5.0` or newer.
@@ -138,13 +168,17 @@ Released on ????-??-??.
138168

139169
- Using `$releasever` in openEuler metalink URLs.
140170

171+
- Several configuration files were updated to work correctly with the new
172+
`use_bootstrap_image = True` in Mock 5.0. Relates to [issue#1171][]
173+
141174

142175
**Following contributors contributed to this release:**
143176

144177
* Miro Hrončok
145178
* Miroslav Suchý
146179
* Neal Gompa
147180
* zengwei2000
181+
* zengchen1024
148182

149183
Thank you.
150184

@@ -158,6 +192,7 @@ Thank you.
158192
[PR#1134]: https://github.com/rpm-software-management/mock/pull/1134
159193
[PR#1158]: https://github.com/rpm-software-management/mock/pull/1158
160194
[PR#1158]: https://github.com/rpm-software-management/mock/pull/1160
195+
[PR#1167]: https://github.com/rpm-software-management/mock/pull/1167
161196
[issue#539]: https://github.com/rpm-software-management/mock/issues/539
162197
[issue#999]: https://github.com/rpm-software-management/mock/issues/999
163198
[issue#1088]: https://github.com/rpm-software-management/mock/issues/1088
@@ -168,6 +203,8 @@ Thank you.
168203
[issue#1111]: https://github.com/rpm-software-management/mock/issues/1111
169204
[issue#1140]: https://github.com/rpm-software-management/mock/issues/1140
170205
[issue#1149]: https://github.com/rpm-software-management/mock/issues/1149
206+
[issue#1165]: https://github.com/rpm-software-management/mock/issues/1165
207+
[issue#1171]: https://github.com/rpm-software-management/mock/issues/1171
171208
[rhbz#2176689]: https://bugzilla.redhat.com/2176689
172209
[rhbz#2176691]: https://bugzilla.redhat.com/2176691
173210
[rhbz#2177680]: https://bugzilla.redhat.com/2177680

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Versions in Linux distributions:
6969

7070

7171
## Release Notes
72+
* [5.0](Release-Notes-5.0) (2023-08-09) - The `--use-bootstra-image` feature enabled by default, using `/sbin/useradd` from host (not in chroot) and configurable.
7273
* [4.1](Release-Notes-4.1) (2023-06-05) - Bug-fix v4.0 for bootstrap with custom SSL certificates, bug-fix 4.0 the --dnf-cmd option. Newly we use /bin/dnf-3 if `package_manager=dnf`, and dnf5 is used to install bootrap (if found on host).
7374
* [4.0](Release-Notes-4.0) (2023-05-22) - Support for DNF5 added, the '--use-bootstrap-image' feature now works even if Mock is run in container.
7475
* [3.5](Release-Notes-3.5) (2022-12-01) - Fixed detection of qemu-user-static* packages for the `--forcearch` feature.

mock-core-configs/mock-core-configs.spec

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
%endif
44

55
Name: mock-core-configs
6-
Version: 38.6
6+
Version: 39
77
Release: 1%{?dist}
88
Summary: Mock core config files basic chroots
99

@@ -24,7 +24,7 @@ Provides: mock-configs
2424
# distribution-gpg-keys contains GPG keys used by mock configs
2525
Requires: distribution-gpg-keys >= 1.85
2626
# specify minimal compatible version of mock
27-
Requires: mock >= 4.1.post2
27+
Requires: mock >= 5.0
2828
Requires: mock-filesystem
2929

3030
Requires(post): coreutils
@@ -144,6 +144,9 @@ fi
144144
%ghost %config(noreplace,missingok) %{_sysconfdir}/mock/default.cfg
145145

146146
%changelog
147+
* Wed Aug 09 2023 Pavel Raiskup <[email protected]> 39-1
148+
- new upstream release, per https://rpm-software-management.github.io/mock/Release-Notes-5.0
149+
147150
* Mon Jun 05 2023 Pavel Raiskup <[email protected]> 38.6-1
148151
- use python3 macro for post scriptlet ([email protected])
149152
- openEuler: use metalinks instead of baseurls ([email protected])

mock/mock.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
Summary: Builds packages inside chroots
1111
Name: mock
12-
Version: 4.1.post2
12+
Version: 5.0
1313
Release: 1%{?dist}
1414
License: GPL-2.0-or-later
1515
# Source is created by
@@ -272,6 +272,9 @@ pylint-3 py/mockbuild/ py/*.py py/mockbuild/plugins/* || :
272272
%dir %{_datadir}/cheat
273273

274274
%changelog
275+
* Wed Aug 09 2023 Pavel Raiskup <[email protected]> 5.0-1
276+
- new upstream release, per https://rpm-software-management.github.io/mock/Release-Notes-5.0
277+
275278
* Fri Jun 02 2023 Pavel Raiskup <[email protected]> 4.1-1
276279
- bootstrap: fix certificate copying into the bootstrap chroot
277280
- don't strictly require any package manager

0 commit comments

Comments
 (0)