Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Feb 2012 23:25:45 +0100
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        danfe@FreeBSD.org, x11@FreeBSD.org, ports@FreeBSD.org
Subject:   Fix nvidia-like ports, help needed
Message-ID:  <20120222222544.GA88092@azathoth.lan>

next in thread | raw e-mail | index | archive | help

--fdj2RfSjLxBAspz7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi all,

this mail is also sent to ports@ has the problem we have with nvidia-driver
might also occur elsewhere and we need a general fix for that.

First what is the failure: nvidia driver overwrite libGL.so provided by another
package which is broken by design because the package database isn't consistent
anymore. however this nvidia-driver needs to replace libGL.so.

In that case we definitely need to have a tool allowing us to safely provide
libGL.so and switch between the mesa one and the nvidia one.

currently this kind of bugs silently occurs with pkg_install, but pkgng is more
strict about that and refuses it.

We then need a tool like gentoo's eselect, redhat alternative and I don't
remember the name for debian.

We need it the FreeBSD way, not sure we need something as complex as what the
linux distribution does, maybe yes.

I wrote a quick and dirty script named alternative:
http://people.freebsd.org/~bapt/alternative.txt

That get informations about the alternatives in ${LOCALBASE}/etc/alternative.d

${LOCALBASE}/etc/alternative.d/libgl
${LOCALBASE}/etc/alternative.d/libgl/nvidia
${LOCALBASE}/etc/alternative.d/libgl/nvidia/nvidia.cf
${LOCALBASE}/etc/alternative.d/libgl/libgl.cf
${LOCALBASE}/etc/alternative.d/libgl/current
${LOCALBASE}/etc/alternative.d/libgl/mesa
${LOCALBASE}/etc/alternative.d/libgl/mesa/mesa.cf

current behing a symlink to either nvidia or mesa

cat libgl.cf:
NAME="libgl"
DESCRIPTION="Default OpenGL library"

cat mesa/mesa.cf
NAME=mesa
DESCRIPTION="libGL provided by the mesa project"

cat nvidia/nvidia.cf
NAME=nvidia
DESCRIPTION="libGL provided by the nvidia driver"

with that nvidia could have libgl-nvidia.so and mesa libgl-mesa.so

the script alternative might change the libgl.so symlink to point on nvidia or
mesa depending on the user choices.

this script is just an idea definitly not an implementation.

nvidia case is just an example but the script should try to be more general.
(handle binaries scripts etc.)

I don't have time to work on this currently hope someone will takle this task.

regards,
Bapt

--fdj2RfSjLxBAspz7
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)

iEYEARECAAYFAk9Fa2gACgkQ8kTtMUmk6ExHvQCfc/GTRtUifFYGdNIhEkC/uo/v
ynoAn2rHUaiKFw0mFj1GlQAEmgmsxmZo
=DvoU
-----END PGP SIGNATURE-----

--fdj2RfSjLxBAspz7--



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