1
1
---
2
2
layout : default
3
- title : Release Notes - Mock v?.?
3
+ title : Release Notes - Mock v5.0
4
4
---
5
5
6
- Released on ????-??-?? .
6
+ Released on 2023-08-09 .
7
7
8
- ## Mock v?.? new features:
8
+ ## Mock v5.0 new features:
9
9
10
10
- The ` use_bootstrap_image ` feature has been turned on as it was stabilized in
11
11
this release and it speeds up the bootstrap chroot preparation a lot
12
12
(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
14
14
(where UBI ` bootstrap_image ` is in use, and where ` python3-dnf-plugins-core `
15
15
is installed by default) we also turned on the ` bootstrap_image_ready=True `
16
16
which drastically speeds the bootstrap preparation. See the explanation for
@@ -46,46 +46,76 @@ Released on ????-??-??.
46
46
container, the credentials passed down by Podman are automatically detected
47
47
and used ([ PR #1130 ] [ ] ).
48
48
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.
61
67
62
68
- The bootstrap chroot installation was made smaller; newly only the
63
69
` python3-dnf ` and ` python3-dnf-plugins-core ` are installed, instead of ` dnf `
64
70
and ` dnf-plugins-core ` (which used to install also unnecessary documentation
65
71
files).
66
72
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 `
68
74
use cases) have been changed to automatically retry the download several times
69
75
to work around random network failures ([ PR #1132 ] [ ] and [ PR #1134 ] [ ] ).
70
76
71
77
- The ` dnf ` and ` dnf5 ` processes are newly always executed with the
72
78
` --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:
79
99
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 ] .
81
111
82
112
- Make sure we properly unmount all the Mock mount internal points even though
83
113
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.
89
119
90
120
- Python ` imp ` module was removed from Python 3.12, so the code was migrated to
91
121
` importlib ` , [ issue #1140 ] [ ] .
@@ -96,16 +126,13 @@ Released on ????-??-??.
96
126
` email.message ` library which now provides the same functionality
97
127
([ PR #1134 ] [ ] ).
98
128
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.
109
136
110
137
- Mock newly never uses the ` --allowerasing ` option with the ` dnf5 remove `
111
138
command (this option has not been implemented in DNF5 and DNF5 simply fails,
@@ -120,7 +147,10 @@ Released on ????-??-??.
120
147
- Mock no longer dumps the long output of the ` rpmbuild --help ` command into
121
148
` build.log ` , fixes [ issue #999 ] [ ] .
122
149
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 ) .
124
154
125
155
- The new ` mock-core-configs ` package is not compatible with older Mock
126
156
versions, therefore the requirement was bumped to ` v5.0 ` or newer.
@@ -138,13 +168,17 @@ Released on ????-??-??.
138
168
139
169
- Using ` $releasever ` in openEuler metalink URLs.
140
170
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
+
141
174
142
175
** Following contributors contributed to this release:**
143
176
144
177
* Miro Hrončok
145
178
* Miroslav Suchý
146
179
* Neal Gompa
147
180
* zengwei2000
181
+ * zengchen1024
148
182
149
183
Thank you.
150
184
@@ -158,6 +192,7 @@ Thank you.
158
192
[ PR#1134 ] : https://github.com/rpm-software-management/mock/pull/1134
159
193
[ PR#1158 ] : https://github.com/rpm-software-management/mock/pull/1158
160
194
[ PR#1158 ] : https://github.com/rpm-software-management/mock/pull/1160
195
+ [ PR#1167 ] : https://github.com/rpm-software-management/mock/pull/1167
161
196
[ issue#539 ] : https://github.com/rpm-software-management/mock/issues/539
162
197
[ issue#999 ] : https://github.com/rpm-software-management/mock/issues/999
163
198
[ issue#1088 ] : https://github.com/rpm-software-management/mock/issues/1088
@@ -168,6 +203,8 @@ Thank you.
168
203
[ issue#1111 ] : https://github.com/rpm-software-management/mock/issues/1111
169
204
[ issue#1140 ] : https://github.com/rpm-software-management/mock/issues/1140
170
205
[ 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
171
208
[ rhbz#2176689 ] : https://bugzilla.redhat.com/2176689
172
209
[ rhbz#2176691 ] : https://bugzilla.redhat.com/2176691
173
210
[ rhbz#2177680 ] : https://bugzilla.redhat.com/2177680
0 commit comments