Hey CIers!
I need to do the following on the PR pipeline:
1. dnf install mock (I know how) 2. mock -r fedora-rawhide-x86_64 init (should work) 3. mock -r fedora-rawhide-x86_64 <package_form_ci_koji_scratchbuild> (no idea) 4. various package builds in that mock (no problem)
Could you please help me with 3?
The package should be installed on the system so I might be able to salvage it from the dnf cache, but I'm not sure if that it reliable.
Thanks,
Hi, Miro,
is it critical to use mock for a package build?
Mock provides the default Fedora environment and buildroot, while you probably need a _current_ Fedora environment, which includes the package being tested. So it might be easier to run rpmbuild directly without additional layer of isolation.
If you do need to use mock, then I'd suggest that you would create a custom mock configuration, which uses rpm repos from the test environment. The repo with a scratch build is already available there, under the name of test.repo.
I can not find a shortcut for this in mock, but you can just run smth like "cat /etc/yum.repos.d/* > /etc/mock/custom.cfg". With some additional wrappers of course.
On 03. 07. 19 16:00, Aleksandra Fedorova wrote:
Hi, Miro,
is it critical to use mock for a package build?
Yes.
Mock provides the default Fedora environment and buildroot, while you probably need a _current_ Fedora environment, which includes the package being tested. So it might be easier to run rpmbuild directly without additional layer of isolation.
I need to test an RPM macro package, whether it correctly generates and build packages with DynamicBuildrequires.
If you do need to use mock, then I'd suggest that you would create a custom mock configuration, which uses rpm repos from the test environment. The repo with a scratch build is already available there, under the name of test.repo.
Good, I can work with that.
I can not find a shortcut for this in mock, but you can just run smth like "cat /etc/yum.repos.d/* > /etc/mock/custom.cfg". With some additional wrappers of course.
Awesome, thanks!
On 03. 07. 19 16:03, Miro Hrončok wrote:
If you do need to use mock, then I'd suggest that you would create a custom mock configuration, which uses rpm repos from the test environment. The repo with a scratch build is already available there, under the name of test.repo.
Good, I can work with that.
I've talked to Aleksandra on IRC, and we have figured out the repo is actually at /etc/yum.repos.d/test-<pkgname>.repo