[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Moving libusb to /lib (was: [Re: nut: final stage of shutdown doesn't work if /usr is a in separate filesystem])



Arnaud Quette <arnaud.quette@free.fr> writes:

> According to the FHS [2], libusb should so be
> installed in /lib. The other option is to compile
> newhidups statically with libusb.

As one of the upstream hackers of BRLTTY, I'd like to chime in here.
When we added support for USB devices to BRLTTY we initially
looked at using libusb.  One of the decisive reasons to not do so
was the fact that libusb is installed to /usr/lib by default on
all systems.  BRLTTY lives in /sbin and is started during boot
as early as possible.  To ensure it still starts if /usr is not mounted
for some reason, we have to make sure we don't link with any libraries
in /usr/lib.  For BRLTTY, its probably already too late now, since
we wrote our own (quite nice, actually) USB core.

However, the same thing would also apply to libasound IMO.  When we
added support for ALSA PCM/MIDI sound to BRLTTY, we actually had to
bend over and dlopen/dlsym all the libasound symbols manually, so
that we can recover and ignore ALSA output if /usr is not mounted.

> There are pros and cons for both solution, but
> I (as upstream and DD) am more for the first.

I totally agree here.  Libraries which do provide an abstraction between
an application and kernel services should IMO go to /lib.

-- 
CYa,
  Mario

Attachment: pgpCCNCD6Pwms.pgp
Description: PGP signature


Reply to: