openafs_build_packages – Build OpenAFS installation packages
Synopsis
Build OpenAFS installation packages from an OpenAFS source distribution.
This module supports building RPM packages for RedHat family distributions. Other packaging types may be added in the future.
The source distribution files must be already present in the sdist directory on the remote node. The source distribution files may be created with the openafs_build_sdist module.
The openafs_build_packages module will create the rpm workspace directories and populate the SPECS and SOURCES directories from the source distribution files and the file options, then will build the source and binary rpm files with rpmbuild.
The RPM package version and release strings are generated from the OpenAFS version string extracted from the .version file in the source archive.
See the openafs_devel role for tasks to install the required build tools and libraries.
Requirements
The below requirements are needed on the host that executes this module.
Tools and libraries required to build OpenAFS.
The
kernel-develpackage, when building the kernel module.rpmbuildtool
Parameters
- build (optional, str, all)
Specifies which packages to build.
allbuild source and binary RPMs for userspace and kernel module
sourcebuild the source RPM only
userspacebuild the source RPM and the userspace RPMs
modulesbuild the source RPM and the kmod RPM- sdist (True, path, None)
The path on the remote node to the source distribution files directory on the remote node.
The sdist directory must contain the
openafs-<version>-src.tar.bz2source archive and theopenafs-<version>-doc.tar.bz2documentation archive.The sdist directory may also contain the
ChangeLogfile and theRELNOTES-<version>file.- spec (optional, str, None)
The path on the remote node to a custom
openafs.specfile to be used to build the rpm files. Theopenafs.specfile will be extracted from the source archive file when the spec option is not provided.- relnotes (optional, str, None)
The path on the remote node to a custom
RELNOTESfile to be included in the build.The
RELNOTES-<version>in the sdist directory will be used when the relnotes option is not specified. TheNEWSfile will be extracted from the source archive if theRELNOTES-<version>file is not found in the sdist directory.- changelog (optional, str, None)
The path on the remote node to a custom
ChangeLogfile to be included in the build.The
ChangeLogin the sdist directory will be used when thechangelogoption is not specified. An emptyChangeLogfile will be created if theChangeLogis not found in the sdist directory,- csdb (optional, path, None)
The path on the remote node to a custom
CellServDBfile to be incuded in the build.The
CellServDBfile in the sdist directory will be used when the csdb option is not specified. TheCellServDBfile will be extracted from the source archive if theCellServDBfile is not found in the sdist directory.- patchdir (optional, path, I(sdist))
The path on the remote node of the directory containing patch files to be applied.
Patch names are identified by the
PatchXXdirectives in the spec file.- kernvers (optional, str, current kernel version)
The kernel version to be used when building the kernel module. By default, the kernel version of the running kernel will be used.
- topdir (optional, path, C(~/rpmbuild))
The top level rpmbuild workspace directory on the remote node.
- logdir (optional, path, I(topdir)/C(BUILD))
The path to write build log files on the remote node.
- tar (optional, path, C(tar))
The
tarprogram used to unpack the source archive.- tar_extra_options (optional, str, None)
Extra command line options to unpack the source archive.
Examples
- name: "Checkout OpenAFS source code."
git:
repo: "git@openafs.org/openafs.git"
version: openafs-devel-1_9_1
dest: openafs
- name: "Build source distribution."
openafs_build_sdist:
topdir: openafs
sdist: openafs/packages
- name: "Build RPM files."
openafs_build_packages:
build: all
sdist: openafs/packages
register: build_results
Return Values
- version (always, dict, )
OpenAFS and package versions extracted from the source archive.
- logfiles (always, list, )
The build log files written on the remote node.
- packages (always, list, )
The list of package files created on the remote node.
Status
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by community.