New arguments for building source RPMs are introduced:
x-pkg srpm --srpm-mock
x-pkg mockbuild --srpm-mock
x-pkg build --srpm-mock
x-pkg scratch-build --srpm-mock
It works for projects with a single specfile.
JIRA: RHELCMP-374 Fixes: #495
Signed-off-by: Ondrej Nosek onosek@redhat.com
Based on my testing it works if the spec file can be parsed on host system, and then the srpm is built in mock. But if the spec file can not be parsed, the build still doesn't start. I tested with rhpkg srpm --mock in dist-git-server repo, branch eng-rhel-7. It fails the same way no matter whether --mock is used or not. I would expect it to work in mock.
rhpkg srpm --mock
--mock
rebased onto 35d34ac9e127d32a2b4e086ee72be4af8cafcd33
rebased onto b034bddee431f714f4e02645ba6301b5163b65bd
This seems to work for me now. It's very slow, but still an improvement since without this feature the task would not work at all. At least with the cleanup disabled second run is reasonably quick.
I see --no-clean
--no-clean
Yes, I used --no-cleanup-after --no-clean-all --no-clean just to be sure. I don't think it will help when mockbuild is used only once. But I can see it useful when e.g. debugging something and repeatedly building the same package with only spec tweaks.
--no-cleanup-after --no-clean-all --no-clean
mockbuild
rebased onto e94dc065666bd7ff4940c585747194400d915d9a
Added support for the cleaning arguments above for 'x-pkg srpm'. Previously only 'x-pkg mockbuild' understood them.
Pull-Request has been merged by onosek
New arguments for building source RPMs are introduced:
x-pkg srpm --srpm-mock: Creates source RPM with 'mock' insteadof 'rpmbuild'
x-pkg mockbuild --srpm-mock: Generate source rpm with 'mock'and then run 'mockbuild' using this source rpm.
x-pkg build --srpm-mock: Use source rpm generated with mockfor building.
x-pkg scratch-build --srpm-mockIt works for projects with a single specfile.
JIRA: RHELCMP-374
Fixes: #495
Signed-off-by: Ondrej Nosek onosek@redhat.com