Dne 29. 01. 21 v 12:44 Miro Hrončok napsal(a):
On 29. 01. 21 12:25, Zbigniew Jędrzejewski-Szmek wrote:Hello fellow packagers! The subject of bootstrapping came up on fedora-devel recently.I had the following idea, about which I would love to hear some feedback:== Problem: building packages with bootstrap currently involves doing *two* patches to the spec file: first to add '%global _without_bootstrap 1', then comes a rebuild, second to remove the macro, and then comes another rebuild. == Partial solutionLet's have an rpm that provides a single file that sets the macro for us:$ rpm -qpl noarch/rpm-with-bootstrap-0-1.fc34.noarch.rpm /usr/lib/rpm/macros.d/macros.rpm-with-bootstrap $ cat rpm-macros-bootstrap/macros.rpm-with-bootstrap # Enable %%with_bootstrap for all builds %_with_bootstrap 1 Then we can do the following: $ rpmdev-bumpspec 'Do rebuild w/ bootstrap' $ mock -i rpm-with-bootstrap $ fedpkg mockbuild $ rpmdev-bumpspec 'Do rebuild w/o bootstrap' $ mock -i rpm-without-bootstrap [3] $ fedpkg mockbuild Voilà! The same pattern should work with side-tags in koji. I prepared a poc implementation in [1] which builds rpm-{with,without}-{bootstrap,tests,lto}, and a test package [2] which prints the values of %with_bootstrap, %with_tests, %with_lto. == Full solution If we have automatic version bumps, this would become even simpler: $ mock -i rpm-with-bootstrap $ fedpkg mockbuild $ mock --dnf-cmd remove rpm-with-bootstrap $ fedpkg mockbuildA more general note: Your examples involve mock, not Koji. For mock, you can already do: $ fedpkg mockbuild --with bootstrap $ mock --install <built_package> $ fedpkg mockbuild For Koji, you cannot install arbitrary packages.What if instead, Koji allowed to set arbitrary macros on builds (and it keeps their definition for further reference).
https://pagure.io/koji/issue/416 https://pagure.io/koji/pull-request/898And please also note, that you can use this for modules, where you can specify macros for specific module in modulemd file.
Vít
That way, you will be able to do: $ fedpkg build --with bootstrap $ koji wait-repo ... $ fedpkg build From the same commit. No package installation required.
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx