mash_directive - create a YUM repository from RPM packages using mash

New in version 0.4.

Take a directory containing RPM packages and run mash command on it, which creates YUM repository metadata.

This internally calls createrepo (which can be used separately through the createrepo directive), and then mash to finish the process. Mash will handle creating delta RPMs (if requested) and it will handle creating multilib repository metadata (which is currently supported just for x86_64 architecture).

Note

Beware, when creating multilib repositories, the non-multilib packages (i386 packages which shoudn’t be part of the x86_64 repository) are deleted from the directory.

Parameters

parameter required description type default choices

arch

yes

list of architectures for which to create YUM metadata

list of str

    dodelta

    no

    whether to create delta RPMs during the mash process

    bool

    False

    • True

    • False

    outdir

    no

    absolute or relative path to an output directory, where repository should be created. If not specified, then rpmdir is used as an output directory. outdir will be created automatically if not present.

    str

    None

      rpmdir

      yes

      absolute or relative path to the directory containing RPM files (the task directory is considered the current working directory)

      str

        Return Values

        (string) path to the directory where the repository has been created

        Exceptions

        Examples

        First, download all required RPMs, then create a YUM repository in that directory:

        - name: download koji tag
          koji:
              action: download_tag
              koji_tag: ${koji_tag}
              arch: ${arch}
              target_dir: "${workdir}/downloaded_tag/"
        
        - name: mash downloaded rpms
          mash:
              rpmdir: "${workdir}/downloaded_tag/"
              dodelta: False
              arch: ${arch}