From: https://www.google.com/accounts/o8/id?id=AItOawk_GD3B2YRV5t7ZM5GOh2nD2jfC6Rihqvg Date: Mon, 24 Sep 2012 20:56:42 +0000 (-0700) Subject: (no commit message) X-Git-Url: http://git.openafs.org/?p=openafs-wiki.git;a=commitdiff_plain;h=82e625faf4782c9b9d805c0332e37e5faa631ec5 --- diff --git a/AFSLore/afslore/howtobuildopenafsrpmpackages.mdwn b/AFSLore/afslore/howtobuildopenafsrpmpackages.mdwn new file mode 100644 index 0000000..a310e80 --- /dev/null +++ b/AFSLore/afslore/howtobuildopenafsrpmpackages.mdwn @@ -0,0 +1,45 @@ +## Building RPM packages + +A script called makesrpm.pl is provided to build a source RPM package. You can +use the generated source RPM to build the binaries and create the RPM packages +for your source code tree of OpenAFS. + +The first step is to create a source tree of OpenAFS. Run the regen.sh script +to build the docs and to generate the configure script. Also, use git describe +to make a version stamp file which will be used by the packaging process. This +example shows how to get a source tree from a remote git repo. + + $ git clone git://git.openafs.org/openafs.git openafs- + $ cd openafs- + $ git checkout + $ git describe >.version + $ ./regen.sh + +The _version_ is the dotted OpenAFS version number, such as 1.6.0, +and the _tagname_ is the git tag for the version, such as openafs-stable-1_6_0. +The _version_ number for pre-releases are suffixed with pre. For example, +to build 1.6.0pre5, create a directory called openafs-1.6.0pre5. + +Next, create a source RPM file. This requires creating a tar file for the +source files and a tar file for the documents. Run the makesrpm program +to generate an OpenAFS source RPM. + + $ cd .. # move out of the source tree + $ tar cjf openafs--src.tar.bz2 openafs- --exclude .git --exclude doc + $ tar cjf openafs--doc.tar.bz2 openafs-/doc + $ openafs-/src/packaging/RedHat/makesrpm.pl openafs--src.tar.bz2 openafs--doc.tar.bz2 + +At this point you should have a source RPM called `openafs--1.0.src.rpm`. See the makesrpm.pl for additional options. +The source tree and tar files are no longer needed. + +Finally, run rpmbuild to build the build binary RPM packages. If all goes well, the final +output will show the destination directory and an exit code of zero. + + $ rpmbuild --rebuild openafs--1.0.src.rpm + ... + + cd /usr/src/redhat/BUILD + + rm -rf openafs- + + exit 0 + +Alternatively, the source RPM may be installed, which will place the sources in the +rpm SOURCE directory and a spec file in the rpm SPEC directory.