From: Neal Becker (ndbecker2_at_gmail.com)
Date: Thu Mar 08 2007 - 04:27:15 PST
On Wednesday 07 March 2007, Paul H. Hargrove wrote: > 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. > This sounds reasonable. I can handle rpm pretty well. My problem is, I know nothing of autoconf (and don't want to know anything about it). If we can build just kernel mods using --with-components, that should be a good start. > -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?