deb-mock/docs/FAQ.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

1.9 KiB

layout title
default FAQ

FAQ

How to preserve environment variable in chroot

Q: I put

config_opts['environment']['VAR'] = os.environ['VAR']

into config, but the variable is not preserved.

A: Environment is sanitized by consolehelper when elevating UID. You need to alter /etc/security/console.apps/mock too.

I cannot build Fedora or RHEL8 beta package on RHEL/CentOS 7

Q: I am on RHEL 7 and when I run mock -r fedora-28-x86_64 --init (similarly for rhelbeta-8-x86_64) I get:

....
---> Package patch.x86_64 0:2.7.6-4.fc28 will be installed
---> Package redhat-rpm-config.noarch 0:108-1.fc28 will be installed
Error: Invalid version flag: if

A: This is not Mock error. This is because redhat-rpm-config in Fedora 28 (& RHEL 8 Beta) contains rich dependency: Requires: (annobin if gcc). This is a new rpm's feature and is not recognized by RHEL7's rpm. When you are installing the fedora-28 chroot, mock is using host's rpm. And RHEL7 rpm cannot install this package, because of the new feature, which does not recognize.

The solution is to use mock's bootstrap feature. It is not enabled by default, because there are still some unresolved issues, but generally it works. Try:

mock -r fedora-28-x86_64 --init --bootstrap-chroot

When I can expect next release

Q: A developer merged my pull-request. When I can expect the next release with my fix?

A: I try to stick to two month cadence. Check the last release date and add two months and you can set your expectation. Of course things like Christmas or summer holidays can add a few weeks. On the other hand the branching event in Fedora can make it shorter as I usually do a mock release a day before Fedora branches, because I had to add new configs there anyway.