First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 58222
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Daniel Black <dragonheart@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Stefan Schweizer <genstef@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
slmodem Modified conf.d/slmodem configuration file text/plain Matteo Settenvini 2004-07-24 15:16 0000 746 bytes Details
slmodem Updated init.d/slmodem script for alsa support text/plain Matteo Settenvini 2004-07-24 15:19 0000 1.75 KB Details
slmodem Split of functions in the init script text/plain Matteo Settenvini 2004-07-25 03:08 0000 1.95 KB Details
slmodem Updated init script text/plain Matteo Settenvini 2004-07-25 12:06 0000 2.00 KB Details
slmodem Updated (again) init script text/plain Matteo Settenvini 2004-07-25 13:15 0000 2.02 KB Details
slmodem Updated configuration file for conf.d text/plain Matteo Settenvini 2004-07-25 13:16 0000 841 bytes Details
slmodem ebegin place, init and unload updated text/plain Stefan Schweizer 2004-07-25 13:21 0000 2.06 KB Details
slmodem init.d/slmodem updated again text/plain Stefan Schweizer 2004-07-26 05:04 0000 2.19 KB Details
slmodem-2.9.init.patch A patch to deal with "need alsa-sound" and "modprobe -r ${MODULE}" issues patch Rouslan Solomakhin 2004-07-27 12:45 0000 532 bytes Details | Diff
slmodem init.d/slmodem patch applied with modifications text/plain Stefan Schweizer 2004-07-27 14:57 0000 2.46 KB Details
slmodem.status.patch change "eend 1" in functions to "return 1" + move "eend $status" to the end of "stop()" patch Rouslan Solomakhin 2004-08-05 07:51 0000 645 bytes Details | Diff
slmodem.echo.patch "echo" fixes and enhancements patch Rouslan Solomakhin 2004-08-05 08:38 0000 1.22 KB Details | Diff
slmodem.echo-slmodem.patch "echo" and "eend + return" patches combined into one patch Rouslan Solomakhin 2004-08-05 08:58 0000 1.48 KB Details | Diff
slmodem updated ebuild text/plain Stefan Schweizer 2004-08-05 12:04 0000 2.40 KB Details
slmodem /etc/init.d/slmodem text/plain Stefan Schweizer 2004-08-05 22:59 0000 2.60 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 58222 depends on: Show dependency tree
Bug 58222 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-07-24 14:11 0000
Hi,
If I want to emerge the new slmodem ebuild I get following message:

I simply deleted the dependency and it worked ..


Consoleshot:


These are the packages that I would merge, in order:

Calculating dependencies ...done!
[blocks B     ] sys-kernel/linux26-headers ("virtual/os-headers" from pkg sys-kernel/linux-headers-2.4.26)
[ebuild  N    ] sys-kernel/linux-headers-2.4.26   30,051 kB 
[ebuild   R   ] net-dialup/slmodem-2.9.9  +alsa  0 kB

------- Comment #1 From Matteo Settenvini 2004-07-24 15:15:44 0000 -------
The problem is that this ebuild hasn't probably been tested enough with 2.6
kernels plus alsa support (in fact, the init.d script and the conf.d
configuration file lacked of the necessary vars for alsa support).

I modified the init script and the conf file. Now they work also for alsa
users. 
I'll post them here, suggestions are welcomed (but quickly, many users use
these drivers).

Stefan, could you please modify the summary to something like "kernel 2.6 +
alsa support for slmodem 2.9.9 ebuild broken"? so we do everything here without
opening another bug.

------- Comment #2 From Matteo Settenvini 2004-07-24 15:16:52 0000 -------
Created an attachment (id=36094) [details]
Modified conf.d/slmodem configuration file

This includes also the needed vars for alsa support.

------- Comment #3 From Matteo Settenvini 2004-07-24 15:19:20 0000 -------
Created an attachment (id=36095) [details]
Updated init.d/slmodem script for alsa support

Please test it with both configuration to check if it works. It does for me
with alsa + 2.6.7-gentoo-r11.

------- Comment #4 From Matteo Settenvini 2004-07-24 15:23:30 0000 -------
As for the ebuild, I ain't sure 100%, but the right correction should be:

