Re: blcr dkms

From: Paul H. Hargrove (PHHargrove_at_lbl_dot_gov)
Date: Wed Mar 07 2007 - 18:36:08 PST

  • Next message: Neal Becker: "Re: blcr dkms"
    Neal,
      I was not familiar with dkms, but what you describe sounds 
    interesting. I've taken just a moment to go read a little about it.
    
    As currently built, you are correct that extracting the kernel source 
    from the distribution tree would leave something that would not build.  
    However, since there are 3 modules to build, we'd want a parent 
    directory anyway.  I didn't get the impression from my very brief 
    reading that dkms would "break" if we copied the entire blcr 
    distribution rather than just the module sources - but that would be 
    very sloppy.
    
    While not documented anywhere, blcr's configure script does take an 
    option to determine which portions are built, though this is not 
    integrated with the RPM packaging.
    For instance:
      path/to/configure --with-components=util,libcr,include
    would build all but the kernel modules, while
      path/to/configure --with-components=modules
    would build only the kernel modules.
    
    So, one could install the minimum required parts of the BLCR source tree 
    for dkms and write the dkms.conf file to perform the configure with the 
    --with-components=modules flag.  One would prune parts of the source not 
    needed.  At the moment, "--with-components" doesn't cover the tests, 
    examples, sss and doc directories which are always configured, but that 
    could be changed.  It might even make sense to add a --enable-dkms so 
    that configure would require (I think) only the following directories: 
    config, cr_module, vmadump, vmadump4, blcr_imports, and include.
    
    If I understand correctly, a "proper" implementation might be for the 
    BLCR .src.rpm to build as it does now, but to also build a 
    blcr-modules-VERSION-1dkms.noarch.rpm package that contains a dkms.conf 
    and the subset-sources.  My intent here is that sites w/o dkms could 
    still have a binary RPM of the kernel module, but dkms-sites could use 
    the dkms one instead.  Does that sound right?
    
    If it sounds like I am on the right track, then we can probably do 
    something.  If you work on the additions to the rpm spec file for the 
    "sloppy" version that copies the entire blcr distro to /usr/src but 
    passes --with-components=modules to configure, then I'll work on 
    configure-goop to ensure that --with-components=modules requires only a 
    truly minimal subtree to be installed.
    
    -Paul
    
    Neal Becker wrote:
    > I'm interested in packaging blcr as an rpm using dkms.  In order to do this, 
    > we need to separate the library build and kernel module build.  In other 
    > words, the library build would produce one rpms, and the dkms would be a 
    > package of the module source.  Installing the dkms kernel rpm would just 
    > install the source into /usr/src/blcr-xxxx.  At boot dkms would do configure, 
    > make if required.  I don't think blcr is packaged to allow this right now, 
    > since it expects to have a top-level dir above the kernel source dir where 
    > configure was run (I say that because the kernel module Makefile has a lot of 
    > refs to ../, so I'm assuming it won't work as is).
    >
    > Any thoughts?  Interest?
    >   
    
    
    -- 
    Paul H. Hargrove                          PHHargrove_at_lbl_dot_gov
    Future Technologies Group                 
    HPC Research Department                   Tel: +1-510-495-2352
    Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900
    

  • Next message: Neal Becker: "Re: blcr dkms"