diff --git a/README.fedora b/README.fedora index d4e3561..5d47f80 100644 --- a/README.fedora +++ b/README.fedora @@ -10,10 +10,15 @@ Content 1. Load the `pkspkr.ko` Kernel Driver Module (required) ------------------------------------------------------- -To have a working PC speaker beep on Fedora >= 12, you must load the -kernel driver module `pcspkr.ko` first. +To have a working PC speaker beep, the kernel driver module +`pcspkr.ko` must be loaded. -You can do this manually as root as follows: +On Fedora >= 32, you need to install the `kernel-modules-extra` +package first which contains the `pcspkr.ko` kernel driver module. + +On Fedora >= 12, you need to explicitly make the kernel load the +driver module `pcspkr.ko`. You can do this manually as root as +follows: [root@host ~]# modprobe pcspkr diff --git a/beep.spec b/beep.spec index 4dd4980..02938d4 100644 --- a/beep.spec +++ b/beep.spec @@ -1,7 +1,7 @@ Summary: Beep the PC speaker any number of ways Name: beep Version: 1.4.7 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ URL: https://github.com/spkr-beep/beep/ @@ -28,6 +28,23 @@ BuildRequires: glibc-kernheaders BuildRequires: systemd BuildRequires: make +# We "recommend" the kernel driver and do not "require" it in order to +# not break cases where beep is installed on systems other than +# bare-metal PC hardware such as containers. +# +# This assumes the people using the "beep" package can deal with a +# "beep" invocation not producing a beep on those other systems. +# +# The alternative would be to "require" the kernel driver which would +# mean that you could not install beep inside a container, even if +# that container is run in a priviledged way with access to the host's +# pcspkr.ko. +# +# While the kernel supports more speaker drivers, the only hardware +# platforms with a speaker driver supported by Fedora use pcspkr.ko +# (PCSPKR_PLATFORM in the kernel config). +Recommends: kmod(pcspkr.ko) + Requires(pre): shadow-utils # /etc/modprobe.d/ @@ -89,6 +106,9 @@ exit 0 %changelog +* Wed Mar 24 2021 Hans Ulrich Niedermann - 1.4.7-5 +- Add "Recommends: kmod(pcspkr.ko)" to install the driver if available (#1942670) + * Tue Jan 26 2021 Fedora Release Engineering - 1.4.7-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/pcspkr-beep.conf b/pcspkr-beep.conf index a9fbe0c..6fd4aee 100644 --- a/pcspkr-beep.conf +++ b/pcspkr-beep.conf @@ -1,3 +1,16 @@ -# Uncomment the following line to have the pcspkr.ko driver -# load automatically on boot +# Uncomment the alias line to have the pcspkr.ko driver load +# automatically on boot. +# +# The pcspkr.ko driver module is shipped in the kernel-modules-extra +# RPM package has probably been installed by default if it is +# possible, but you still might need to install it. +# +# Note that the kernel-modules-extra package and the pcspkr.ko module +# might not be available inside a container, while the hosts's actual +# pcspkr.ko API might or might not be available inside the container. +# +# So inside a container, the "beep" command might or might not produce +# sound depending on things entirely outside of the control of "beep" +# or even the container. +# # alias platform:pcspkr pcspkr