Google Site SearchFN Site Search FN Blog Login FN Blog Login
Site Navigation:
 
 

How to build OpenAFS RPM packages for Fedora Core

by Thomas Chung on Dec 06, 2004 (Updated 2006-08-17)



OpenAFS 1.4.2 RPM is now available for FC6.

OpenAFS 1.4.1 RPM is now available for FC5.


AFS is a distributed filesystem product, pioneered at Carnegie Mellon University and supported and developed as a product by Transarc Corporation (now IBM Pittsburgh Labs). It offers a client-server architecture for file sharing, providing location independence, scalability and transparent migration capabilities for data.

IBM branched the source of the AFS product, and made a copy of the source available for community development and maintenance. They called the release OpenAFS.

On Nov 9, 2004, OpenAFS project released a development release of OpenAFS 1.3.74 but there is still no official support for Fedora Core 3 yet.

So here is a HOWTO for building OpenAFS 1.3.74 RPM packages for Fedora Core 3 and I made pre-built binaries available at the end of this article.

Before we begin, I would like to say big thinks to Matthew Miller with Boston University and Dr. Frank Bagehorn with IBM Zurich Research Lab, Switzerland.

Let's begin!
(Make sure you have created rpmbuild directory in your own home.)

First, download FC2 OpenAFS Source RPM and install it to extract most of sources we need:
openafs-1.3.74-3.src.rpm (by Matthew Miller)

[tchung@tchung-fc3 openafs]$ ls
openafs-1.3.74-3.src.rpm
[tchung@tchung-fc3 openafs]$ rpm -ivh openafs-1.3.74-3.src.rpm
   1:openafs                warning: user mattdm does not exist - using root
