From 0daa4fd4b007ca2df112e28b881ad70c0013c0d4 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Nov 15 2019 13:43:27 +0000 Subject: Add guide for using buildonly Signed-off-by: Stephen Gallagher --- diff --git a/modules/ROOT/pages/making-modules/defining-modules.adoc b/modules/ROOT/pages/making-modules/defining-modules.adoc index 58e9417..155d255 100644 --- a/modules/ROOT/pages/making-modules/defining-modules.adoc +++ b/modules/ROOT/pages/making-modules/defining-modules.adoc @@ -346,7 +346,7 @@ For even more complex scenarios, please study the https://github.com/fedora-modu One source RPM package might produce multiple binary RPM packages. If you don't want to include some binary packages, list them under `filter`. -Filtered RPMs are still available to use as build dependencies in subsequent stages of the module build, but are not included in the module itself. +Filtered RPMs are still available to use as build dependencies in subsequent stages of the module build, but are not included in the composed repository for users. [source,yaml] ---- @@ -356,6 +356,32 @@ Filtered RPMs are still available to use as build dependencies in subsequent sta - second-package-nope ---- +=== Creating build-only components (optional) + +In addition to filtering subpackages, it's possible to filter out all of the artifacts produced by a component in a module. +This is useful in cases where your module's primary packages have a build-time dependency that you do not want to ship. +An example of such a case would be if you need to build with a specially-patched documentation-generator that would conflict +with the version used as the default in Fedora. + +[source,yaml] +---- + components: + rpms: + customdocgen: + rationale: A patched version of docgen that enables an experimental feature. + ref: experimental + buildorder: 0 + buildonly: 1 + myapp: + rationale: My application + ref: latest + buildorder: 10 +---- + +In this example, `customdocgen` would be built first and made available in the buildroot for `myapp` to use during its build. +Once the module build is finished and it is composed into a DNF repository, only the unfiltered artifacts from `myapp` will be available. +All of the `customdocgen` artifacts will be automatically added to the `data.filters.rpms` section of the module metadata. + == A minimal modulemd === An absolute minimum