[OpenAFS] naive questions about openafs

Jeffrey Hutzelman jhutz@cmu.edu
Mon, 24 Jan 2005 17:27:46 -0500


On Saturday, January 22, 2005 16:22:33 +0100 Guillaume Rousse 
<rousse@ccr.jussieu.fr> wrote:

> Matthew Miller wrote:
>> On Fri, Jan 21, 2005 at 06:07:42PM +0100, Guillaume Rousse wrote:
>>
>>> BTW, I could be wrong, but I don't really see kernel-tree-specific
>>> options in the generated makefile, apart build directory pathes that
>>> could get easily made relatives. I tested against two different 2.6
>>
>>
>> The potential for differences exists as the kernel can change
>> significantly between minor releases.
> The point is: how would it change, otherwise as inside the source code ?
>
> If I ship a directory containing the following:
> - the attached generated Makefile
> - all .c files corresponding to the .o files inside
> - the generated AFS_component_version_number.c file
> - all referenced .h files
>
> Would it be enough for building against any 2.6 kernel tree ?

No.  The contents and behaviour of the OpenAFS kernel module are affected 
by files which are generated at configure time based on the properties of 
the kernel against which you are configuring.  You need to ship the entire 
libafs_tree directory exactly as it is created, and nothing else.  The 
configure script in that directory must be run against the kernel for which 
you are building modules; it cannot be run "in advance".

Mandrake is far from unique in having a way to package source for 
third-party kernel modules.  Every major Linux distribution has such a 
mechanism.  This is what libafs_tree was designed to be used for, and when 
used as intended, IT DOES WORK.

The process of building your package will consist of running the top-level 
configure script, making 'only_libafs_tree', and packaging up the resulting 
libafs_tree directory.  When it is time to actually use the package, it 
will be necessary to run its configure script with appropriate options, 
then run make.  That's all there is to it.