Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73365 - net-dialup/isdn-firmware installes files into wrong directory
Summary: net-dialup/isdn-firmware installes files into wrong directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-04 11:38 UTC by Stefan Briesenick (RETIRED)
Modified: 2004-12-12 14:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Briesenick (RETIRED) gentoo-dev 2004-12-04 11:38:57 UTC
beside the fact, that the ebuild installs all firmware files into /lib/firmware, it symlinks all files to /usr/lib/isdn.

and this is the wrong place! It *must* be /usr/share/isdn, where 'capiinit' looks for the firmware-files.

It's easy to fix!

Reproducible: Always
Steps to Reproduce:
Comment 1 Stefan Briesenick (RETIRED) gentoo-dev 2004-12-04 11:41:50 UTC
another option would be to fix the capi4k-ebuild, that 'capiinit' looks in /lib/firmware, then the symlinks are not needed anymore. I check, if this is easily to do.
Comment 2 Stefan Briesenick (RETIRED) gentoo-dev 2004-12-04 11:57:22 UTC
ok, it is possible to patch capiinfo to look in /lib/firmware first (it looks in other paths also; basically it's a searchlist).

we can then kick the symlinks. BUT: then the stupid, obsolete "isdn_" prefix, which is set by isdn-firmware ebuild (why?!) *must* be removed, so capiinit can find the firmware files.

Ok, what should we do?

My prefered solution would be:

1. patch capiinit in capi4k-utils, and then
2. change isdn-firmware behavior

then we should be "clean".

I can do this, if you want. And then I would attach the ebuild diffs here.
Comment 3 Stefan Briesenick (RETIRED) gentoo-dev 2004-12-04 11:57:26 UTC
ok, it is possible to patch capiinfo to look in /lib/firmware first (it looks in other paths also; basically it's a searchlist).

we can then kick the symlinks. BUT: then the stupid, obsolete "isdn_" prefix, which is set by isdn-firmware ebuild (why?!) *must* be removed, so capiinit can find the firmware files.

Ok, what should we do?

My prefered solution would be:

1. patch capiinit in capi4k-utils, and then
2. change isdn-firmware behavior

then we should be "clean".

I can do this, if you want. And then I would attach the ebuild diffs here.
Comment 4 Stefan Briesenick (RETIRED) gentoo-dev 2004-12-04 11:58:10 UTC
ups. sorry for double posting. Don't know how this could happen. :-/
Comment 5 Stefan Briesenick (RETIRED) gentoo-dev 2004-12-04 16:46:14 UTC
I'm working on it. So hold on. ;-)
Comment 6 Alin Năstac (RETIRED) gentoo-dev 2004-12-05 03:23:00 UTC
capiinit looks into in /usr/share/isdn _and_ /usr/lib/isdn. look in sources and you'll convince yourself.
Comment 7 Stefan Briesenick (RETIRED) gentoo-dev 2004-12-05 04:15:02 UTC
yes, I know now. But if you read the source, then you should have seen the comment, that /usr/share/isdn is more LSB conformant. And also this was the place we installed the firmware before the symlink changes.

Nontheless, I made a patch that 'capiinit' also looks in /lib/firmware now and install the firmware into /lib/firmware only, w/o the stupid "isdn_" prefix. It works great for me.

But before I attach it, I have to check any side-effects to isdn4k-utils, since we also install firmware for this package. But it seems, that there's no fixed path for isdn4k-utils, but is controlled via shell-scripts we still have to write. ;-) Firmware-Loading is not handled yet in our isdn4k-utils package. But I'm also working on this topic!

Since I have now a Fritz!USB v2.0 for testing (got it from a friend), I see *many* things we have to enhance. We need a hotplug framework. :-/ 

But I have this "card" now running and I'm working on a gentoo'ish, smart and slick solution. The problem is, that this will affect following packages: hotplug-base, capi4k-utils, isdn4k-utils. So it's a little bit work.

I will attach any changes to this Bug, so we have all things together.
Comment 8 Stefan Briesenick (RETIRED) gentoo-dev 2004-12-05 04:24:06 UTC
btw: what was the reason to move the firmware-files into /lib/firmware? I know, that this is the place where the kernel looks for it, but *all* ISDN firmware-files are *not* controlled by the kernel, but with userland scripts/binaries (i.e. capiinit). So there's really no need to install it into /lib/firmware. So /usr/share/isdn would be the best place. But let it be for the time being. I make all the other stuff first and then, when I'm finished, then we can argue again which is the best location for the firmware files. ;-)

Comment 9 Alin Năstac (RETIRED) gentoo-dev 2004-12-05 04:36:40 UTC
comment #7: not true; /lib/firmware appears to be the new FHS standard. see for example http://www.poptix.net/ivtv/Nov-2004/msg00064.html

I also not like the idea of adding firmware files anywhere in /usr. These files should not be used by normal user.

as for isdn_ prefix, I wanted to be compatible with hotplug (maybe someday someone will make hotplug script to load the firmware). Anyway, tt is nice to have a  same behaviour in all ebuilds that install firmware files, don't you think?

Comment 10 Stefan Briesenick (RETIRED) gentoo-dev 2004-12-05 09:54:52 UTC
I have no problem with /lib/firmware. But then we have to migrate all stuff. I can do this and I will do this! I already started this work.

But I have really a problem with the prefix. A subdir /lib/firmware/isdn or such would be ok, but not the prefix. Before we do this, I want to check other distris and the FHS/kernel docs.

Furthermore: I make the hotplug-script for ISDN (already started!). It takes some time (gimme a week). I have the hardware, a SuSE installation to see how SuSE do it and of course, I have ISDN at all. So I can test it. 

The ISDN stuff in Gentoo changed toooooo much the last few weeks. We should create a solid, FHS based and slick framework for it. Adapt all ebuilds, test it intensive, and then put it all into portage.
Comment 11 Stefan Briesenick (RETIRED) gentoo-dev 2004-12-05 10:19:55 UTC
Ok, I asked google and found some interesting links regarding /lib/firmware.

this tells me, that /lib/firmware is the new FHS standard:
http://www.poptix.net/ivtv/Nov-2004/msg00032.html

and this tells me, that we don't have to prefix any files:
/usr/src/linux/Documentation/isdn/README.avmb1

And all I found with google tells me that nobody prefix any firmware files. Only the DVB guys do this, and 'tt' means just Technotrend, which is a brand of DVB cards. I know this, because I own such card and run a VDR. ;-)
Comment 12 Alin Năstac (RETIRED) gentoo-dev 2004-12-12 02:49:24 UTC
we must decide what installation directory do we use. The most appropriate directory appears to be /lib/firmware/isdn but you said it is safe to install it in /lib/firmware. What it's gone to be?