warning: group mattdm does not exist - using root
warning: user mattdm does not exist - using root
warning: group mattdm does not exist - using root
warning: user mattdm does not exist - using root
warning: group mattdm does not exist - using root
warning: user mattdm does not exist - using root
warning: group mattdm does not exist - using root
warning: user mattdm does not exist - using root
warning: group mattdm does not exist - using root
warning: user mattdm does not exist - using root%)
warning: group mattdm does not exist - using root
warning: user mattdm does not exist - using root%)
warning: group mattdm does not exist - using root
########################################### [100%]
warning: user mattdm does not exist - using root
warning: group mattdm does not exist - using root
warning: user mattdm does not exist - using root
warning: group mattdm does not exist - using root
warning: user mattdm does not exist - using root
warning: group mattdm does not exist - using root
[tchung@tchung-fc3 openafs]$ mv ~/rpmbuild/SOURCES/* .
[tchung@tchung-fc3 openafs]$ ls
CellServDB                                   openafs-1.3.74-3.src.rpm    README.RPM
extractkernheaders.sh                        openafs-1.3.74-src.tar.bz2  TODO.RPM
kernelheaders-2.6.9-1.6_FC2-i686.tar.bz2     openafs-config
kernelheaders-2.6.9-1.6_FC2smp-i686.tar.bz2  openafs-init.sh
[tchung@tchung-fc3 openafs]$
Then, remove old FC2 kernel headers and build new FC3 kernel headers using the latest kernel binaries:
kernel-2.6.9-1.681_FC3.i686.rpm
kernel-smp-2.6.9-1.681_FC3.i686.rpm

[tchung@tchung-fc3 openafs]$ ls kernelheaders*.bz2
kernelheaders-2.6.9-1.6_FC2-i686.tar.bz2  kernelheaders-2.6.9-1.6_FC2smp-i686.tar.bz2
[tchung@tchung-fc3 openafs]$ rm kernelheaders*.bz2
[tchung@tchung-fc3 openafs]$ ls kernel*.rpm
kernel-2.6.9-1.681_FC3.i686.rpm  kernel-smp-2.6.9-1.681_FC3.i686.rpm
[tchung@tchung-fc3 openafs]$ ./extractkernheaders.sh kernel-2.6.9-1.681_FC3.i686.rpm
..omitted..
-rw-rw-r--  1 tchung tchung 2650687 Dec  6 15:42 kernelheaders-2.6.9-1.681_FC3-i686.tar.bz2
[tchung@tchung-fc3 openafs]$ ./extractkernheaders.sh kernel-smp-2.6.9-1.681_FC3.i686.rpm
..omitted..
-rw-rw-r--  1 tchung tchung 2656527 Dec  6 15:43 kernelheaders-2.6.9-1.681_FC3smp-i686.tar.bz2
[tchung@tchung-fc3 openafs]$ ls kernelheaders*.bz2
kernelheaders-2.6.9-1.681_FC3-i686.tar.bz2  kernelheaders-2.6.9-1.681_FC3smp-i686.tar.bz2
[tchung@tchung-fc3 openafs]$

Now download updated spec and patch for FC3 to begin rpmbuild:
openafs.spec
openafs-1.3.74-authclient.patch (by Dr. Frank Bagehorn)

[tchung@tchung-fc3 openafs]$ ls
CellServDB                                     kernel-smp-2.6.9-1.681_FC3.i686.rpm  openafs-init.sh
extractkernheaders.sh                          openafs-1.3.74-3.src.rpm             openafs.spec
kernel-2.6.9-1.681_FC3.i686.rpm                openafs-1.3.74-authclient.patch      README.RPM
kernelheaders-2.6.9-1.681_FC3-i686.tar.bz2     openafs-1.3.74-src.tar.bz2           TODO.RPM
kernelheaders-2.6.9-1.681_FC3smp-i686.tar.bz2  openafs-config
[tchung@tchung-fc3 openafs]$ cp * ~/rpmbuild/SOURCES/
[tchung@tchung-fc3 openafs]$ cp *.spec ~/rpmbuild/SPECS/
[tchung@tchung-fc3 openafs]$ rpmbuild -ba ~/rpmbuild/SPECS/openafs.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.87910
+ umask 022
+ cd /home/tchung/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/tchung/rpmbuild/BUILD
+ rm -rf openafs-1.3.74
+ /usr/bin/bzip2 -dc /home/tchung/rpmbuild/SOURCES/openafs-1.3.74-src.tar.bz2
+ tar -xf -

...omitted...

Wrote: /home/tchung/rpmbuild/SRPMS/openafs-1.3.74-1.FC3.src.rpm
Wrote: /home/tchung/rpmbuild/RPMS/i386/openafs-1.3.74-1.FC3.i386.rpm
Wrote: /home/tchung/rpmbuild/RPMS/i386/openafs-client-1.3.74-1.FC3.i386.rpm
Wrote: /home/tchung/rpmbuild/RPMS/i386/openafs-server-1.3.74-1.FC3.i386.rpm
Wrote: /home/tchung/rpmbuild/RPMS/i386/openafs-devel-1.3.74-1.FC3.i386.rpm
Wrote: /home/tchung/rpmbuild/RPMS/i386/openafs-debuginfo-1.3.74-1.FC3.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.4366
+ umask 022
+ cd /home/tchung/rpmbuild/BUILD
+ cd openafs-1.3.74
+ rm -rf /var/tmp/openafs-1.3.74-1.FC3-root-tchung
+ exit 0
Removing all files from ~/rpmbuild/...
[tchung@tchung-fc3 openafs]$

For client, you only need to install, openafs and openafs-client:

[tchung@tchung-fc3 openafs]$ sudo rpm -Uvh /home/tchung/rpmbuild/RPMS/i386/openafs-1.3.74-1.FC3.i386.rpm
Preparing...                ########################################### [100%]
   1:openafs                ########################################### [100%]
[tchung@tchung-fc3 openafs]$ sudo rpm -Uvh /home/tchung/rpmbuild/RPMS/i386/openafs-client-1.3.74-1.FC3.i386.rpm
Preparing...                ########################################### [100%]
   1:openafs-client         ########################################### [100%]
[tchung@tchung-fc3 openafs]$

Then configure the client to point to your organization's AFS server:

[tchung@tchung-fc3 openafs]$ sudo vi /etc/openafs/CellServDB
>grand.central.org      #GCO Public CellServDB 11 May 2004
18.7.14.88                      #grand-opening.mit.edu
128.2.191.224                   #penn.central.org
...
[tchung@tchung-fc3 openafs]$ sudo vi /etc/openafs/ThisCell
openafs.org
..
[tchung@tchung-fc3 openafs]$ sudo vi /etc/openafs/CellAlias
openafs.org openafs
..

To start the service:

[tchung@tchung-fc3 openafs]$ sudo /sbin/service afs start
Loading AFS kernel module:                                 [  OK  ]
Determining AFS cache size:                                [  OK  ]
Starting AFS client daemon:                                [  OK  ]
[tchung@tchung-fc3 openafs]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       18G  4.2G   13G  26% /
/dev/hdb1              99M   13M   82M  13% /boot
none                  252M     0  252M   0% /dev/shm
AFS                   8.6G     0  8.6G   0% /afs
[tchung@tchung-fc3 openafs]$

To login, check with your organization AFS administrator for more information.

[tchung@tchung-fc3 openafs]$ klog tchung
Password:
[tchung@tchung-fc3 openafs]$ tokens
 
Tokens held by the Cache Manager:
... 
   --End of list--
[tchung@tchung-fc3 openafs]$

Here are the pre-built OpenAFS binary RPMs for Fedora Core 3.


References:
- http://www.mattdm.org/misc/openafs/
- https://lists.openafs.org/mailman/listinfo/openafs-devel