--- slmodem-2.9.9.ebuild.old    2004-07-24 23:31:41.000000000 +0200
+++ slmodem-2.9.9.ebuild        2004-07-24 23:32:31.000000000 +0200
@@ -14,7 +14,7 @@

 DEPEND="virtual/libc
        alsa? ( media-libs/alsa-lib )
-       sys-kernel/linux-headers"
+       virtual/os-headers"

 #      sys-kernel/config-kernel

however, I never understood how to use these virtuals...

Hope to have been of help!

------- Comment #5 From Matteo Settenvini 2004-07-24 15:37:18 0000 -------
Sorry to spam once again, but:

a) the init.d script should depend also on alsa, but I didn't know how to say it, since some systems don't have alsa (and use slamr/slusb), so is it like:

depend {
?alsa
}

dunno. but the script shan't be called after alsa, so we need something like that.

b) in the ebuild, if you want, add a note about "rc-update add slmodem default", some users don't know it, and other pkgs that install init scripts say it.

Bye (please, do not hate me too much... :),
Matteo

------- Comment #6 From Daniel Black 2004-07-24 16:53:33 0000 -------
Kernel headers fixed - well spotted and Matteo your fix is correct.

Init script conditional dependancy on alsa added.

Note b as per comment 6 added.

No I don't hate you. Fixes are good.

I don't think alsa stuff should belong in the slmodem script. If alsa is used it should form part of the alsa init scripts/startup. As such if you provide a /etc/modules.d/slmodem-alsa template I will include it. If I'm wrong tell me how.

Also while your coding minds are going I'm after a src_test function that can test the compile. Basic principles are that its called before the src_install and probably should run modem_test somehow. Constraints are that it is run as the user portage.

Also should modem_test be installed into /usr/sbin?

------- Comment #7 From Matteo Settenvini 2004-07-25 02:57:44 0000 -------
>I don't think alsa stuff should belong in the slmodem script. If alsa is used it should form part of the alsa init scripts/startup. As such if you provide a /etc/modules.d/slmodem-alsa template I will include it. If I'm wrong tell me how.

We can of course do that, but  we'll need to do some more checks when loading
alsa, and the alsa init script will become a little complicated. I'd keep the
alsa part of the init script into the slmodem one, imho. Else, we could test
for the alsa modem module (snd-intel8x0m), for the slmodem executable (not
everyone has it installed) and if succesful start it. 

Creating another alsa-slmodem init script would be overpopulating the init.d
dir, and I read somewhere while surfing bugs.gentoo.org or reading weeklies
that we don't want it.

If you want, I can clean the init script splitting the two part in separate
functions, it'll improve readability.

As for "/etc/modules.d/slmodem-alsa template", it would be one line long, as
suggested in your ebuil:
alias snd-card-1 snd-intel8x0m
(where "1" changes, obviously). 
Moreover, it would work also without this line, I guess.

It should stay in /etc/modules.d/alsa, or eventually in /etc/modules.d/slmodem
(the latter doesn't seem to harm for alsa, but is it necessary?).

>Also while your coding minds are going I'm after a src_test function that can test the compile. Basic principles are that its called before the src_install and probably should run modem_test somehow. Constraints are that it is run as the user portage.

Don't know, maybe it should be better it would require a user action to start.
Someone compiles for other hosts, and since we need to bring up slmodemd, i
don't know if the user "portage" has the right permissions to do that. Anyway,
if there's a way, it would be great to do a test. (the problem is, the user
need to configure the pkg in conf.d before testing, or modem_test is
independent?)

> Also should modem_test be installed into /usr/sbin?
Better rename it, something like "slmodem_test". Just an opinion, though.

------- Comment #8 From Matteo Settenvini 2004-07-25 03:08:41 0000 -------
Created an attachment (id=36106) [details]
Split of functions in the init script

------- Comment #9 From Stefan Schweizer 2004-07-25 10:15:08 0000 -------
The init script does not work very good here:
(I use alsa because of suspend-to-ram not working in snd-intel8x0m)
tail -f /var/log/messages -f

/ # /etc/init.d/slmodem stop 
 * Shutting down slmodemd...
FATAL: Module slamr is in use.                                                                                                                                      [ ok ]
/ # rmmod slamr
/ # /etc/init.d/slmodem start
 * Waiting for driver initialisation
Jul 25 19:08:01 laptop slamr: SmartLink AMRMO modem.
Jul 25 19:08:01 laptop slamr: probe 8086:2446 ICH card...
Jul 25 19:08:01 laptop ACPI: PCI interrupt 0000:00:1f.6[B] -> GSI 11 (level, low) -> IRQ 11
Jul 25 19:08:01 laptop PCI: Setting latency timer of device 0000:00:1f.6 to 64
Jul 25 19:08:01 laptop slamr: mc97 codec is SIL22
Jul 25 19:08:01 laptop slamr: slamr0 is ICH card.
 * Waiting for driver initialisation
 * Waiting for driver initialisation
 * Waiting for driver initialisation
 * Module - slamr failed to initialise device                                                                                                                       [ !! ]

 * Starting slmodemd for /dev/slamr0...                                                                                                                             [ ok ]
/ # Jul 25 19:08:02 laptop rc-scripts: Module - slamr failed to initialise device 





It is obvious for me that the device initialisation code does not work, but I do not know why. The other thing is I would print out the "starting slmodemd" when the slmodemd is started and not when the script is started. The rmmod slamr does not work, so why include it? Perhabs you know a better solution than just deleting the code that is not working.

------- Comment #10 From Matteo Settenvini 2004-07-25 12:06:37 0000 -------
Created an attachment (id=36139) [details]
Updated init script

You said you're using alsa. Have you tried with the configuration and init
script attached to this bug?

The "modprobe -r" command is non blocking, and just annoying (that "FATAL:
Module slamr is in use."). Anyway, I did a small modification to the script
(plus the unlinking of /dev/modem), so you shouldn't see it anymore.

I tried both with slamr module and alsa mode, and the init script attached here
worked good. If you cannot dial up after, check of being in the dialout group
(or change group in /conf.d/slmodem).

------- Comment #11 From Matteo Settenvini 2004-07-25 13:14:17 0000 -------
Ok, I investigated further: the problem you probably were experiencing laid in
the fact that the script was waiting for the wrong device to set up.

Now I corrected both the scripts, and here they are. I apologize for all this
chaos, but unfortunately I'm still a newbie, and maybe a little too zealant. :(

Notes: I also forgot the group ("dialout") for the daemon running with alsa
support. It is now fixed.

In your /etc/modules.d/alsa, you need also another line more than what stated
in the ebuild (I though it was pretty clear, but if you're in a hurry you could
miss it):
alias sound-slot-1 snd-card-1

Could someone please make it clear also in the ebuild? Else we'll need a
separate template as Daniel said.

------- Comment #12 From Matteo Settenvini 2004-07-25 13:15:49 0000 -------
Created an attachment (id=36144) [details]
Updated (again) init script

------- Comment #13 From Matteo Settenvini 2004-07-25 13:16:33 0000 -------
Created an attachment (id=36145) [details]
Updated configuration file for conf.d

------- Comment #14 From Stefan Schweizer 2004-07-25 13:21:34 0000 -------
Created an attachment (id=36146) [details]
ebegin place, init and unload updated

I wanted to point out, that I cannot use alsa, sorry for the confusion.

Your new script is not better for me in any point. Btw, the error occurs only
if the module is unloaded. But it has an easy fix, the timeout is too short. I
made it bigger( 0.5 secs) and let the unload go to the background so that the
module gets really unloaded.
Restarting is still fast because the module has not time to unload then ;)

------- Comment #15 From Matteo Settenvini 2004-07-25 13:32:34 0000 -------
I updated the script because while slmodemd has to be started with /dev/slamr0
(for example), the link /dev/modem has to be set to /dev/ttySL0, which is
created from slmodemd from a free pts.

If you try to do a test with, let's say, KPPP, probably it won't be able to
open /dev/modem since it points to the wrong device. Hence the two variables :
"MDEV" and "DEV".

------- Comment #16 From Stefan Schweizer 2004-07-26 05:04:14 0000 -------
Created an attachment (id=36190) [details]
init.d/slmodem updated again

