openafs_contrib / openafs_contrib.openafs / 1.9.0 / module / openafs_build_packages Build OpenAFS installation packages Authors: Michael Meffie preview | supported by communityopenafs_contrib.openafs.openafs_build_packages (1.9.0) — module
Install with ansible-galaxy collection install openafs_contrib.openafs:==1.9.0
collections: - name: openafs_contrib.openafs version: 1.9.0
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 I(sdist) directory on the remote node. The source distribution files may be created with the C(openafs_build_sdist) module.
The M(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 C(rpmbuild).
The RPM package version and release strings are generated from the OpenAFS version string extracted from the C(.version) file in the source archive.
See the C(openafs_devel) role for tasks to install the required build tools and libraries.
- 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
tar: default: C(tar) description: - The C(tar) program used to unpack the source archive. type: path csdb: default: None description: - The path on the remote node to a custom C(CellServDB) file to be incuded in the build. - The C(CellServDB) file in the I(sdist) directory will be used when the I(csdb) option is not specified. The C(CellServDB) file will be extracted from the source archive if the C(CellServDB) file is not found in the I(sdist) directory. type: path spec: default: None description: - The path on the remote node to a custom C(openafs.spec) file to be used to build the rpm files. The C(openafs.spec) file will be extracted from the source archive file when the I(spec) option is not provided. type: str build: default: all description: - Specifies which packages to build. - C(all) build source and binary RPMs for userspace and kernel module - C(source) build the source RPM only - C(userspace) build the source RPM and the userspace RPMs - C(modules) build the source RPM and the kmod RPM type: str sdist: description: - The path on the remote node to the source distribution files directory on the remote node. - The I(sdist) directory must contain the C(openafs-<version>-src.tar.bz2) source archive and the C(openafs-<version>-doc.tar.bz2) documentation archive. - The I(sdist) directory may also contain the C(ChangeLog) file and the C(RELNOTES-<version>) file. required: true type: path logdir: default: I(topdir)/C(BUILD) description: - The path to write build log files on the remote node. type: path topdir: default: C(~/rpmbuild) description: - The top level rpmbuild workspace directory on the remote node. type: path kernvers: default: current kernel version description: - The kernel version to be used when building the kernel module. By default, the kernel version of the running kernel will be used. type: str patchdir: default: I(sdist) description: - The path on the remote node of the directory containing patch files to be applied. - Patch names are identified by the C(PatchXX) directives in the spec file. type: path relnotes: default: None description: - The path on the remote node to a custom C(RELNOTES) file to be included in the build. - The C(RELNOTES-<version>) in the I(sdist) directory will be used when the I(relnotes) option is not specified. The C(NEWS) file will be extracted from the source archive if the C(RELNOTES-<version>) file is not found in the I(sdist) directory. type: str changelog: default: None description: - The path on the remote node to a custom C(ChangeLog) file to be included in the build. - The C(ChangeLog) in the I(sdist) directory will be used when the C(changelog) option is not specified. An empty C(ChangeLog) file will be created if the C(ChangeLog) is not found in the I(sdist) directory, type: str tar_extra_options: default: None description: - Extra command line options to unpack the source archive. type: str
logfiles: description: The build log files written on the remote node. returned: always type: list packages: description: The list of package files created on the remote node. returned: always type: list version: description: OpenAFS and package versions extracted from the source archive. returned: always type: dict