[Fedora-packaging] Updated kernel-module-packaging example with ndiswrapper (Was: example kernel-module package)

Ville Skyttä ville.skytta at iki.fi
Sun Jul 3 16:12:40 UTC 2005


On Sun, 2005-07-03 at 09:21 -0500, Tom 'spot' Callaway wrote:
> On Sun, 2005-07-03 at 16:11 +0200, Thorsten Leemhuis wrote:
> 
> > - These macro definitions are now found in the top of the spec file:
> > %{!?kver:  %define  kver            %(uname -r)}
> >            %define  ksrc            %{_usrsrc}/kernels/%{kver}-%{_target_cpu}
> >            %define  moddir          /lib/modules/%{kver}/kernel/misc
> >            %define  mainpkgname     ndiswrapper
> >            %define  mainpkgversion  1.2
> >            %define  mainpgkrelease  1
> > Yes, in other packages I would not like these "mainpkg*" definitions on
> > the top, but in this type of package I think they are helpful.
> 
> I think you're mostly right. mainpkgversion and mainpkgrelease are
> redundant, however. Just use Version and Release for that.

Yep.

A policy or at least guidelines exactly where to place the modules
below /lib/modules/%{kver} would be nice.  See the TODO item in the Wiki
page.

Personally I think /lib/modules/%{kver}/kernel/... is bad, these are not
modules shipped with the kernel so intruding that space feels wrong.
"updates" is bad too, these aren't updates to in-kernel modules.
Upstream docs (see kbuild/modules.txt in the kernel source tree) talk
about "extra", but IIRC in the past people have had the interpretation
that it shouldn't be used for packaged modules.

Anyway, /lib/modules/%{kver}/extra/%{mainpkgname} using the above
definitions gets my vote, assuming there won't be problems with
module-init-tools or other stuff with that.

> > The kernel-module itself is now placed in
> >  %package -n kernel-module-%{mainpkgname}
> > So only one SRPM is created no matter how much different kernel-modules
> > are build. 
> 
> This makes sense, good thinking.

Except as described in my earlier mail to this thread, if the main
package's NVR doesn't change between rebuilds, we have a problem with
-debuginfo for these builds.
https://www.redhat.com/archives/fedora-packaging/2005-June/msg00055.html




More information about the Fedora-packaging mailing list