From 7b199415e724f42972cc63b9d7299933f243528a Mon Sep 17 00:00:00 2001 From: Martin Curlej Date: Jul 15 2020 12:31:28 +0000 Subject: Added information about module filters Issue: modularity#174 Signed-off-by: Martin Curlej --- diff --git a/modules/ROOT/pages/building-modules/fedora/defining-modules.adoc b/modules/ROOT/pages/building-modules/fedora/defining-modules.adoc index 155d255..9121cf8 100644 --- a/modules/ROOT/pages/building-modules/fedora/defining-modules.adoc +++ b/modules/ROOT/pages/building-modules/fedora/defining-modules.adoc @@ -43,6 +43,12 @@ data: - package-one-cli # <- Binary RPM package name - package-one-devel # <- Binary RPM package name - package-two # <- Binary RPM package name + + # === Package filtering ============================================== + # (Which packages should not be included into the resulting module) + filter: + rpms: + - subpackage-one # <- Binary RPM package name # === Installation profiles (optional, but encouraged) =============== # (Helping users with installation by providing predefined groups) @@ -341,10 +347,12 @@ Simple things should simple, complex things should be possible. Let's say my mod For even more complex scenarios, please study the https://github.com/fedora-modularity/libmodulemd/blob/master/spec.v2.yaml[modulemd specification]. +=== Filtered Packages (optional, defaults to no filters) -=== Excluding binary packages (optional) - -One source RPM package might produce multiple binary RPM packages. If you don't want to include some binary packages, list them under `filter`. +The build process of a RPM packages can result in a subpackages which complement the build of the package (docs, additional build requires etc.). One source RPM package might produce multiple binary +RPM packages. Those subpackages are not always desired to be shipped with the Module. Modules enable you to filter out those undesirable packages with the `filter` build option. After the build is finished the filtered packages will be not included in the `artifacts` property in the result modulemd +yaml file. The `artifacts` property is added by the build system post build. For an example please +refer to the https://github.com/fedora-modularity/libmodulemd/tree/main/yaml_specs[modulemd spec files]. 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.