To get new bug fixes not yet in a production release, to try out a newer release, or simply because the newest OpenAFS has not yet been packaged for your version of Fedora/RHEL, you may with to build your own OpenAFS RPMs. This, of course, first requires a SRC rpm. SRC RPMs can be generated from the OpenAFS source.
Step-by-step guide
You will need devel libraries and tools installed on your system for OpenAFS to build successfully.
Do a "git clone" of the OpenAFS source code repository:
git clone git://git.openafs.org/openafs.git- Check what branches (or tags) are available. Generally, there will be a branch for the current "stable" and the major development efforts of OpenAFS. When completed, each release including pre-releases will have a tag:
$ git branch -r
origin/HEAD -> origin/master
origin/disconnected
origin/instrumentation
origin/master
...
origin/openafs-stable-1_6_9-branch
origin/openafs-stable-1_6_x
As of the time of this writing, you will generatlly want the "origin/openafs-stable-1_6_x" branch, since 1.6.x is the current stable version of OpenAFS.
If you would rather checkout a tag, list the tags with:
$ git tag -l
and checkout a particular tag with:
$ git checkout tags/tagname - Checkout the branch (or tag) you want:
git checkout origin/openafs-stable-1_6_x
git checkout tags/openafs-stable-1_6_11pre2 - You need to create a .version file at the top level of your git tree... this is used to indicate what "version" of OpenAFS you are installing. Even if it isn't a real version. For example, I wanted to call my version openafs-1.6.11pre1.1:
]$ cat .version
openafs-devel-1_6_11pre1_1
Note that the dots are replaced by underscores.
and note that you need a "-devel" or "-stable" between "openafs" and the version number. Rename your "openafs" directory to correspond to the version (leaving out the -stable or -devel). So, with the above version, my "openafs" directory is now named: openafs-1.6.11pre1.1
Now, you will need to run the "regen.sh" script in the top level of your openafs directory:
openafs-1.6.11pre1.1]$ ./regen.shOnce completed, cd up one directory and create two tar files, named with your openafs version, one containing the source and one containing the documentation:
tar cjvf openafs-1.6.11pre1.1-src.tar.bz2 openafs-1.6.11pre1.1/ --exclude=openafs-1.6.11pre1.1/doc --exclude=openafs-1.6.11pre1.1/.git
tar cjvf openafs-1.6.11pre1.1-doc.tar.bz2 openafs-1.6.11pre1.1/docNow, cd to the src/packaging/RedHat subfolder:
pwd
/home/user/Downloads/openafs/openafs-1.6.11pre1.1/src/packaging/RedHat
- And run the "makesrpm.pl" script to build your src rpm:
perl ./makesrpm.pl ../../../../openafs-1.6.11pre1.1-src.tar.bz2 ../../../../openafs-1.6.11pre1.1-doc.tar.bz2 - Now, you have a .src.rpm you can rebuild to generate RPMs:
rpmbuild --rebuild openafs-1.6.11-0.pre1.src.rpm - The built RPMs should be placed in ~/rpmbuild/RPMS/
Related articles
There is no content with the specified labels