[aur-general] PKGBUILD review request

Dave Reisner d at falconindy.com
Mon Apr 30 09:16:32 EDT 2012


On Mon, Apr 30, 2012 at 11:27:54AM +0200, Bernhard D wrote:
> Hi,
> 
> I wrote a PKGBUILD for the driver package from TBS (www.tbsdtv.com) for
> their dvb cards. I split packaging for modules and firmware and patched

No, please don't make this a split package. You need them both at the
same time, there's no reason to make a split package with a single file
in each.

> the sources to install the modules to /lib/modules/kernelversion/updates

This is wrong. updates/ are for... updates. It's admin territory for
overriding existing (in tree) kernel modules with backports and whatnot.

> and the firmware to /lib/firmware/updates to avoid overwriting existing
> files. It's the first time I'm building kernel modules and there are
> two things I'm not sure about:
> - Are the files under /lib/firmware/updates found and do they have
> precedence?

Yes they have precedence, but for the same reason as above you should
not be installing things here. Additionally, you must adhere to the path
that the module dictates for its firmware. radeon, for example, expects
firmware under radeon/. You can see exactly what it expects with
modinfo, e.g.

  $ modinfo -k 3.3.4-1-ARCH -F firmware radeon | sed 3q
  radeon/R520_cp.bin
  radeon/RS600_cp.bin
  radeon/RS690_cp.bin

So in this case, firmware is looked for in each of these base paths (in
order):

  /usr/lib/firmware/updates/$(uname -r)
  /usr/lib/firmware/updates/
  /lib/firmware/updates/$(uname -r)
  /lib/firmware/updates
  /usr/lib/firmware/$(uname -r)
  /usr/lib/firmware
  /lib/firmware/$(uname -r)
  /lib/firmware

The search stops as soon as udev finds a match.

> - Is "depmod -a" after install, upgrade and removal the right approach
> to rebuild the module dependencies?

No, this is overkill. You should know exactly what kernel you're
building against so only run depmod for that one kernel.

d


More information about the aur-general mailing list