Fix nvidia-like ports, help needed
bapt at FreeBSD.org
Thu Feb 23 11:44:04 UTC 2012
On 23.02.2012 08:34, Alexander Leidinger wrote:
> Quoting Baptiste Daroussin <bapt at FreeBSD.org> (from Thu, 23 Feb 2012
> 08:21:33 +0100):
>> On Thu, Feb 23, 2012 at 01:35:02AM +0000, Alexey Dokuchaev wrote:
>>> On Wed, Feb 22, 2012 at 04:36:08PM -0700, John Hein wrote:
>>> > One of the issues with 'alternatives' implementations is that
>>> they are
>>> > not selectable per-user (including non superuser).
>>> > In this particular case (libGL), also what about the native X
>>> > vs. virtual X servers that support using the mesa lib
>>> > selection)?
>>> > In addition to something like alternatives, another option is to
>>> > installation of conflicting files (like libGL.so in this case) to
>>> > separate directories and specify which to use using a path (like
>>> > LD_LIBRARY_PATH or rpath at compile time). That can help with
>>> > aforementioned per-user and per-application variation.
>>> > Personally, I prefer the "path" method over something like
>>> > sym links (e.g., debian/redhat alternatives). There can still be
>>> > front-end tool to get at the "alternates" configuration
>>> > but I like the ability to set a path rather than a sym link.
>>> I tend to agree. While I currently do not see clearly the best
>>> solution to
>>> the problem, when I see "etc/alternative.d" I want to unsee it
>>> For nvidia driver, it might be easier to simply provide a knob in
>>> xorg-server and libGL and perhaps register a dependency on
>>> no need to invent some cumbersome framework.
>> Why not but which package will provide the libGL.so file? in all
>> case the users
>> might need to be able to switch the libGL.so file from the nvidia
>> one to the
>> mesa one, what would a user have to do for that, in particular a
>> user using only
>> binary packages where a file can't belong to 2 different packages
>> if someone have a better solution than a framework for that I'm open
>> but no the
>> knob is not a solution for package people.
> Do you havea list of packages which overzrite something, respectively
> do you have a list of files which are overwriten?
> If we just talk about the nvidia lib, installing the mesa and nvidia
> ones into subdirectories and asking to add (or adding
> automatically/optionally) ldconfig_paths="$ldconfig_paths
> /usr/local/lib/<port>-gl/" to rc.conf could be an option.
Currently, no I don't have a list of packages that overwrite things,
anyway way I do really like this kind of solution, I don't know yet how
this can be automated, it really looks the right way.
More information about the freebsd-ports