1############################################################################## 2# Glossary: # 3# # 4# build system: The process by which a module is built and packaged. In many # 5# cases, this will be the Module Build Service tool, but this term is used # 6# as a catch-all to describe any mechanism for producing a yum repository # 7# containing modular content from input module metadata files. # 8# # 9# # 10# == Attribute Types == # 11# # 12# MANDATORY: Attributes of this type must be filled in by the packager of # 13# this module. They must also be preserved and provided in the output # 14# metadata produced by the build system for inclusion into a repository. # 15# # 16# OPTIONAL: Attributes of this type may be provided by the packager of this # 17# module, when appropriate. If they are provided, they must also be # 18# preserved and provided in the output metadata produced by the build # 19# system for inclusion into a repository. # 20# # 21# AUTOMATIC: Attributes of this type must be present in the repository # 22# metadata, but they may be left unspecified by the packager. In this case, # 23# the build system is responsible for generating an appropriate value for # 24# the attribute and including it in the repository metadata. If the packager # 25# specifies this attribute explicitly, it must be preserved and provided in # 26# the output metadata for inclusion into a repository. # 27# # 28# The definitions above describe the expected behavior of the build system # 29# operating in its default configuration. It is permissible for the build # 30# system to override user-provided entries through non-default operating # 31# modes. If such changes are made, all items indicated as being required for # 32# the output repository must still be present. # 33############################################################################## 34 35 36# Document type identifier 37# `document: modulemd-packager` describes the contents of a packager's input 38# for a module stream. 39document: modulemd-packager 40 41# Module metadata format version 42version: 3 43 44data: 45 # name: 46 # The name of the module 47 # Filled in by the build system, using the VCS repository name as the name 48 # of the module. 49 # 50 # Type: AUTOMATIC 51 # 52 # Mandatory for module metadata in a yum/dnf repository. 53 name: foo 54 55 # stream: 56 # Module update stream 57 # Filled in by the buildsystem, using the VCS branch name as the name of 58 # the stream. 59 # 60 # Type: AUTOMATIC 61 # 62 # Mandatory for module metadata in a yum/dnf repository. 63 stream: latest 64 65 # summary: 66 # A short summary describing the module 67 # 68 # Type: MANDATORY 69 # 70 # Mandatory for module metadata in a yum/dnf repository. 71 summary: An example module 72 73 # description: 74 # A verbose description of the module 75 # 76 # Type: MANDATORY 77 # 78 # Mandatory for module metadata in a yum/dnf repository. 79 description: >- 80 A module for the demonstration of the metadata format. Also, 81 the obligatory lorem ipsum dolor sit amet goes right here. 82 83 # license: 84 # Module license 85 # This list covers licenses used for the module metadata and 86 # possibly other files involved in the creation of this specific 87 # module. If unspecified, the default license for documents of this 88 # type and version is MIT (https://opensource.org/licenses/MIT) 89 # 90 # Type: OPTIONAL 91 license: 92 - MIT 93 # xmd: 94 # Extensible metadata block 95 # A dictionary of user-defined keys and values. 96 # Defaults to an empty dictionary. 97 # 98 # Type: OPTIONAL 99 xmd: 100 some_key: some_data 101 102 # configurations: 103 # A list of build and dependency configurations 104 # 105 # Each entry in the list represents a build of this module stream against 106 # one platform (usually a distribution release name/number) and optionally 107 # a set of dependencies. 108 # 109 # Type: MANDATORY 110 configurations: 111 # context: 112 # A string of up to ten [a-zA-Z0-9] characters representing a 113 # a build and runtime configuration for this stream. This string is 114 # arbitrary but must be unique in this module stream. 115 # Type: MANDATORY 116 - context: CTX1 117 # platform: 118 # Defines the distribution and release to build on and run against. 119 # Type: MANDATORY 120 platform: f32 121 # buildrequires: 122 # A dictionary of the build-time dependencies on other module streams. 123 # Each configuration may depend on a single stream of a dependency. 124 # The dictionary key is the name of the module and the dictionary value 125 # is a single-element list containing the name of the stream. 126 # 127 # Type: Optional 128 buildrequires: 129 appframework: [v1] 130 # requires: 131 # A dictionary of the run-time dependencies on other module streams. 132 # Each configuration may depend on a single stream of a dependency. 133 # The dictionary key is the name of the module and the dictionary value 134 # is a single-element list containing the name of the stream. 135 # 136 # Type: Optional 137 requires: 138 appframework: [v1] 139 # buildopts: 140 # Component build options 141 # Additional per component type module-wide build options. 142 # 143 # IMPORTANT: Due to limitations in the modulemd-stream v2 format, the 144 # buildopts from the first configuration in the list will apply to 145 # ALL configurations when building for modulemd-stream v2. They will 146 # apply separately when building for module-stream v3. 147 # 148 # Type: OPTIONAL 149 buildopts: 150 # rpms: 151 # RPM-specific build options 152 # 153 # Type: OPTIONAL 154 rpms: 155 # macros: 156 # Additional macros that should be defined in the 157 # RPM buildroot, appended to the default set. Care should be 158 # taken so that the newlines are preserved. Literal style 159 # block is recommended, with or without the trailing newline. 160 # 161 # Type: OPTIONAL 162 macros: | 163 %demomacro 1 164 %demomacro2 %{demomacro}23 165 166 # whitelist: 167 # Explicit list of package build names this module will produce. 168 # By default the build system only allows components listed under 169 # data.components.rpms to be built as part of this module. 170 # In case the expected RPM build names do not match the component 171 # names, the list can be defined here. 172 # This list overrides rather then just extends the default. 173 # List of package build names without versions. 174 # 175 # Type: OPTIONAL 176 whitelist: 177 - fooscl-1-bar 178 - fooscl-1-baz 179 - xxx 180 - xyz 181 # arches: 182 # Instructs the build system to only build the 183 # module on this specific set of architectures. 184 # Includes specific hardware architectures, not families. 185 # See the data.arch field in the modulemd-stream spec for details. 186 # Defaults to all available arches. 187 # 188 # Type: OPTIONAL 189 arches: [i686, x86_64] 190 191 # Alternate example with no dependencies 192 - context: CTX2 193 platform: f33 194 195 # references: 196 # References to external resources, typically upstream 197 # 198 # Type: OPTIONAL 199 references: 200 # community: 201 # Upstream community website, if it exists 202 # 203 # Type: OPTIONAL 204 community: http://www.example.com/ 205 206 # documentation: 207 # Upstream documentation, if it exists 208 # 209 # Type: OPTIONAL 210 documentation: http://www.example.com/ 211 212 # tracker: 213 # Upstream bug tracker, if it exists 214 # 215 # Type: OPTIONAL 216 tracker: http://www.example.com/ 217 218 # profiles: 219 # Profiles define the end user's use cases for the module. They consist of 220 # package lists of components to be installed by default if the module is 221 # enabled. The keys are the profile names and contain package lists by 222 # component type. There are several profiles defined below. Suggested 223 # behavior for package managers is to just enable repository for selected 224 # module. Then users are able to install packages on their own. If they 225 # select a specific profile, the package manager should install all 226 # packages of that profile. 227 # Defaults to no profile definitions. 228 # 229 # Type: OPTIONAL 230 profiles: 231 232 # An example profile that defines a set of packages which are meant to 233 # be installed inside a container image artifact. 234 # 235 # Type: OPTIONAL 236 container: 237 rpms: 238 - bar 239 - bar-devel 240 241 # An example profile that delivers a minimal set of packages to 242 # provide this module's basic functionality. This is meant to be used 243 # on target systems where size of the distribution is a real concern. 244 # 245 # Type: Optional 246 minimal: 247 # A verbose description of the module, optional 248 description: Minimal profile installing only the bar package. 249 rpms: 250 - bar 251 # default (boolean): 252 # Whether this profile should be installed if none is explicitly 253 # specified. 254 # 255 # Defaults to "false" if not specified. 256 # 257 # Type: OPTIONAL 258 default: true 259 260 # buildroot: 261 # This is a special reserved profile name. 262 # 263 # This provides a listing of packages that will be automatically 264 # installed into the buildroot of all component builds that are started 265 # after a component builds with its `buildroot: True` option set. 266 # 267 # The primary purpose of this is for building RPMs that change 268 # the build environment, such as those that provide new RPM 269 # macro definitions that can be used by subsequent builds. 270 # 271 # Specifically, it is used to flesh out the build group in koji. 272 # 273 # Type: OPTIONAL 274 buildroot: 275 rpms: 276 - bar-devel 277 278 # srpm-buildroot: 279 # This is a special reserved profile name. 280 # 281 # This provides a listing of packages that will be automatically 282 # installed into the buildroot of all component builds that are started 283 # after a component builds with its `srpm-buildroot: True` option set. 284 # 285 # The primary purpose of this is for building RPMs that change 286 # the build environment, such as those that provide new RPM 287 # macro definitions that can be used by subsequent builds. 288 # 289 # Very similar to the buildroot profile above, this is used by the 290 # build system to specify any additional packages which should be 291 # installed during the buildSRPMfromSCM step in koji. 292 # 293 # Type: OPTIONAL 294 srpm-buildroot: 295 rpms: 296 - bar-extras 297 298 # api: 299 # Module API 300 # Defaults to no API. 301 # 302 # Type: OPTIONAL 303 api: 304 # rpms: 305 # The module's public RPM-level API. 306 # A list of binary RPM names that are considered to be the 307 # main and stable feature of the module; binary RPMs not listed 308 # here are considered "unsupported" or "implementation details". 309 # In the example here we don't list the xyz package as it's only 310 # included as a dependency of xxx. However, we list a subpackage 311 # of bar, bar-extras. 312 # Defaults to an empty list. 313 # 314 # Type: OPTIONAL 315 rpms: 316 - bar 317 - bar-extras 318 - bar-devel 319 - baz 320 - xxx 321 322 # filter: 323 # Module component filters 324 # Defaults to no filters. 325 # 326 # Type: OPTIONAL 327 filter: 328 # rpms: 329 # RPM names not to be included in the module. 330 # By default, all built binary RPMs are included. In the example 331 # we exclude a subpackage of bar, bar-nonfoo from our module. 332 # Defaults to an empty list. 333 # 334 # Type: OPTIONAL 335 rpms: 336 - baz-nonfoo 337 338 # demodularized: 339 # Artifacts which became non-modular 340 # Defaults to no demodularization. 341 # Type: OPTIONAL 342 demodularized: 343 # rpms: 344 # A list of binary RPM package names which where removed from 345 # a module. This list explains to a package mananger that the packages 346 # are not part of the module anymore and up-to-now same-named masked 347 # non-modular packages should become available again. This enables 348 # moving a package from a module to a set of non-modular packages. The 349 # exact implementation of the demodularization (e.g. whether it 350 # applies to all modules or only to this stream) is defined by the 351 # package manager. 352 # Defaults to an empty list. 353 # 354 # Type: OPTIONAL 355 rpms: 356 - bar-old 357 358 # components: 359 # Functional components of the module 360 # 361 # Type: OPTIONAL 362 components: 363 # rpms: 364 # RPM content of the module 365 # Keys are the VCS/SRPM names, values dictionaries holding 366 # additional information. 367 # 368 # Type: OPTIONAL 369 rpms: 370 bar: 371 # name: 372 # The real name of the package, if it differs from the key in 373 # this dictionary. Used when bootstrapping to build a 374 # bootstrapping ref before building the package for real. 375 # 376 # Type: OPTIONAL 377 name: bar-real 378 379 # rationale: 380 # Why is this component present. 381 # A simple, free-form string. 382 # 383 # Type: MANDATORY 384 rationale: We need this to demonstrate stuff. 385 386 # repository: 387 # Use this repository if it's different from the build 388 # system configuration. 389 # 390 # Type: AUTOMATIC 391 repository: https://pagure.io/bar.git 392 393 # cache: 394 # Use this lookaside cache if it's different from the 395 # build system configuration. 396 # 397 # Type: AUTOMATIC 398 cache: https://example.com/cache 399 400 # ref: 401 # Use this specific commit hash, branch name or tag for 402 # the build. If ref is a branch name, the branch HEAD 403 # will be used. If no ref is given, the build system is 404 # permitted to make reasonable assumptions about the correct 405 # default value. Otherwise, the fall-back is the default branch 406 # for the git repository (commonly 'master'). 407 # 408 # Type: AUTOMATIC 409 ref: 26ca0c0 410 411 # buildafter: 412 # Use the "buildafter" value to specify that this component 413 # must be be ordered later than some other entries in this map. 414 # The values of this array come from the keys of this map and 415 # not the real component name to enable bootstrapping. 416 # Use of both buildafter and buildorder in the same document is 417 # prohibited, as they will conflict. 418 # 419 # In this example, 'baz' makes some changes to the default 420 # buildroot that 'bar' must use. 421 # 422 # Note: The use of buildafter is not currently supported by the 423 # Fedora module build system. 424 # 425 # Type: AUTOMATIC 426 # buildafter: 427 # - baz 428 429 # buildonly: 430 # Use the "buildonly" value to indicate that all artifacts 431 # produced by this component are intended only for building 432 # this component and should be automatically added to the 433 # data.filter.rpms list after the build is complete. 434 # Defaults to "false" if not specified. 435 # 436 # Type: AUTOMATIC 437 buildonly: false 438 439 # baz builds RPM macros for the other components to use 440 baz: 441 rationale: Demonstrate updating the buildroot contents. 442 443 # buildroot: 444 # If buildroot is set to True, the packages listed in this 445 # module's 'buildroot' profile will be installed into the 446 # buildroot of any component built in buildorder/buildafter 447 # batches begun after this one, without requiring that those 448 # packages are listed among BuildRequires. 449 # 450 # The primary purpose of this is for building RPMs that change 451 # the build environment, such as those that provide new RPM 452 # macro definitions that can be used by subsequent builds. 453 # 454 # Defaults to "false" if not specified. 455 # 456 # Type: OPTIONAL 457 buildroot: true 458 459 # srpm-buildroot: 460 # If srpm-buildroot is set to True, the packages listed in this 461 # module's 'srpm-buildroot' profile will be installed into the 462 # buildroot of any component built in buildorder/buildafter 463 # batches begun after this one, without requiring that those 464 # packages are listed among BuildRequires. 465 # 466 # The primary purpose of this is for building RPMs that change 467 # the build environment, such as those that provide new RPM 468 # macro definitions that can be used by subsequent builds. 469 # 470 # Defaults to "false" if not specified. 471 # 472 # Type: OPTIONAL 473 srpm-buildroot: true 474 475 xxx: 476 rationale: xxx demonstrates arches and multilib. 477 478 # arches: 479 # xxx is only available on the listed architectures. 480 # Includes specific hardware architectures, not families. 481 # See the data.arch field for details. 482 # Instructs the build system to only build the 483 # component on this specific set of architectures. 484 # If data.buildopts.arches is also specified, 485 # this must be a subset of those architectures. 486 # Defaults to all available arches. 487 # 488 # Type: AUTOMATIC 489 arches: [i686, x86_64] 490 491 # multilib: 492 # A list of architectures with multilib 493 # installs, i.e. both i686 and x86_64 494 # versions will be installed on x86_64. 495 # Includes specific hardware architectures, not families. 496 # See the data.arch field for details. 497 # Defaults to no multilib. 498 # 499 # Type: AUTOMATIC 500 multilib: [x86_64] 501 502 # This package requires a particular version of 'bar' to be 503 # present in order to build correctly, so we inform the build 504 # system not to build this until 'bar' has completed 505 # successfully. 506 # buildafter: 507 # - bar 508 509 # buildorder: 510 # Build order group 511 # When building, components are sorted by build order tag 512 # and built in batches grouped by their buildorder value. 513 # Built batches are then re-tagged into the buildroot. 514 # Multiple components can have the same buildorder index 515 # to map them into build groups. 516 # Defaults to zero. 517 # Integer, negative values are allowed. 518 # In this example, bar and baz are built first in no particular 519 # order, then tagged into the buildroot, then, finally, xxx is 520 # built. 521 # Use of both buildafter and buildorder in the same document is 522 # prohibited, as they will conflict. 523 # 524 # Type: OPTIONAL 525 buildorder: 10 526 527 # modules: 528 # Module content of this module 529 # Included modules are built in the shared buildroot, together with 530 # other included content. Keys are module names, values additional 531 # component information. Note this only includes components and their 532 # properties from the referenced module and doesn't inherit any 533 # additional module metadata such as the module's dependencies or 534 # component buildopts. The included components are built in their 535 # defined buildorder as sub-build groups. 536 # 537 # Type: OPTIONAL 538 modules: 539 includedmodule: 540 541 # rationale: 542 # Why is this module included? 543 # 544 # Type: MANDATORY 545 rationale: Included in the stack, just because. 546 547 # repository: 548 # Link to VCS repository that contains the modulemd file 549 # if it differs from the buildsystem default configuration. 550 # 551 # Type: AUTOMATIC 552 repository: https://pagure.io/includedmodule.git 553 554 # ref: 555 # See the rpms ref. 556 # 557 # Type: AUTOMATIC 558 ref: somecoolbranchname 559 560 # buildorder: 561 # See the rpms buildorder. 562 # 563 # Type: AUTOMATIC 564 buildorder: 100 565