Skip to content

Commit

Permalink
[mock] release [4.0-1] and [mock-core-configs] release [38.5-1]
Browse files Browse the repository at this point in the history
/usr/bin/tito tag --use-version 4.0 // mock
/usr/bin/tito tag // mock-core-configs

Closes: #1077
  • Loading branch information
praiskup committed May 22, 2023
1 parent 5ac3ab3 commit 38fabbb
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .tito/packages/mock
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.5-1 mock/
4.0-1 mock/
2 changes: 1 addition & 1 deletion .tito/packages/mock-core-configs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
38.4-1 mock-core-configs/
38.5-1 mock-core-configs/
94 changes: 94 additions & 0 deletions docs/Release-Notes-4.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
layout: default
title: Release Notes - Mock v4.0
---

Released on 2023-05-22.

## Mock v4.0 new features:

- The RPM Software Management team(s) work hard on the [DNF5][] project, which
is planned to be the [default package manager in F39][]. Compared to [DNF4][],
DNF5 is a from-scratch rewritten software, implying that features and
command-line options might be implemented differently. That's why Mock needed
a special logic to support it. While DNF5 is still not the default at this
moment, Mock 4+ supports it and allows users to experiment:

```
$ mock -r fedora-rawhide-x86_64 --config-opts=package_manager=dnf5 --shell
```

When used like this, Mock installs DNF5 package manager into the bootstrap
chroot first (using DNF5 itself, if found on host, or just using DNF4).
Later, using DNF5 from bootstrap, installs the target Rawhide buildroot.

