diff --git a/.tito/packages/mock b/.tito/packages/mock index e848bc9d4..c6a2163c5 100644 --- a/.tito/packages/mock +++ b/.tito/packages/mock @@ -1 +1 @@ -5.4-1 mock/ +5.5-1 mock/ diff --git a/.tito/packages/mock-core-configs b/.tito/packages/mock-core-configs index 6452808fc..5aad1b239 100644 --- a/.tito/packages/mock-core-configs +++ b/.tito/packages/mock-core-configs @@ -1 +1 @@ -39.4-1 mock-core-configs/ +40.1-1 mock-core-configs/ diff --git a/docs/Release-Notes-5.5.md b/docs/Release-Notes-5.5.md new file mode 100644 index 000000000..3970122c1 --- /dev/null +++ b/docs/Release-Notes-5.5.md @@ -0,0 +1,128 @@ +--- +layout: default +title: Release Notes - Mock 5.5 +--- + +Released on 2024-02-14. + + +### Mock 5.5 New Features + +- New `write_tar` option for `chroot_scan` plugin [added][PR#1324]. Without it, + directory structure is created in `resultdir`. If `write_tar` is set to + `True`, `chroot_scan.tar.gz` tarball will be created instead. + +- A new `{{ repo_arch }}` Jinja2 template (templated-dictionary) is provided + by Mock. This variable is usable for DNF config options denoting URLs like + `baseurl=`, `metalink=`, etc. Namely, it can be used instead of the DNF-native + `$basearch` variable which [doesn't work properly for all the + distributions][issue#1304]. The new `config_opts['repo_arch_map']` option has + been added too, if additional tweaks with `repo_arch` template need to be done. + +- Previously, only the file sizes were reported by the hw_info plugin: + + ~~~ + Filesystem Size Used Avail Use% Mounted on + /dev/mapper/luks-3aa4fbe3-5a19-4025-b70c-1d3038b76bd4 399G 9.1G 373G 3% / + /dev/mapper/luks-3aa4fbe3-5a19-4025-b70c-1d3038b76bd4 399G 9.1G 373G 3% / + ~~~ + + Newly, [also file system type is reported][issue#1263]: + + ~~~ + Filesystem Type Size Used Avail Use% Mounted on + /dev/mapper/luks-3aa4fbe3-5a19-4025-b70c-1d3038b76bd4 btrfs 399G 9.1G 373G 3% / + /dev/mapper/luks-3aa4fbe3-5a19-4025-b70c-1d3038b76bd4 btrfs 399G 9.1G 373G 3% / + ~~~ + + +### Mock 5.5 Bugfixes + +- The Bash completion script has been fixed to properly complete arguments + of [multi-arg options][issue#1279] like `--install` or `--chain`. This + bug-fix is a follow-up for fix related to [issue#746][]. + +- Mock [has been][PR#1322] [fixed][commit#27dde5da] so that it no longer + inadvertently changes the group ownership of the in-chroot $HOME directory + to the wrong group ID. In previous versions of Mock, the group ownership + was changed to the effective group ID of the user on the host that + executed Mock. This could confuse some tools during the build process, as + they might want to create similarly owned files at the `rpmbuild` time + (but that assumption would be incorrect, such GID doesn't exist + in-chroot). Now, Mock changes the files to the `mockbuild:mock` + ownership, where the `mock` group ID is always 135 (the same GID on host + and in-chroot). This matches the effective GID for the `rpmbuild` + process, ensuring that the tools executed during the build process have + full control over such files. + + While on this, Mock was also [optimized][commit#db64d468202] to do this + ownership change before, and only if, the `rpmbuild` process is started + (so e.g. plain `mock --chroot` commands do not touch the file ownership at + all). + +- The `mock` package has been fixed to depend on precisely the same version + of `mock-filesystem` sub-package (product of the same rpm build). This is + to protect against incompatible Mock sub-package installations. + +- Mock parses the DNF configuration specified in `config_opts["dnf.conf"]` itself + to perform some post-processing tasks, such as bind-mounting the on-host repo + directories into the bootstrap chroot based on this DNF config. In previous + versions of Mock, there was an issue where it failed to parse the DNF config if + some of the DNF options contained the '%' symbol. This was due to Python's + ConfigParser raising an %-interpolation exception that was ignored but Mock, but + resulting in Mock ignoring the rest of the config file and finishing without + performing the mentioned bind-mounts. This bug has been fixed, and the '%' sign + is no longer considered to be a special Python ConfigParser character. + +- The `root_cache` plugin is designed to invalidate the cache tarball whenever the + corresponding Mock configuration changes (any file in the list + `config_opts['config_paths']` changes). This cache invalidation mechanism had + been broken since Mock v3.2 when we rewrote the configuration file loader and + inadvertently broke the `config_opts['config_paths']`. The config loader [has + now been fixed][PR#1322], and the cache invalidation works again as expected. + +### Mock Core Configs 40.1 changes + +- Configuration files for Fedora 40 have been branched from Rawhide, + according to the [Fedora 40 Schedule](https://fedorapeople.org/groups/schedule/f-40/f-40-all-tasks.html). + +- Mageia 7 configs [marked as end-of-life][PR#1316]. + +- Mageia config files started using the `{{ repo_arch }}` option to fix the + [cross-arch builds][issue#1317]. + +- The OpenMandriva i686 chroots [have been marked as end-of-life][PR#1315], fixing + [issue#987][] and [issue#1012][]. + +- [Added][PR#1283] a config option called "use_host_shadow_utils", to account for situations where + users have host shadow-utils configurations that cannot provision or destroy users and + groups in the buildroot; one example of this kind of configuration is using + FreeIPA-provided subids on the buildhost. The option defaults to True since mock has made a conscious + design decision to prefer using the host's shadow-utils, and we hope that this is a + temporary workaround. Upstream issue is being tracked [here](https://github.com/shadow-maint/shadow/issues/897). + +**Following contributors contributed to this release:** + + * Jakub Kadlcik + * Jani Välimaa + * Martin Jackson + * Tomas Kopecek + * Vít Ondruch + + +Thank you! + +[commit#db64d468202]: https://github.com/rpm-software-management/mock/commit/db64d468202 +[issue#1012]: https://github.com/rpm-software-management/mock/issues/1012 +[commit#27dde5da]: https://github.com/rpm-software-management/mock/commit/27dde5da +[PR#1324]: https://github.com/rpm-software-management/mock/pull/1324 +[PR#1322]: https://github.com/rpm-software-management/mock/pull/1322 +[issue#987]: https://github.com/rpm-software-management/mock/issues/987 +[PR#1315]: https://github.com/rpm-software-management/mock/pull/1315 +[PR#1283]: https://github.com/rpm-software-management/mock/pull/1283 +[issue#1263]: https://github.com/rpm-software-management/mock/issues/1263 +[issue#746]: https://github.com/rpm-software-management/mock/issues/746 +[issue#1317]: https://github.com/rpm-software-management/mock/issues/1317 +[issue#1304]: https://github.com/rpm-software-management/mock/issues/1304 +[issue#1279]: https://github.com/rpm-software-management/mock/issues/1279 +[PR#1316]: https://github.com/rpm-software-management/mock/pull/1316 diff --git a/docs/index.md b/docs/index.md index 0c31d49f9..aa191f56b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -69,6 +69,7 @@ Versions in Linux distributions: ## Release Notes +* [5.5](Release-Notes-5.5) (2024-02-14) - The `{{ repo_arch }}` support added, chroot_scan supports tarballs, ownership during `--init` fixed, fixed `root_cache` tarball invalidation problem. * [5.4](Release-Notes-5.4) (2024-01-04) - Bugfix the rpmautospec plugin. * [5.3](Release-Notes-5.3) (2023-12-13) - New "rpmautospec" plugin added, `%generate_buildrequries` fixes landed. * [Configs 39.3](Release-Notes-Configs-39.3) - Fedora 40+ configuration uses DNF5, Fedora ELN and OpenMandriva fixes. diff --git a/mock-core-configs/mock-core-configs.spec b/mock-core-configs/mock-core-configs.spec index 5fb390f41..246b8bac1 100644 --- a/mock-core-configs/mock-core-configs.spec +++ b/mock-core-configs/mock-core-configs.spec @@ -3,7 +3,7 @@ %endif Name: mock-core-configs -Version: 40.0.post1 +Version: 40.1 Release: 1%{?dist} Summary: Mock core config files basic chroots @@ -151,6 +151,12 @@ fi %ghost %config(noreplace,missingok) %{_sysconfdir}/mock/default.cfg %changelog +* Wed Feb 14 2024 Pavel Raiskup +- new '{{ repo_arch }}' template variable used for Mageia +- Mageia 7 is EOL (wally@mageia.org) +- OpenMandriva i686 is EOL (frostyx@email.cz) +- Fedora 40 branched + * Thu Jan 11 2024 Pavel Raiskup 39.4-1 - configure system_cachedir for dnf5 - configs: EOL Fedora 37 diff --git a/mock/mock.spec b/mock/mock.spec index 90eebedf7..c4717b006 100644 --- a/mock/mock.spec +++ b/mock/mock.spec @@ -9,7 +9,7 @@ Summary: Builds packages inside chroots Name: mock -Version: 5.4.post1 +Version: 5.5 Release: 1%{?dist} License: GPL-2.0-or-later # Source is created by @@ -289,6 +289,18 @@ pylint-3 py/mockbuild/ py/*.py py/mockbuild/plugins/* || : %dir %{_datadir}/cheat %changelog +* Wed Feb 14 2024 Pavel Raiskup +- allow chroot_scan to create archive instead of directory (tkopecek@redhat.com) +- handle greedy options in Bash completion +- fix root_cache invalidation (not) triggered by config changes +- new '{{ repo_arch }}' Jinja2 template support +- package_manager: disable %%-interpolation in dnf.conf parser +- only `chown` the in-chroot home files with the --rebuild mode +- all non-privileged actions performed wiht EGID=135 (mock group) +- mock newly requires a precise version of mock-filesystem +- allow shadow-utils to run in buildroot by exception if necessary (martjack@redhat.com) +- hw_info now reports file system type (vondruch@redhat.com) + * Thu Jan 04 2024 Pavel Raiskup 5.4-1 - Fix installing rpmautospec plugin dependencies (yzhu@redhat.com) diff --git a/releng/release-notes-next/chroot_scan_tarball.feature b/releng/release-notes-next/chroot_scan_tarball.feature deleted file mode 100644 index a97c05545..000000000 --- a/releng/release-notes-next/chroot_scan_tarball.feature +++ /dev/null @@ -1,3 +0,0 @@ -New `write_tar` option for `chroot_scan` plugin [added][PR#1324]. Without it, directory -structure is created in `resultdir`. If `write_tar` is set to `True`, -write_tar will be created instead. diff --git a/releng/release-notes-next/fedora-40-branching.feature b/releng/release-notes-next/fedora-40-branching.feature deleted file mode 100644 index 5a25eeca3..000000000 --- a/releng/release-notes-next/fedora-40-branching.feature +++ /dev/null @@ -1,2 +0,0 @@ -Configuration files for Fedora 40 have been branched from Rawhide, -according to the [Fedora 40 Schedule](https://fedorapeople.org/groups/schedule/f-40/f-40-all-tasks.html). diff --git a/releng/release-notes-next/greedy-options-bash-completion.bugfix b/releng/release-notes-next/greedy-options-bash-completion.bugfix deleted file mode 100644 index bfbef0deb..000000000 --- a/releng/release-notes-next/greedy-options-bash-completion.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -The Bash completion script has been fixed to properly complete arguments -of [multi-arg options][issue#1279] like `--install` or `--chain`. This -bug-fix is a follow-up for fix related to [issue#746][]. diff --git a/releng/release-notes-next/init-and-ownership-problems.bugfix b/releng/release-notes-next/init-and-ownership-problems.bugfix deleted file mode 100644 index d3b9080ac..000000000 --- a/releng/release-notes-next/init-and-ownership-problems.bugfix +++ /dev/null @@ -1,17 +0,0 @@ -Mock [has been][PR#1322] [fixed][commit#27dde5da] so that it no longer -inadvertently changes the group ownership of the in-chroot $HOME directory -to the wrong group ID. In previous versions of Mock, the group ownership -was changed to the effective group ID of the user on the host that -executed Mock. This could confuse some tools during the build process, as -they might want to create similarly owned files at the `rpmbuild` time -(but that assumption would be incorrect, such GID doesn't exist -in-chroot). Now, Mock changes the files to the `mockbuild:mock` -ownership, where the `mock` group ID is always 135 (the same GID on host -and in-chroot). This matches the effective GID for the `rpmbuild` -process, ensuring that the tools executed during the build process have -full control over such files. - -While on this, Mock was also [optimized][commit#db64d468202] to do this -ownership change before, and only if, the `rpmbuild` process is started -(so e.g. plain `mock --chroot` commands do not touch the file ownership at -all). diff --git a/releng/release-notes-next/mageia-7-eol.config b/releng/release-notes-next/mageia-7-eol.config deleted file mode 100644 index b329a09ca..000000000 --- a/releng/release-notes-next/mageia-7-eol.config +++ /dev/null @@ -1 +0,0 @@ -Mageia 7 configs [marked as end-of-life][PR#1316]. diff --git a/releng/release-notes-next/mageia-cross-arch.config b/releng/release-notes-next/mageia-cross-arch.config deleted file mode 100644 index 61c43c00a..000000000 --- a/releng/release-notes-next/mageia-cross-arch.config +++ /dev/null @@ -1,2 +0,0 @@ -Mageia config files started using the `{{ repo_arch }}` option to fix the -[cross-arch builds][issue#1317]. diff --git a/releng/release-notes-next/mock-filesystem-deps.bugfix b/releng/release-notes-next/mock-filesystem-deps.bugfix deleted file mode 100644 index 80bb45091..000000000 --- a/releng/release-notes-next/mock-filesystem-deps.bugfix +++ /dev/null @@ -1,3 +0,0 @@ -The `mock` package has been fixed to depend on precisely the same version -of `mock-filesystem` sub-package (product of the same rpm build). This is -to protect against incompatible Mock sub-package installations. diff --git a/releng/release-notes-next/openmandriva-i686-eol.config b/releng/release-notes-next/openmandriva-i686-eol.config deleted file mode 100644 index 3b368343c..000000000 --- a/releng/release-notes-next/openmandriva-i686-eol.config +++ /dev/null @@ -1,2 +0,0 @@ -The OpenMandriva i686 chroots [have been marked as end-of-life][PR#1315], fixing -[issue#987][] and [issue#1012][]. diff --git a/releng/release-notes-next/percent-interpolation-in-dnf-config.bugfix b/releng/release-notes-next/percent-interpolation-in-dnf-config.bugfix deleted file mode 100644 index 2ccde3d4b..000000000 --- a/releng/release-notes-next/percent-interpolation-in-dnf-config.bugfix +++ /dev/null @@ -1,9 +0,0 @@ -Mock parses the DNF configuration specified in `config_opts["dnf.conf"]` itself -to perform some post-processing tasks, such as bind-mounting the on-host repo -directories into the bootstrap chroot based on this DNF config. In previous -versions of Mock, there was an issue where it failed to parse the DNF config if -some of the DNF options contained the '%' symbol. This was due to Python's -ConfigParser raising an %-interpolation exception that was ignored but Mock, but -resulting in Mock ignoring the rest of the config file and finishing without -performing the mentioned bind-mounts. This bug has been fixed, and the '%' sign -is no longer considered to be a special Python ConfigParser character. diff --git a/releng/release-notes-next/repo-arch.feature b/releng/release-notes-next/repo-arch.feature deleted file mode 100644 index 5c72b2224..000000000 --- a/releng/release-notes-next/repo-arch.feature +++ /dev/null @@ -1,6 +0,0 @@ -A new `{{ repo_arch }}` Jinja2 template (templated-dictionary) is provided -by Mock. This variable is usable for DNF config options denoting URLs like -`baseurl=`, `metalink=`, etc. Namely, it can be used instead of the DNF-native -`$basearch` variable which [doesn't work properly for all the -distributions][issue#1304]. The new `config_opts['repo_arch_map']` option has -been added too, if additional tweaks with `repo_arch` template need to be done. diff --git a/releng/release-notes-next/report-file-system-type.feature b/releng/release-notes-next/report-file-system-type.feature deleted file mode 100644 index 0fde77cee..000000000 --- a/releng/release-notes-next/report-file-system-type.feature +++ /dev/null @@ -1,15 +0,0 @@ -Previously, only the file sizes were reported by the hw_info plugin: - -~~~ -Filesystem Size Used Avail Use% Mounted on -/dev/mapper/luks-3aa4fbe3-5a19-4025-b70c-1d3038b76bd4 399G 9.1G 373G 3% / -/dev/mapper/luks-3aa4fbe3-5a19-4025-b70c-1d3038b76bd4 399G 9.1G 373G 3% / -~~~ - -Newly, [also file system type is reported][issue#1263]: - -~~~ -Filesystem Type Size Used Avail Use% Mounted on -/dev/mapper/luks-3aa4fbe3-5a19-4025-b70c-1d3038b76bd4 btrfs 399G 9.1G 373G 3% / -/dev/mapper/luks-3aa4fbe3-5a19-4025-b70c-1d3038b76bd4 btrfs 399G 9.1G 373G 3% / -~~~ diff --git a/releng/release-notes-next/root_cache_invalidation.bugfix b/releng/release-notes-next/root_cache_invalidation.bugfix deleted file mode 100644 index d61f4bc3f..000000000 --- a/releng/release-notes-next/root_cache_invalidation.bugfix +++ /dev/null @@ -1,6 +0,0 @@ -The `root_cache` plugin is designed to invalidate the cache tarball whenever the -corresponding Mock configuration changes (any file in the list -`config_opts['config_paths']` changes). This cache invalidation mechanism had -been broken since Mock v3.2 when we rewrote the configuration file loader and -inadvertently broke the `config_opts['config_paths']`. The config loader [has -now been fixed][PR#1322], and the cache invalidation works again as expected. diff --git a/releng/release-notes-next/use_host_shadow_utils.config b/releng/release-notes-next/use_host_shadow_utils.config deleted file mode 100644 index 1ebabd5e5..000000000 --- a/releng/release-notes-next/use_host_shadow_utils.config +++ /dev/null @@ -1,6 +0,0 @@ -[Added][PR#1283] a config option called "use_host_shadow_utils", to account for situations where -users have host shadow-utils configurations that cannot provision or destroy users and -groups in the buildroot; one example of this kind of configuration is using -FreeIPA-provided subids on the buildhost. The option defaults to True since mock has made a conscious -design decision to prefer using the host's shadow-utils, and we hope that this is a -temporary workaround. Upstream issue is being tracked [here](https://github.com/shadow-maint/shadow/issues/897).