From 4083c1bc52d5ea62c9f2a499339d082f35d12b5b Mon Sep 17 00:00:00 2001 From: Otto Liljalaakso Date: Jan 06 2023 22:28:09 +0000 Subject: Simplify scratch build instructions Page "Using the Koji Build System" had a section about Koji scratch builds, listing various way of doing them using 'koji' and 'fedpkg'. This listing was not specifically useful, because: * It was not comprehensive, i.e. it just enumerated possible arguments, but did not cover all of them. * It did not have a clear position if koji or fedpkg should be preferred, and similarly for 'fedpkg build --scratch' and 'fedpkg scratch-build'. * It did not differentiate between rare needs like building against defined Koji target or doing a scratch build from a pushed dist-git commit, and the common need of building from local changes. * It suggested calling 'rpmbuild' directly, without anything in these docs explaining how to configure it correctly. Actually, only the most common case is worth documenting like this, and it should be in "Package Maintenance Guide". Such simplification is done here, by erasing the whole section and documenting 'fedpkg scratch-build --srpm' in the Guide. --- diff --git a/modules/ROOT/pages/Package_Maintenance_Guide.adoc b/modules/ROOT/pages/Package_Maintenance_Guide.adoc index edf3bdd..95d78f1 100644 --- a/modules/ROOT/pages/Package_Maintenance_Guide.adoc +++ b/modules/ROOT/pages/Package_Maintenance_Guide.adoc @@ -91,14 +91,16 @@ https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds[Using Mock to T fedpkg srpm .... -You can request a Koji _scratch build_ -(a test build, which will not go to any repository) -of the generated .src.rpm -with the `koji build --scratch` command (see `man koji`). - === Do a scratch build using Koji +.... +fedpkg scratch-build --srpm +.... -See xref:Using_the_Koji_Build_System#scratch_builds[Koji scratch builds]. +This builds the package against the buildroot in the Koji buildsystem, +without actually including it in the release. +This kind of test build is more effective in revealing problems than a local Mock build, +because it covers all officially supported architectures +and builds against Koji's buildroot rather than a release repository. === Check changes you have made .... diff --git a/modules/ROOT/pages/Using_the_Koji_Build_System.adoc b/modules/ROOT/pages/Using_the_Koji_Build_System.adoc index 9ae213f..0819216 100644 --- a/modules/ROOT/pages/Using_the_Koji_Build_System.adoc +++ b/modules/ROOT/pages/Using_the_Koji_Build_System.adoc @@ -91,55 +91,6 @@ If a build fails, following builds are canceled, but the builds that already succeeded are pushed to the repository. -[#scratch_builds] -=== Scratch Builds - -Sometimes it is useful to be able to build a package against the buildroot -without actually including it in the release. -This is called a scratch build. - -The following section covers using koji directly, -as well as the fedpkg tool, -to do scratch builds. - -To create a scratch build from changes you haven't committed, do the following: - -.... -fedpkg scratch-build --srpm -.... - -From the latest git commit: - -.... -koji build --scratch rawhide 'git url' -.... - -If you have committed the changes to git -and you are in the current branch, -you can do a scratch build with `fedpkg`, -which wraps the koji command line tool with the appropriate options: - -.... -fedpkg scratch-build -.... - -To run a scratch build for a specific architecture: - -.... -fedpkg scratch-build --arches -.... - -``can be a comma separated list of several architectures. - -Finally, it is possible to combine the scratch-build command -with a specific koji tag in the form: - -.... -fedpkg scratch-build --target TARGET -.... - -Run `fedpkg scratch-build --help` or `koji build --help` for more information. - [#build_failures] === Build Failures