<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>73365</bug_id>
          
          <creation_ts>2004-12-04 11:38 0000</creation_ts>
          <short_desc>net-dialup/isdn-firmware installes files into wrong directory</short_desc>
          <delta_ts>2004-12-12 14:50:13 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>sbriesen@gentoo.org</reporter>
          <assigned_to>net-dialup@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>sbriesen@gentoo.org</who>
            <bug_when>2004-12-04 11:38:57 0000</bug_when>
            <thetext>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 &apos;capiinit&apos; looks for the firmware-files.

It&apos;s easy to fix!

Reproducible: Always
Steps to Reproduce:</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sbriesen@gentoo.org</who>
            <bug_when>2004-12-04 11:41:50 0000</bug_when>
            <thetext>another option would be to fix the capi4k-ebuild, that &apos;capiinit&apos; looks in /lib/firmware, then the symlinks are not needed anymore. I check, if this is easily to do.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sbriesen@gentoo.org</who>
            <bug_when>2004-12-04 11:57:22 0000</bug_when>
            <thetext>ok, it is possible to patch capiinfo to look in /lib/firmware first (it looks in other paths also; basically it&apos;s a searchlist).

we can then kick the symlinks. BUT: then the stupid, obsolete &quot;isdn_&quot; 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 &quot;clean&quot;.

I can do this, if you want. And then I would attach the ebuild diffs here.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sbriesen@gentoo.org</who>
            <bug_when>2004-12-04 11:57:26 0000</bug_when>
            <thetext>ok, it is possible to patch capiinfo to look in /lib/firmware first (it looks in other paths also; basically it&apos;s a searchlist).

we can then kick the symlinks. BUT: then the stupid, obsolete &quot;isdn_&quot; 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 &quot;clean&quot;.

I can do this, if you want. And then I would attach the ebuild diffs here.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sbriesen@gentoo.org</who>
            <bug_when>2004-12-04 11:58:10 0000</bug_when>
            <thetext>ups. sorry for double posting. Don&apos;t know how this could happen. :-/</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sbriesen@gentoo.org</who>
            <bug_when>2004-12-04 16:46:14 0000</bug_when>
            <thetext>I&apos;m working on it. So hold on. ;-)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mrness@gentoo.org</who>
            <bug_when>2004-12-05 03:23:00 0000</bug_when>
            <thetext>capiinit looks into in /usr/share/isdn _and_ /usr/lib/isdn. look in sources and you&apos;ll convince yourself.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sbriesen@gentoo.org</who>
            <bug_when>2004-12-05 04:15:02 0000</bug_when>
            <thetext>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 &apos;capiinit&apos; also looks in /lib/firmware now and install the firmware into /lib/firmware only, w/o the stupid &quot;isdn_&quot; 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&apos;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&apos;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 &quot;card&quot; now running and I&apos;m working on a gentoo&apos;ish, smart and slick solution. The problem is, that this will affect following packages: hotplug-base, capi4k-utils, isdn4k-utils. So it&apos;s a little bit work.

I will attach any changes to this Bug, so we have all things together.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sbriesen@gentoo.org</who>
            <bug_when>2004-12-05 04:24:06 0000</bug_when>
            <thetext>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&apos;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&apos;m finished, then we can argue again which is the best location for the firmware files. ;-)

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mrness@gentoo.org</who>
            <bug_when>2004-12-05 04:36:40 0000</bug_when>
            <thetext>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&apos;t you think?

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sbriesen@gentoo.org</who>
            <bug_when>2004-12-05 09:54:52 0000</bug_when>
            <thetext>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.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sbriesen@gentoo.org</who>
            <bug_when>2004-12-05 10:19:55 0000</bug_when>
            <thetext>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&apos;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 &apos;tt&apos; means just Technotrend, which is a brand of DVB cards. I know this, because I own such card and run a VDR. ;-)
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mrness@gentoo.org</who>
            <bug_when>2004-12-12 02:49:24 0000</bug_when>
            <thetext>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&apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>genstef@gentoo.org</who>
            <bug_when>2004-12-12 03:02:42 0000</bug_when>
            <thetext>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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sbriesen@gentoo.org</who>
            <bug_when>2004-12-12 03:24:51 0000</bug_when>
            <thetext>/lib/firmware w/o prefix is the best solution.

But: I think that the /etc/hotplug/firmware.agent won&apos;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&apos;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&apos;m working on this task right now, and I want to release my work ASAP, it&apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mrness@gentoo.org</who>
            <bug_when>2004-12-12 09:46:30 0000</bug_when>
            <thetext>-r1 commited</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>genstef@gentoo.org</who>
            <bug_when>2004-12-12 09:47:12 0000</bug_when>
            <thetext>Please fix that commit.  It incorrectly syms to /lib/isdn as far as I see.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mrness@gentoo.org</who>
            <bug_when>2004-12-12 09:54:17 0000</bug_when>
            <thetext>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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sbriesen@gentoo.org</who>
            <bug_when>2004-12-12 11:28:09 0000</bug_when>
            <thetext>yup. I try to hurry up. But this damn complex ISDN thingy takes some time... ;-)

I&apos;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&apos;t commit any new things to capi4k-utils, isdn4k-utils and isdn-firmware. I&apos;m working on these ebuilds and every commit of you slow down my work, since I have to merge your changes. ty.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mrness@gentoo.org</who>
            <bug_when>2004-12-12 14:01:28 0000</bug_when>
            <thetext>@Stefan: I&apos;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&apos;t fun to keep changing paths in scripts/sources ;)
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>sbriesen@gentoo.org</who>
            <bug_when>2004-12-12 14:50:13 0000</bug_when>
            <thetext>yo. ;-)

the problem is, that I&apos;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&apos;s ok, this was not too much work. Most of my work is in capi4k and isdn4k.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>