deb-mock/docs/Release-Notes-4.0.md
robojerk 4c0dcb2522
Some checks failed
Build Deb-Mock Package / build (push) Successful in 54s
Lint Code / Lint All Code (push) Failing after 1s
Test Deb-Mock Build / test (push) Failing after 36s
enhance: Add comprehensive .gitignore for deb-mock project
- Add mock-specific build artifacts (chroot/, mock-*, mockroot/)
- Include package build files (*.deb, *.changes, *.buildinfo)
- Add development tools (.coverage, .pytest_cache, .tox)
- Include system files (.DS_Store, Thumbs.db, ._*)
- Add temporary and backup files (*.tmp, *.bak, *.backup)
- Include local configuration overrides (config.local.yaml, .env.local)
- Add test artifacts and documentation builds
- Comprehensive coverage for Python build system project

This ensures build artifacts, chroot environments, and development
tools are properly ignored in version control.
2025-08-18 23:37:49 -07:00

4.4 KiB

layout title
default 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, implemented using the containerization Podman command-line tooling, did not work correctly if Mock itself was run in container. At the time of releasing Mock 4.0, running nested Podman containers still requires quite a lot of configuration done in the image. So the requirements were relaxed to not run Podman containers, but only extract the container images using the podman image mount 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 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, not the Red Hat Bugzilla.

mock-core-configs-38.5-1

  • Fedora 35 and 36 are now EOL, so the configuration was moved
  • The includepkgs=devtoolset* options were dropped 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.