Merged our 2 versions it now has improved eyecandy and sleep indication with
dots.
I hope you like it :)

------- Comment #17 From Simon Bühler 2004-07-26 06:56:40 0000 -------
Hey good job guys,
now the modem (intel based, alsa config,2.6.7-gentoo-r11) on my inspiron 8200  works at last!!!
ebuild 2.9.9 plus the init.d/conf.d scripts does the job, unmask it pls cause the other ebuilds are painful!

thx again!

------- Comment #18 From Matteo Settenvini 2004-07-26 08:22:41 0000 -------
(From update of attachment 36144 [details])
Ok, we should really be there! The new script looks good. Thanks Stefan.

Now, the last thing to check is the ebuild...
is it enough "prolix", especially about /etc/modules.d/alsa?

------- Comment #19 From Simon Bühler 2004-07-26 08:53:59 0000 -------
oh well, 

i get the modem device and everything but also a nasty
NO DIALTONE
Error, and no solution after 3hours of try & lots of errors : 

...
Jul 26 17:41:32 d-partment codec_semaphore: semaphore is not ready [0x1][0x300300]
Jul 26 17:41:32 d-partment codec_write 1: semaphore is not ready for register 0x54
...

seems to be some alsa stuff though ...





------- Comment #20 From Matteo Settenvini 2004-07-26 09:52:11 0000 -------
From the alsa intel8x0m update
(http://www.mail-archive.com/alsa-cvslog%40lists.sourceforge.net/msg04267.html):

/* access to some forbidden (non existant) ac97 registers will not
         * reset the semaphore. So even if you don't get the semaphore, still
         * continue the access. We don't need the semaphore anyway. */
        snd_printk("codec_semaphore: semaphore is not ready [0x%x][0x%x]\n",
                        igetbyte(chip, ICHREG(ACC_SEMA)), igetdword(chip, 
ICHREG(GLOB_STA)));

So this is not probably related to the bug. I noticed the NO CARRIER / NO
DIALTONE problem, if you use kppp try to disable "Wait for dial tone before
dialing". Also check if you do ATX3 when initializing the modem. It should go.

However, I had some issues with pppd that exited with status 19 after composing
(unable to authenticate). My ISP said to retry in 24h from the account
activation, though, and I'll give it another try this evening.

------- Comment #21 From Daniel Black 2004-07-26 14:14:24 0000 -------
I think I saw somehting about nodial tone in the wvdial docs. Maybe it doesn't
generate one. Just speculation. Good point about the complexity of
slmodem-alsa. - One script it fine. Was hoping it could use just the ordinary
alsa-sound but I guess not.

Going to wait until I get a bit more concesses on the init scripts - won't be
too long though.

------- Comment #22 From Rouslan Solomakhin 2004-07-27 12:45:50 0000 -------
Created an attachment (id=36278) [details]
A patch to deal with "need alsa-sound" and "modprobe -r ${MODULE}" issues

In the init script /etc/init.d/slmodem, function depend() states "need
alsa-sound". However, the init script for starting ALSA sound is called
/etc/init.d/alsasound, and has a line "provide alsa-modules". Thus, the "need"
line for slmodem init script should be either "need alsasound" (no dash), or
"need alsa-modules".
Failure to remove the module can be solved if we wait a few seconds before
removing the module. Thus, "modprobe -r ${MODULE}" should be changed to
"modprobe -r ${MODULE} || (einfo "Retrying..."; sleep 3; modprobe -r
${MODULE})".
Hope this will is useful. :)

------- Comment #23 From Stefan Schweizer 2004-07-27 14:57:48 0000 -------
Created an attachment (id=36286) [details]
init.d/slmodem patch applied with modifications

Again status indication with dots on unloading but i think the code is a little
bit bloated. For me it always unloads after 0.25secs. Imo we would not need the
loop if you all need only 0.25secs too.

------- Comment #24 From Stefan Schweizer 2004-08-01 13:12:07 0000 -------
As noone complains i think this should be added to portage now, or is anything
still missing, Daniel? I hope there is enough concensus now.

------- Comment #25 From Daniel Black 2004-08-01 19:51:25 0000 -------
Fixed. Thanks Stefan much appreciate it. Any suggestions for src_test?

