Proper way to detect kernel / userland sources?

Lars Engels lars.engels at 0x20.net
Wed Nov 10 07:07:13 UTC 2010


On Tue, Nov 09, 2010 at 11:38:22PM +0300, Dmitry Marakasov wrote:
> * Lev Serebryakov (lev at FreeBSD.org) wrote:
> 
> >   I'm  preparing port which depends both on kernel source (it contains
> > kernel module) and userland sources (it needs GEOM sources).
> > 
> >   I   see,   that  ports  with  kernel  modules  check  for  hardcoded
> >   "/usr/src/sys/Makefile".  But it doesn't look good: sources could be
> >   perfectly valid, but placed in other directory!
> > 
> >   Is  here  any  standerd  variable  which  should  be used instead of
> >   hardcoded "/usr/src"?

[...]

> While here, I'm worried about the fact that /usr/src is used as a
> possible source for OSVERSION. Currently, in presence of freebsd-update,
> it's really likely that system sources are out-of sync with installed
> system, so getting OSVERSION from /usr/src should likely be removed.
> osreldate is enough fallback if /usr/include/sys/param.h is absent
> for some reason.

AFAIK freebsd-update also updates /usr/src if /usr/src is not empty.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20101110/b40b1194/attachment.pgp


More information about the freebsd-ports mailing list