Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 353227 - media-sound/alsa-utils-1.0.23-r1: /etc/init.d/alsasound doesn't work with <module>.ko.gz
Summary: media-sound/alsa-utils-1.0.23-r1: /etc/init.d/alsasound doesn't work with <mo...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo ALSA team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-30 13:08 UTC by Victor Tseng
Modified: 2012-02-03 13:15 UTC (History)
0 users

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


Attachments
etc_init.d_alsasound_ko_gz.patch (etc_init.d_alsasound_ko_gz.patch,1.03 KB, patch)
2011-01-30 13:10 UTC, Victor Tseng
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Tseng 2011-01-30 13:08:25 UTC
I have my /lib/modules/*.ko gzipped to save disk space, ie.
# find /lib/modules -type f -name \*.ko | xargs gzip -9

but alsasound init script fails to work with .ko.gz files:

=== cut here ===
 * Loading ALSA modules
 *   Loading: snd-mixer-oss.gz ...
FATAL: Module snd_mixer_oss.gz not found. [ !! ]
 *   Loading: snd-pcm-oss.gz ...
FATAL: Module snd_pcm_oss.gz not found. [ !! ]
 *   Loading: snd-seq-oss.gz ...
FATAL: Module snd_seq_oss.gz not found. [ !! ]
 *   Loading: snd-seq.gz ...
FATAL: Module snd_seq.gz not found. [ !! ]
=== cut here ===

I think the "module lookup" lines should be changed like this:
- DRIVERS="${DRIVERS} $(modprobe -l | sed -n -e '/snd.*oss/ s:.*\/\([[:alnum:]_-]\+\).ko:\1:p')"
+ DRIVERS="${DRIVERS} $(modprobe -l | sed -n -e '/snd.*oss/ s:.*\/\([[:alnum:]_-]\+\)\.ko.*:\1:p')"

first, "." just means every character instead of the single character ".", so it should be "\.ko" instead of ".ko".
And add '.*' at the end, so "\.ko.*" should match ".ko*"

Reproducible: Always

Steps to Reproduce:
1. run `/etc/init.d/alsasound start`
Actual Results:  
 * Loading ALSA modules
 *   Loading: snd-mixer-oss.gz ...
FATAL: Module snd_mixer_oss.gz not found. [ !! ]
 *   Loading: snd-pcm-oss.gz ...
FATAL: Module snd_pcm_oss.gz not found. [ !! ]
 *   Loading: snd-seq-oss.gz ...
FATAL: Module snd_seq_oss.gz not found. [ !! ]
 *   Loading: snd-seq.gz ...
FATAL: Module snd_seq.gz not found. [ !! ]

Expected Results:  
* Loading ALSA modules ...
*   Loading: snd-mixer-oss ... [ ok ]
*   Loading: snd-pcm-oss ... [ ok ]
*   Loading: snd-seq-oss ... [ ok ]
* Restoring Mixer Levels ... [ ok ]

patch included.
Comment 1 Victor Tseng 2011-01-30 13:10:06 UTC
Created attachment 261091 [details, diff]
etc_init.d_alsasound_ko_gz.patch

let .ko.gz works
Comment 2 Tony Vroon (RETIRED) gentoo-dev 2012-02-03 13:15:17 UTC
The use of modules for ALSA has not been recommended practice for a long time now. Please build ALSA drivers into your kernel.
The code for module loading/unloading will be removed soon.