------- Comment #26 From Daniel Black 2004-08-03 16:51:15 0000 -------
Any comments on bug #59244

------- Comment #27 From Rouslan Solomakhin 2004-08-05 07:51:02 0000 -------
Created an attachment (id=36816) [details]
change "eend 1" in functions to "return 1" + move "eend $status" to the end of
"stop()"

Functions "loadsalsa" and "loadsmodule" should not have "eend 1" statements.
Those	only show "[!!]" and do not stop the execution of code. Instead, those
functions should have "return 1" statements.

Also, the last statement in functions "start()" and "stop()" should be "eend
*", because the script gets the status of last executed command. Right now,
there is an "unlink *" statement at the end of "stop()".
Result: script thinks that it is still on even after the modules are unloaded
and "slmodemd" is stopped.
Fix: move "eend $result" to the end of function "stop()"

------- Comment #28 From Rouslan Solomakhin 2004-08-05 08:38:53 0000 -------
Created an attachment (id=36817) [details]
"echo" fixes and enhancements

The part of the script that draws dots for counter should check whether or not
$RC_NOCOLOR is set to yes. functions.sh sets $NORMAL depending on $RC_NOCOLOR,
but it sets it to "\E[0m" which does not do the desired task (go to the end of
"Starting something..." string). Instead we should do "echo -ne \e[A\e[52G".
"\e[A" goes to the line above. "\e[52G" moves right by 52 characters (52 should
be the number of characters in ebegin statement after which we want to have the
counter + 7).

We do not need "-e" option when outputting ".". "-e" is only needed when we
need to interpret backslash combinations like "\e[A", "\b", or "\n".

"echo -ne '\n'" is the same thing as "echo".

------- Comment #29 From Rouslan Solomakhin 2004-08-05 08:58:55 0000 -------
Created an attachment (id=36823) [details]
"echo" and "eend + return" patches combined into one

If one tries to patch slmodem script with "Attachment 36816 [details]" first and
"Attachment 36817 [details]", `patch` reject some changes. This is the two patches
combined. If you need both patches, apply this one to the original instead.

------- Comment #30 From Stefan Schweizer 2004-08-05 12:04:45 0000 -------
Created an attachment (id=36833) [details]
updated ebuild

Rouslan, but there is no ${result} when you use alsa, I think it would be
better to move the unlink right after the start-stop-daemon. Look in the
attached initscript for details.

Daniel, I saw that you replaced "\e[A\e[43G" with ${NORMAL} but that does not
work and in fact it is not the same as my one moves me above one line and to
the position 43. Is it not allowed to have \e statements in ebuilds?

------- Comment #31 From Daniel Black 2004-08-05 14:01:24 0000 -------
thanks will look at it soon.

------- Comment #32 From Rouslan Solomakhin 2004-08-05 22:01:36 0000 -------
Stefan, you are right about moving the unlink statement.
What is your opinion on the proposed patch from <a href="http://bugs.gentoo.org/attachment.cgi?id=36817&action=view">Attachemnt 36817</a>?

------- Comment #33 From Stefan Schweizer 2004-08-05 22:59:29 0000 -------
Created an attachment (id=36865) [details]
/etc/init.d/slmodem

Rouslan, the first line with \e[A clears all the dots and the second one moves
us to the point where the dots where cleaned, but I clean only so much dots,
that I see 3 dots when I started slmodem, so I leave 2 dots in case of
stopping, because only one is added, and I want to have 3. I added your nocolor
thoughts to the attached initscript, can you please look if it meets your
needs? You can check the output with:
/etc/init.d/slmodem --nocolor restart > file
and the output is in "file" :)

Daniel, I added a line that makes the configuration of MDEV unnecessary:
if [ -z "${MDEV}" ]; then MDEV="/dev/${MODULE}0"; fi
Do you think this way is good, or should we still configure it in the config
file? I think the config file should be as easy as possible. I do not have the
usb-modem, but I think it would be possible to start it on hotplug, and
concentrate on slamr in the initscript. Someone has the usb-device-id of lsusb?

First Last Prev Next    No search results available      Search page      Enter new bug