Subject: | |
From: | |
Reply To: | |
Date: | Fri, 29 Jul 2005 16:31:00 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Looks good.
Installs and uninstalls clean and nice, and it looks like the minimal
changes.
Let's put it in.
Troy
Paul A. Rombouts wrote:
> Robert Haines wrote:
>
>> Paul Rombouts wrote:
>>
>>> I just think that a "SL_pc_speaker.noarch.rpm" package would be a
>>> much more user-friendly solution for many users. I think I might even
>>> write one myself if enough people are interested.
>>
>>
>>
>> Me please!
>
>
> OK, I have written a spec file, built a package from it, installed the
> package and tested it.
>
> Instructions for use: take the attached spec file and build an rpm thus:
>
> rpmbuild -bb SL_pc_speaker.spec
>
> You should find a package called SL_pc_speaker-1.0-1.noarch.rpm in your
> RPMS directory (i.e. /usr/src/redhat/RPMS/noarch/ unless you have
> changed the default).
>
> Disclaimer: if your system breaks after you install the package, you get
> to keep the pieces.
>
>
>> Just out of interest, what would be the best way of doing this? Could
>> an rpm be made to add pcspkr into the initial RAM disk? If so,
>> something to do this for the microcode module as well (for i386) would
>> be great...
>
>
> I don't think adding pcspkr to the initial RAM disk would be a good
> idea, and frankly I don't know how to do this. The rpm package I wrote
> contains scripts that modify the rc.sysinit boot script such that the
> pcspkr module gets loaded at an early stage together with a whole lot of
> other kernel modules.
>
>
> ------------------------------------------------------------------------
>
> %define modname pcspkr
> %define sysinitfile /etc/rc.d/rc.sysinit
> #
> Summary: Enables the PC speaker by loading the driver.
> Name: SL_pc_speaker
> Version: 1.0
> Release: 1
> License: GPL
> Group: SL
> Packager: Paul A. Rombouts
> BuildArchitectures: noarch
> requires: initscripts
>
> %description
> This package changes the rc.sysinit boot script so that
> the %{modname} kernel module is loaded at an early stage.
> This will allow the PC speaker to beep again.
>
> %files
> %post
> #
> # This script may not work on modified files.
> #
> if [ -f %{sysinitfile} ] ; then
> sed -e 's:^\([[:blank:]]*audio="\?\)\("\?[[:blank:]]*\)$:\1%{modname}\2:' %{sysinitfile} > %{sysinitfile}.tmp
> chmod --reference=%{sysinitfile} %{sysinitfile}.tmp
> mv -f %{sysinitfile}.tmp %{sysinitfile}
> fi
> modprobe %{modname}
>
> %postun
> if [ "$1" = "0" ] ; then
> if [ -f %{sysinitfile} ] ; then
> sed -e 's:^\([[:blank:]]*audio="\?\)%{modname}\("\?[[:blank:]]*\)$:\1\2:' %{sysinitfile} > %{sysinitfile}.tmp
> chmod --reference=%{sysinitfile} %{sysinitfile}.tmp
> mv -f %{sysinitfile}.tmp %{sysinitfile}
> fi
> fi
>
> %triggerin -- initscripts
> if [ -f %{sysinitfile} ] ; then
> sed -e 's:^\([[:blank:]]*audio="\?\)\("\?[[:blank:]]*\)$:\1%{modname}\2:' %{sysinitfile} > %{sysinitfile}.tmp
> chmod --reference=%{sysinitfile} %{sysinitfile}.tmp
> mv -f %{sysinitfile}.tmp %{sysinitfile}
> fi
>
> %changelog
> * Fri Jul 29 2005 Paul Rombouts <[log in to unmask]>
> - Wrote initial spec file based on examples by Troy Dawson.
>
>
--
__________________________________________________
Troy Dawson [log in to unmask] (630)840-6468
Fermilab ComputingDivision/CSS CSI Group
__________________________________________________
|
|
|