Skip to content

Commit

Permalink
Clarify v2 stream specification
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Gallagher <[email protected]>
  • Loading branch information
sgallagher committed Feb 11, 2020
1 parent e242eb8 commit 136790d
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 17 deletions.
35 changes: 33 additions & 2 deletions yaml_specs/modulemd_packager_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
# for a module stream. It is always a proper subset of a `document: modulemd`
# of the same `version`.
document: modulemd-packager

# Module metadata format version
version: 2
data:
# A short summary describing the module, required
summary: An example module

# A verbose description of the module, required
description: >-
A module for the demonstration of the metadata format. Also,
the obligatory lorem ipsum dolor sit amet goes right here.
# Module and content licenses in the Fedora license identifier
# format, required
license:
Expand All @@ -36,8 +39,6 @@ data:
# the runtime block so that it matches the stream the module was built
# against. Multiple builds result in multiple output modulemd files.
# See below for an example.
# TODO: Provides, conflicts, obsoletes, recommends, etc.
# Do we even need those?
# The example below illustrates how to build the same module in four
# different ways, with varying build time and runtime dependencies.
dependencies:
Expand All @@ -48,6 +49,7 @@ data:
platform: [-f27, -f28, -epel7]
requires:
platform: [-f27, -f28, -epel7]

# For platform:f27 perform two builds, one with buildtools:v1, another
# with buildtools:v2 in the buildroot. Both will also utilize
# compatible:v3. At runtime, buildtools isn't required and either
Expand All @@ -59,13 +61,15 @@ data:
requires:
platform: [f27]
compatible: [v3, v4]

# For platform:f28 builds, require either runtime:a or runtime:b at
# runtime. Only one build is performed.
- buildrequires:
platform: [f28]
requires:
platform: [f28]
runtime: [a, b]

# For platform:epel7, build against against all available extras
# streams and moreextras:foo and moreextras:bar. The number of builds
# in this case will be 2 * <the number of extras streams available>.
Expand All @@ -79,14 +83,18 @@ data:
platform: [epel7]
extras: []
moreextras: [foo, bar]

# References to external resources, typically upstream, optional
references:
# Upstream community website, if it exists, optional
community: http://www.example.com/

# Upstream documentation, if it exists, optional
documentation: http://www.example.com/

# Upstream bug tracker, if it exists, optional
tracker: http://www.example.com/

# Profiles define the end user's use cases for the module. They consist of
# package lists of components to be installed by default if the module is
# enabled. The keys are the profile names and contain package lists by
Expand All @@ -104,13 +112,15 @@ data:
- bar
- bar-extras
- baz

# Defines a set of packages which are meant to be installed inside
# container image artifact.
# Optional.
container:
rpms:
- bar
- bar-devel

# This profile provides minimal set of packages providing functionality
# of this module. This is meant to be used on target systems where size
# of the distribution is a real concern.
Expand All @@ -120,20 +130,23 @@ data:
description: Minimal profile installing only the bar package.
rpms:
- bar

# A set of packages which should be installed into the buildroot of a
# module which depends on this module. Specifically, it is used to
# flesh out the build group in koji.
# Optional.
buildroot:
rpms:
- bar-devel

# Very similar to the buildroot profile above, this is used by the
# build system to specify any additional packages which should be
# installed during the buildSRPMfromSCM step in koji.
# Optional.
srpm-buildroot:
rpms:
- bar-extras

# Module API
# Optional, defaults to no API.
api:
Expand All @@ -151,6 +164,7 @@ data:
- bar-devel
- baz
- xxx

# Module component filters
# Optional, defaults to no filters.
filter:
Expand All @@ -160,6 +174,7 @@ data:
# Optional, defaults to an empty list.
rpms:
- baz-nonfoo

# Functional components of the module, optional
components:
# RPM content of the module, optional
Expand All @@ -172,68 +187,82 @@ data:
# bootstrapping ref before building the package for real.
# Optional
name: bar-real

# Why is this component present.
# A simple, free-form string.
# Required.
rationale: We need this to demonstrate stuff.

# Use this repository if it's different from the build
# system configuration.
# Optional.
repository: https://pagure.io/bar.git

# Use this lookaside cache if it's different from the
# build system configuration.
# Optional.
cache: https://example.com/cache

# Use this specific commit hash, branch name or tag for
# the build. If ref is a branch name, the branch HEAD
# will be used. If no ref is given, the master branch
# is assumed.
# Optional.
ref: 26ca0c0

# Use the "buildafter" value to specify that this component
# must be be ordered later than some other entries in this map.
# The values of this array come from the keys of this map and
# not the real component name to enable bootstrapping.
buildafter:
- baz

# If buildroot is set to True, the packages listed in this
# module's buildroot profile will be installed into the
# buildroot of any component built in subsequent
# buildafter batches, even if that module does not
# explicitly include these packages in its BuildRequires.
# Optional. Defaults to "false" if not specified.
buildroot: false

# If srpm-buildroot is set to True, the packages listed in this
# module's srpm-buildroot profile will be installed into the
# buildroot when performing the buildSRPMfromSCM step in
# subsequent buildafter batches.
# Optional. Defaults to "false" if not specified.
srpm-buildroot: false

# baz has no extra options
baz:
rationale: This one is here to demonstrate other stuff.

xxx:
rationale: xxx demonstrates arches and multilib.

# xxx is only available on the listed architectures.
# Includes specific hardware architectures, not families.
# See the data.arch field for details.
# Optional, defaults to all available arches.
arches: [i686, x86_64]

# A list of architectures with multilib
# installs, i.e. both i686 and x86_64
# versions will be installed on x86_64.
# Includes specific hardware architectures, not families.
# See the data.arch field for details.
# Optional, defaults to no multilib.
multilib: [x86_64]

# This package requires a particular version of 'xyz' to be
# present in order to build correctly, so we inform the build
# system not to build this until 'xyz' has completed
# successfully.
buildafter:
- xyz

xyz:
rationale: xyz is a bundled dependency of xxx.

# Module content of this module
# Included modules are built in the shared buildroot, together with
# other included content. Keys are module names, values additional
Expand All @@ -247,9 +276,11 @@ data:
# Why is this module included?
# Required
rationale: Included in the stack, just because.

# Link to VCS repository that contains the modulemd file
# if it differs from the buildsystem default configuration.
# Optional.
repository: https://pagure.io/includedmodule.git

# See the rpms ref.
ref: somecoolbranchname
Loading

0 comments on commit 136790d

Please sign in to comment.