As a consequence, capi4k-utils would to contain an additional sed, which will insert the above path in the firmwarepath defined in capiinit/capiinit.c as the first choice. In addition, the isdn-firmware must install a /lib/isdn symlink to that directory for making compatible with older ebuilds of capi4k-utils.
Comment 13 Stefan Schweizer (RETIRED) gentoo-dev 2004-12-12 03:02:42 UTC
Firmware files without additional prefix in /lib/firmware and symlinks to the oldlocation, thats what I vote for.

We should load the firmware with /etc/hotplug/firmware.agent. In that file you also see that it is /lib/firmware. So the right conversion would be to make capiinit load it with this script.
Comment 14 Stefan Briesenick (RETIRED) gentoo-dev 2004-12-12 03:24:51 UTC
/lib/firmware w/o prefix is the best solution.

But: I think that the /etc/hotplug/firmware.agent won't work with capiinit yet. The default way to load the firmware into CAPI based cards is capiinit. But I will check it.

For the time being, I suggest to do this:

1. put all firmware files into /lib/firmware w/o prefix
2. use capiinit to load it (because it just works!)

If there's a better solution *and* some documentation about it and/or another Distri which loads CAPI firmware via /etc/hotplug/firmware.agent (I want to see if and how it works!), then we can switch to firmware.agent.

Since I'm working on this task right now, and I want to release my work ASAP, it's best to do it this way.

The ISDN thingy is a quite complicated thing, because almost every vendor/chipset handles the driver setup differently. SuSE has a HUGE framework for it. Too bloated for Gentoo. So I have hard work in creating a slick but complete solution. Alin is informed via email about my work.
Comment 15 Alin Năstac (RETIRED) gentoo-dev 2004-12-12 09:46:30 UTC
-r1 commited
Comment 16 Stefan Schweizer (RETIRED) gentoo-dev 2004-12-12 09:47:12 UTC
Please fix that commit.  It incorrectly syms to /lib/isdn as far as I see.
Comment 17 Alin Năstac (RETIRED) gentoo-dev 2004-12-12 09:54:17 UTC
that symlink is needed for capi4k-utils, at least current versions.

In near future, I will change capi4k-utils by altering search path but for the time being it needs that /lib/isdn path.
Comment 18 Stefan Briesenick (RETIRED) gentoo-dev 2004-12-12 11:28:09 UTC
yup. I try to hurry up. But this damn complex ISDN thingy takes some time... ;-)

I've coded and tested the whole weekend. It runs better and better now.

To speed up things, I will release my work, as soon as USB and normal PCI/PnP stuff works smoothly. PCMCIA can be done after (I have 4 different cards for testing).

@Alin: please don't commit any new things to capi4k-utils, isdn4k-utils and isdn-firmware. I'm working on these ebuilds and every commit of you slow down my work, since I have to merge your changes. ty.
Comment 19 Alin Năstac (RETIRED) gentoo-dev 2004-12-12 14:01:28 UTC
@Stefan: I've changed isdn-firmware only for helping you with your work (from now on I will install capi firmware only in /lib/firmware). It isn't fun to keep changing paths in scripts/sources ;)
Comment 20 Stefan Briesenick (RETIRED) gentoo-dev 2004-12-12 14:50:13 UTC
yo. ;-)

the problem is, that I've done it also before. My changes also includes the fus2base.frm and fus3base.frm firmware files for Fritz!USB v2.0 and v2.1. But hey, it's ok, this was not too much work. Most of my work is in capi4k and isdn4k.