Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jul 2011 22:37:34 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Juergen Lock <nox@jelal.kn-bremen.de>
Cc:        freebsd-multimedia@FreeBSD.org, itetcu@FreeBSD.org
Subject:   Re: Fixing skype multimedia/linux_v4l2wrapper dependency on 8
Message-ID:  <20110718223734.00003b64@unknown>
In-Reply-To: <20110715191003.GA60074@triton8.kn-bremen.de>
References:  <20110714205415.GA3304@triton8.kn-bremen.de> <20110715123002.363272dtl9b48dka@webmail.leidinger.net> <20110715191003.GA60074@triton8.kn-bremen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 15 Jul 2011 21:10:03 +0200 Juergen Lock
<nox@jelal.kn-bremen.de> wrote:

> On Fri, Jul 15, 2011 at 12:30:02PM +0200, Alexander Leidinger wrote:
> > Quoting Juergen Lock <nox@jelal.kn-bremen.de> (from Thu, 14 Jul
> > 2011 22:54:15 +0200):
> > 
> > >  Installing the skype ports with VIDEO knob on currently fails on
> > > up-to-date stable/8 because the multimedia/linux_v4l2wrapper port
> > > now detects it is not needed anymore (my patch has been committed
> > > to stable a while ago.)  So I now made a patch that extracts the
> > > check whether the code is in the kernel into a seperate
> > > Makefile.sub that Linux ports that need V4L2 can include, and
> > > changed the skype ports to do just that.  Does this look good and
> > > ok to commit?
> > 
> > 
> > > Index: multimedia/linux_v4l2wrapper-kmod/Makefile.sub
> > > @@ -0,0 +1,12 @@
> > > +# $FreeBSD$
> > > +
> > > +# try to avoid child processes when finding out if already in
> > > the kernel +.if ${OSVERSION} > 900036 || (${OSVERSION} < 900000
> > > && ${OSVERSION}  
> > > > 802508)
> > > +LINUX_V4L2_INBASE=	1
> > 
> > Here you say that it can be used, even if it is not compiled in
> > and not loaded.
> > 
> Yeah in these cases it would be part of the Linuxolator without
> which Linux apps that this is for won't run anyway...

This was just a preparation for the next two observations, not
something which needs to be corrected.

> > > +.else
> > > +.if ${OSVERSION} == 900036 || ${OSVERSION} == 802508
> > > +LINUX_V4L2_INBASE!=	($(SYSCTL) -n
> > > kern.features.linuxulator_v4l2  
> > > 2>/dev/null || true)
> > 
> > Here you say it can only be used *if it is loaded or compiled in*.
> > 
>  Yeah it is a crude check which will fail if linux.ko isn't loaded
> (or statically compiled in.)  I only added this because you didn't
> bump __FreeBSD_version so these OSVERSIONs can either have it or
> not.  But since it's the best I could come up in with this situation
> and the only harm done would be the linux_v4l2wrapper.ko would get
> installed when it is not needed I think it's justified.  (The kld
> probably could even be loaded when the code is in the kernel already
> and skype would still work...  Hmm or should we just depend on that
> and on these OSVERSIONs install the kld unconditionally?)

It depends on what you want to achieve. IMO just wait for complains
that it does not work. If nobody complains, it may be that it is not
necessary to invest the time and energy to change this. As there are
more places which depend upon linux-stuff being in memory, I would
assume that most people which want to install skype already have it in
memory at the time when the check is run.

> > The correct name for the variable here would be LINUX_V4L2_INMEMORY.
> > 
> > If it is intended to have a variable which denotes both cases, I
> > would use a different name, maybe ..._OK or ..._AVAILABLE or
> > something similar.
> > 
>  Alright I'll change it to LINUX_V4L2_AVAILABLE.
>
> > > +.else
> > > +LINUX_V4L2_INBASE=	0
> > > +.endif
> > > +.endif
> > 
>  Any other comments?

Not really. :)

Bye,
Alexander.

-- 
http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110718223734.00003b64>