- The [--use-bootstrap-image](Feature-container-for-bootstrap) feature,
implemented using the containerization [Podman][] command-line tooling, did
not work correctly if Mock itself was run
[in container](index#mock-inside-podman-fedora-toolbox-or-docker-container).
At the time of releasing Mock 4.0, running nested Podman containers still
requires quite a lot of
[configuration done in the image](https://github.com/containers/podman/blob/36510f6/contrib/podmanimage/stable/Containerfile).
So the requirements were relaxed to not run Podman containers, but only
extract the container images using the [podman image mount][PR#1073] feature.
So now, the `--use-bootstrap-image` feature works if Mock is run in Podman.

- Mock historically called the `useradd` utility with `-n` option to not create
the default `mock` group in the chroot. The `-n` option has been a Red Hat
Enterprise Linux downstream patch, later implemented upstream as `-N`. The
`-N` option is now supported almost everywhere (since RHEL 6+). If you build
for older chroots than Enterprise Linux 6 (EOL nowadays), you might need to
modify the `config_opts["useradd"]` option.

## Mock v4.0 bugfixes:

- The "essential" mount-points (`/proc`, `/sys`, ..) were not correctly mounted
to the target buildroot at the time of its installation/initialization (when
package manager from bootstrap chroot is used to install the buildroot
packages). This wasn't very obvious, because, during the later phases of Mock
builds, Mock had those essential mount points mounted. This caused issues
with the installation of packages that relied on their existence, see
[rhbz#2166028].

- Before killing the leftover in-chroot processes, older Mock versions first
unmounted (well at least it tried) the mounted filesystems in the chroot.
This has been fixed, and Mock does it vice-versa so both unmounting itself is
less likely to have problems and killing the processes is easier.

- Mock ignored the `bootstrap_` prefixed `config_opts` options, especially
useful on commandline for debugging (e.g.
`--config-opts=bootstrap_chroot_additional_packages=package-foo`). The
configuration option logic
[was adjusted](https://github.com/rpm-software-management/mock/commit/8bd4adcaa197af4a7b6a915a01484c51d1c1cc5b)
to fix this problem.

- The manual page of Mock was fixed so users are now instructed to fill issues
against the GitHub upstream [Mock project](https://github.com/rpm-software-management/mock/issues),
not the Red Hat Bugzilla.

## mock-core-configs-38.4-1

- Fedora 35 and 36 are now EOL, so the configuration was moved
- The `includepkgs=devtoolset*` options were
[dropped](https://github.com/rpm-software-management/mock/pull/1042) from the
SCL-related CentOS 7 configuration. This allows the installation of other SCL
packages during package build (specified by `BuildRequires:`).
- The `useradd` override configuration was removed as it is not needed now,
Mock v4.0 now uses `useradd -N` (not `useradd -n`) by default.
- The openSUSE i586 repos have been moved out of the main repos into a port.

**Following contributors contributed to this release:**

* @cheese1
* @lilinjie
* Miroslav Suchý

Thank you.


[Podman]: https://podman.io/
[DNF5]: https://github.com/rpm-software-management/dnf5
[DNF4]: https://github.com/rpm-software-management/dnf
[PR#1073]: https://github.com/rpm-software-management/mock/pull/1073
[default package manager in F39]: https://fedoraproject.org/wiki/Changes/ReplaceDnfWithDnf5
[rhbz#2166028]: https://bugzilla.redhat.com/show_bug.cgi?id=2166028
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Versions in Linux distributions:


## Release Notes
* [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.
* [3.5](Release-Notes-3.5) (2022-12-01) - Fixed detection of qemu-user-static* packages for the `--forcearch` feature.
* [3.4](Release-Notes-3.4) (2022-11-15) - Device Mapper control file exposed, better detection for qemu-user-static.
* [3.3](Release-Notes-3.3) (2022-10-17) - Mock can again be run by `root`, even though this is discouraged.
Expand Down
10 changes: 8 additions & 2 deletions mock-core-configs/mock-core-configs.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: mock-core-configs
Version: 38.4
Version: 38.5
Release: 1%{?dist}
Summary: Mock core config files basic chroots

Expand All @@ -20,7 +20,7 @@ Provides: mock-configs
# distribution-gpg-keys contains GPG keys used by mock configs
Requires: distribution-gpg-keys >= 1.85
# specify minimal compatible version of mock
Requires: mock >= 2.5
Requires: mock >= 4.0
Requires: mock-filesystem

Requires(post): coreutils
Expand Down Expand Up @@ -140,6 +140,12 @@ fi
%ghost %config(noreplace,missingok) %{_sysconfdir}/mock/default.cfg

%changelog
* Mon May 22 2023 Pavel Raiskup <praiskup@redhat.com> 38.5-1
- drop includepkgs=devtoolset* from centos-{6,7} (orion@nwra.com)
- Fedora 35 and 36 is EOL
- remove useradd specific changes in configs - it is not needed for Mock 4+
- openSUSE i586 has been moved out of the main repo into a port (f_krull@gmx.de)

* Sat Apr 15 2023 Pavel Raiskup <praiskup@redhat.com> 38.4-1
- Add Amazon Linux 2023 mock configs (trawets@amazon.com)

Expand Down
13 changes: 12 additions & 1 deletion mock/mock.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Summary: Builds packages inside chroots
Name: mock
Version: 3.5
Version: 4.0
Release: 1%{?dist}
License: GPL-2.0-or-later
# Source is created by
Expand Down Expand Up @@ -261,6 +261,17 @@ pylint-3 py/mockbuild/ py/*.py py/mockbuild/plugins/* || :
%dir %{_datadir}/cheat

%changelog
* Mon May 22 2023 Pavel Raiskup <praiskup@redhat.com> 4.0-1
- cleanup the bootstrap image logic so it works if Mock is run in container
- rebuild: kill orphans when mounted
- bootstrap: delay the buildroot-in-bootstrap recursive mount
- use shlex instead of pipes
- fix bootstrap_* prefixed config_opts options
- manual page: fix the "how to fill an issue" info
- support for DNF5 added
- use -N instead of -n for useradd (msuchy@redhat.com)
- mock: don't use distutils copy_tree()

* Thu Dec 01 2022 Pavel Raiskup <praiskup@redhat.com> 3.5-1
- check for qemu-user-static raises InvalidArchitecture()
- forcearch: map armv7hl to the /usr/bin/qemu-arm-static binary
Expand Down

0 comments on commit 38fabbb

Please sign in to comment.