This pages describes how to build OpenAFS client and server packages for RHEL
and CentOS using the contributed RPM spec file available in the OpenAFS source
-tree. Packages may be build from the OpenAFS release tar files or from a clone
-of the OpenAFS git repository. It is recommended to use Fedora `mock` to build
-packages, especially if you are building packages for multiple kernel versions.
-This page describes how to build packages with and without `mock`.
+tree. Packages may be built from the OpenAFS release tar files or from a clone
+of the OpenAFS git repository.
-The general process is:
+## How to build release packages from an OpenAFS source distribution
-* Set up the RPM build directories
-* Download or extract the RPM sources
- - Release Notes
- - CellServDB file
- - Source code tar file
- - Documentation tar file
-* Extract the openafs.spec file from the openafs code tree
- - Set the OpenAFS version and package release versions
-* Run rpmbuild -bs to create a source RPM
-* Run rpmbuild with options to create RPM package files
+The OpenAFS project provides a source code distributions of [releases][3]. A
+source RPM (src.rpm) file can be built from a source distribution release,
+which can then be used to build rpm packages.
+
+Step 1. Download the source distribution files.
+
+Four files are provided; source tarball, documentation tarball, release notes,
+and a change log.
+
+ $ wget https://www.openafs.org/dl/openafs/1.8.5/openafs-1.8.5-src.tar.bz2
+ $ wget https://www.openafs.org/dl/openafs/1.8.5/openafs-1.8.5-doc.tar.bz2
+ $ wget https://www.openafs.org/dl/openafs/1.8.5/RELNOTES-1.8.5
+ $ wget https://www.openafs.org/dl/openafs/1.8.5/ChangeLog
+
+Step 2. Extract the packaging files.
+
+Extract packaging files contained in the source tarball.
-Available resources for building RPM packages:
+ $ tar xf openafs-1.8.5-src.tar.bz2 openafs-1.8.5/src/packaging/RedHat
+
+Step 3. Run the `makesrpm.pl` script to build the source rpm.
+
+ $ ./openafs-1.8.5/src/packaging/RedHat/makesrpm.pl \
+ openafs-1.8.5-src.tar.bz2 \
+ openafs-1.8.5-doc.tar.bz2 \
+ RELNOTES-1.8.5 \
+ ChangeLog
+ ...
+ SRPM is openafs-1.8.5-1.src.rpm
+
+Step 4: Build the rpm packages.
-* The OpenAFS makefile has targets to build the source RPM
-* The OpenAFS src/packaging/RedHat/makesrpm.pl script may be used to build the source RPM (This script is used by the makefile)
-* The OpenAFS-contrib [afsutil package][1] script will build RPMs in a local git repo, and has options to support building packages with `mock`.
+ $ rpmbuild --rebuild -bb --define "_topdir $(pwd)/rpmbuild" openafs-1.8.5-1.src.rpm
## How to build release packages from git
See `afsutil package --help` for a complete list of options.
-## How to build release packages from OpenAFS source distributions
-
-The OpenAFS project provides a source code distributions of [releases][3]. A
-source RPM (src.rpm) file can be built from a source distribution release,
-which can the be used to build rpm packages.
-
-Step 1. Download the source distribution files.
-
-Four files are provided; source tarball, documentation tarball, release notes,
-and a change log.
-
- $ wget https://www.openafs.org/dl/openafs/1.8.5/openafs-1.8.5-src.tar.bz2
- $ wget https://www.openafs.org/dl/openafs/1.8.5/openafs-1.8.5-doc.tar.bz2
- $ wget https://www.openafs.org/dl/openafs/1.8.5/RELNOTES-1.8.5
- $ wget https://www.openafs.org/dl/openafs/1.8.5/ChangeLog
-
-Step 2. Extract the packaging files.
-
-Extract packaging files contained in the source tarball.
-
- $ tar xf openafs-1.8.5-src.tar.bz2 openafs-1.8.5/src/packaging/RedHat
-
-Step 3. Run the `makesrpm.pl` script to build the source rpm.
-
- $ ./openafs-1.8.5/src/packaging/RedHat/makesrpm.pl \
- openafs-1.8.5-src.tar.bz2 \
- openafs-1.8.5-doc.tar.bz2 \
- RELNOTES-1.8.5 \
- ChangeLog
- ...
- ...
- SRPM is openafs-1.8.5-1.src.rpm
-
-Step 4: Build the rpm packages.
-
- $ rpmbuild --rebuild -bb --define "_topdir $(pwd)/rpmbuild" openafs-1.8.5-1.src.rpm
+## A note about version strings
-## Version Strings
+RPM packages require a valid version string and package release number. If you
+are building packages for a non-release version (or not a pre-release), you
+will need to set a customized version string in the spec file.
-A note about version strings. RPM packages require a valid version string and
-package release number. If you are building packages for version which is not
-a release (or pre-release), for example perhaps you want to make changes and
-build packages for testing, perhaps you wish to deploy packages with custom
-changes or fixes, you will need to set a customized version string in the spec
-file.
+For example, perhaps you want to make changes and build packages for testing,
+or perhaps you wish to deploy packages with custom changes or fixes. In these
+cases you will need to provide a customized version string.
-In the following examples, set the version string the `.version` to generate a
+Specify your customer version string in the `.version` file to generate a
`openafs.spec` file with your desired version. If you are using the `afsutil
package` contributed script, use the `--version` option to specify your custom
version.