diff --git a/README.fedora b/README.fedora index 5d47f80..276126a 100644 --- a/README.fedora +++ b/README.fedora @@ -70,7 +70,7 @@ You can check which users are members of the `beep` group by running [user@host ~]$ getent group beep beep:x:951:jane,bill - [user@host ~]$ + [user@host ~]$ _ However, any user newly added to the `beep` group must re-login so their processes can pick up the group membership. A user can check @@ -78,7 +78,7 @@ their group membership as follows: [jane@host ~]$ id uid=1000(jane) gid=1000(jane) groups=1000(jane),10(wheel),951(beep) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 - [jane@host ~]$ + [jane@host ~]$ _ To check the permission of the PC speaker device file, run @@ -96,10 +96,42 @@ To check the permission of the PC speaker device file, run mask::rw- other::--- - [user@host ~]$ + [user@host ~]$ _ -3. When and how to avoid using `beep` +3. Set up the audio mixer (required on some hardware) +----------------------------------------------------- + +On some systems with integrated speakers like e.g. laptops from the +IBM/Lenovo Thinkpad series, there is no separate physical speaker for +the PC speaker. + +Instead, the square wave sound generated by the PC speaker goes to the +integrated speakers through a mixer chip, where it is mixed with PCM +sound, CD drive audio, line in, microphone in, and other sources. + +On these systems, you might need to configure the mixer to make the PC +speaker audible through the laptop speakers, e.g. + + * Start alsamixer. + * Find the correct card (switch with the `F6` key). + * Maybe enable loopback. + * Unmute the appropriate PC speaker source (`m` key) and turn up + its volume. + * Weirdly, a microphone volume below 0% apparently can also + silence the PC speaker beeps. + +Some experimentation might be required. + +Of course, these mixer settings must be saved before the next system +reboot so that the reboot can restore the mixer settings. Some systems +save the mixer settings as part of their shutdown procedure, others +may need you to save them explicitly. + +TBD: How does Fedora handle saving alsamixer state across reboots? + + +4. When and how to avoid using `beep` ------------------------------------- An alternative way to get sound output for non-root users works if the @@ -118,7 +150,7 @@ may not be set up to allow use of the sound infrastructure for users other than the user currently logged into the current virtual console. -4. Example Usage of `beep` +5. Example Usage of `beep` -------------------------- An acoustic notification when a long running compile job finishes diff --git a/beep.spec b/beep.spec index 353fe15..84ce491 100644 --- a/beep.spec +++ b/beep.spec @@ -1,9 +1,10 @@ Summary: Beep the PC speaker any number of ways Name: beep -Version: 1.4.7 -Release: 6%{?dist} +Version: 1.4.12 +Release: %autorelease -License: GPLv2+ +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later URL: https://github.com/spkr-beep/beep/ # Upstream github repo: https://github.com/spkr-beep/beep @@ -24,6 +25,8 @@ Source4: pcspkr-beep.conf BuildRequires: gcc BuildRequires: glibc-kernheaders +%{!?el7:BuildRequires: libubsan} + # for the udev macros BuildRequires: systemd BuildRequires: make @@ -58,12 +61,13 @@ BuildRequires: make # Recommends: (kernel-modules-extras if kernel-modules) # Recommends: (kernel-debug-modules-extras if kernel-debug-modules) -Requires(pre): shadow-utils # /etc/modprobe.d/ Requires: kmod + # /etc/udev/rules.d/ and /usr/lib/udev/rules.d/ -Requires: systemd-udev +%{?el7:Requires: systemd} +%{!?el7:Requires: systemd-udev} %description @@ -77,195 +81,76 @@ interesting, but it is really good at the notifying part. %prep %setup -q -install -m 0644 -p %{SOURCE1} README.fedora sed -i 's|^\.\\" \(\.BR .*\)README.Distro\(.*\)|\1README.fedora\2|' beep.1.in && : #" +# Create a sysusers.d config file +cat >beep.sysusers.conf <local.mk</dev/null || groupadd -r beep -exit 0 %files -%doc README.fedora %license %{_pkgdocdir}/COPYING -%doc %{_pkgdocdir}/CHANGELOG -%doc %{_pkgdocdir}/CREDITS -%doc %{_pkgdocdir}/README.md +%doc %{_pkgdocdir}/CREDITS.md +%doc %{_pkgdocdir}/NEWS.md %doc %{_pkgdocdir}/PERMISSIONS.md +%doc %{_pkgdocdir}/README.fedora +%doc %{_pkgdocdir}/README.md %doc %{_pkgdocdir}/contrib/failure-beeps +%doc %{_pkgdocdir}/contrib/morse2beep.pl +%doc %{_pkgdocdir}/contrib/morse2beep.sed %doc %{_pkgdocdir}/contrib/success-beeps -%attr(0755,root,root) %{_bindir}/beep +%{_bindir}/beep %{_mandir}/man1/beep.1* -%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/modprobe.d/beep.conf +%config(noreplace) %{_sysconfdir}/modprobe.d/beep.conf %{_udevrulesdir}/70-pcspkr-beep.rules %{_udevrulesdir}/90-pcspkr-beep.rules +%{_sysusersdir}/beep.conf %changelog -* Thu Mar 25 2021 Hans Ulrich Niedermann - 1.4.7-6 -- Remove any kmod(pcspkr.ko) dependencies as they install the wrong package - -* 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 - -* Mon Jul 27 2020 Fedora Release Engineering - 1.4.7-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jan 28 2020 Fedora Release Engineering - 1.4.7-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Jan 1 2020 Hans Ulrich Niedermann - 1.4.7-1 -- Update to beep-1.4.7 -- Install contrib scripts for both successfully and failing sounding beeps. - -* Fri Dec 20 2019 Hans Ulrich Niedermann - 1.4.6-1 -- Update to beep-1.4.6 -- Use BEEP_LOG_LEVEL environment variable for default log level -- Avoid possible bug related to not using va_copy() with a va_list parameter - -* Wed Jul 24 2019 Fedora Release Engineering - 1.4.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Tue Apr 2 2019 Hans Ulrich Niedermann - 1.4.4-1 -- Update to beep-1.4.4 -- Install default udev rules to /usr/lib/udev/rules.d/ (not /etc/udev/) -- Give the currently locally logged in user PC speaker access out of the box -- Have beep(1) man page mention README.fedora - -* Thu Jan 31 2019 Fedora Release Engineering - 1.4.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jan 18 2019 Hans Ulrich Niedermann - 1.4.3-1 -- Update to beep-1.4.3 - -* Tue Jan 8 2019 Hans Ulrich Niedermann - 1.4.1-1 -- Update to beep-1.4.1 - -* Fri Jan 4 2019 Hans Ulrich Niedermann - 1.4.0-1 -- Update to beep-1.4.0 - -* Sat Dec 29 2018 Hans Ulrich Niedermann - 1.3-26 -- Stop shipping old sudo related config files -- Refuse to run when run via sudo -- Set up group 'beep' for write access to evdev device with new udev rule -- Update README.fedora to reflect new group permission setup on evdev device - -* Fri Dec 28 2018 Hans Ulrich Niedermann - 1.3-25 -- guard against directory traversal in /dev/input/ check -- refuse to run if setuid or setgid root -- make the evdev device the first device to look for (does not require root) - -* Fri Dec 28 2018 Hans Ulrich Niedermann - 1.3-24 -- Actually apply the patches -- Update COPYING with new FSF address -- Fix Patch9 to work as non-git patch (do the rest with shell) -- Proper naming of Patch14 -- Exit beep when error accessing API - -* Fri Dec 28 2018 Hans Ulrich Niedermann - 1.3-23 -- Fix CVE-2018-1000532 and mitigate against related issues (#1595592) -- Fix a number of potential integer overflows - -* Thu Jul 12 2018 Fedora Release Engineering - 1.3-22 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Apr 3 2018 Hans Ulrich Niedermann - 1.3-21 -- Add CVE-2018-0492 fix. -- Behaviour of multiple -f parameters matches documentation now. - -* Wed Feb 07 2018 Fedora Release Engineering - 1.3-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Aug 02 2017 Fedora Release Engineering - 1.3-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Wed Jul 26 2017 Fedora Release Engineering - 1.3-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 1.3-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue May 31 2016 Hans Ulrich Niedermann - 1.3-16 -- Use more appropriate sox play example in README.fedora -- Make command line examples more readable in README.fedora - -* Tue May 31 2016 Hans Ulrich Niedermann - 1.3-15 -- Add shell aliases to allow non-root users to run beep from the shell -- Fix mail address in %%changelog - -* Tue May 31 2016 Hans Ulrich Niedermann - 1.3-14 -- Document how non-root users can run beep via sudo (#1133231) -- Remove spec file conditional required in Fedora 12 times - -* Mon May 16 2016 Hans Ulrich Niedermann - 1.3-13 -- Remove useless %%defattr for clarity - -* Wed Feb 03 2016 Fedora Release Engineering - 1.3-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Sun Jan 17 2016 Hans Ulrich Niedermann - 1.3-11 -- Do not replace config file modprobe.d/beep.conf (#1087616) - -* Wed Jun 17 2015 Fedora Release Engineering - 1.3-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Fri Aug 15 2014 Fedora Release Engineering - 1.3-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sat Jun 07 2014 Fedora Release Engineering - 1.3-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue Nov 19 2013 Hans Ulrich Niedermann - 1.3-7 -- Use new upstream tarball beep-1.3.tar.gz (yes, it has changed!) -- Add a few fixes from upstream git repo -- Move our Makefile cleanup to upstream pull request - -* Sat Aug 03 2013 Fedora Release Engineering - 1.3-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Wed Feb 13 2013 Fedora Release Engineering - 1.3-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Wed Jul 18 2012 Fedora Release Engineering - 1.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Thu Jan 12 2012 Fedora Release Engineering - 1.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Feb 07 2011 Fedora Release Engineering - 1.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Fri Jul 16 2010 Hans Ulrich Niedermann - 1.3-1 -- Update to upstream release beep-1.3 - -* Fri Jan 22 2010 Hans Ulrich Niedermann - 1.2.2-6 -- Ship modprobe config file with alias for pcspkr on F12 and later - -* Fri Jul 24 2009 Fedora Release Engineering - 1.2.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Mon Feb 23 2009 Fedora Release Engineering - 1.2.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Sun Sep 7 2008 Hans Ulrich Niedermann - 1.2.2-3 -- Initial package for submission to Fedora +%autochangelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..e448e07 --- /dev/null +++ b/changelog @@ -0,0 +1,176 @@ +* Wed Jul 20 2022 Fedora Release Engineering - 1.4.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jan 28 2022 Hans Ulrich Niedermann - 1.4.12-1 +- Update to beep-1.4.12 with simplified makefile + +* Thu Jan 27 2022 Hans Ulrich Niedermann - 1.4.11-4 +- fix broken rpm build from 1.4.11-3 (missing COMPILERS= in %%install) + +* Thu Jan 27 2022 Hans Ulrich Niedermann - 1.4.11-3 +- only use %%doc with absolute paths (removes duplicate listings) +- stop using env vars in favour of rpm macros +- remove non-functional explicit %%attr + +* Wed Jan 19 2022 Hans Ulrich Niedermann - 1.4.11-2 +- rebuild to have common sources for all branches + +* Sat Jan 15 2022 Hans Ulrich Niedermann - 1.4.11-1 +- Update to beep-1.4.11 + +* Sat Jan 15 2022 Hans Ulrich Niedermann - 1.4.10-1 +- Update to beep-1.4.10 + +* Wed Jul 21 2021 Fedora Release Engineering - 1.4.7-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Mar 25 2021 Hans Ulrich Niedermann - 1.4.7-6 +- Remove any kmod(pcspkr.ko) dependencies as they install the wrong package + +* 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 + +* Mon Jul 27 2020 Fedora Release Engineering - 1.4.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jan 28 2020 Fedora Release Engineering - 1.4.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jan 1 2020 Hans Ulrich Niedermann - 1.4.7-1 +- Update to beep-1.4.7 +- Install contrib scripts for both successfully and failing sounding beeps. + +* Fri Dec 20 2019 Hans Ulrich Niedermann - 1.4.6-1 +- Update to beep-1.4.6 +- Use BEEP_LOG_LEVEL environment variable for default log level +- Avoid possible bug related to not using va_copy() with a va_list parameter + +* Wed Jul 24 2019 Fedora Release Engineering - 1.4.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Apr 2 2019 Hans Ulrich Niedermann - 1.4.4-1 +- Update to beep-1.4.4 +- Install default udev rules to /usr/lib/udev/rules.d/ (not /etc/udev/) +- Give the currently locally logged in user PC speaker access out of the box +- Have beep(1) man page mention README.fedora + +* Thu Jan 31 2019 Fedora Release Engineering - 1.4.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jan 18 2019 Hans Ulrich Niedermann - 1.4.3-1 +- Update to beep-1.4.3 + +* Tue Jan 8 2019 Hans Ulrich Niedermann - 1.4.1-1 +- Update to beep-1.4.1 + +* Fri Jan 4 2019 Hans Ulrich Niedermann - 1.4.0-1 +- Update to beep-1.4.0 + +* Sat Dec 29 2018 Hans Ulrich Niedermann - 1.3-26 +- Stop shipping old sudo related config files +- Refuse to run when run via sudo +- Set up group 'beep' for write access to evdev device with new udev rule +- Update README.fedora to reflect new group permission setup on evdev device + +* Fri Dec 28 2018 Hans Ulrich Niedermann - 1.3-25 +- guard against directory traversal in /dev/input/ check +- refuse to run if setuid or setgid root +- make the evdev device the first device to look for (does not require root) + +* Fri Dec 28 2018 Hans Ulrich Niedermann - 1.3-24 +- Actually apply the patches +- Update COPYING with new FSF address +- Fix Patch9 to work as non-git patch (do the rest with shell) +- Proper naming of Patch14 +- Exit beep when error accessing API + +* Fri Dec 28 2018 Hans Ulrich Niedermann - 1.3-23 +- Fix CVE-2018-1000532 and mitigate against related issues (#1595592) +- Fix a number of potential integer overflows + +* Thu Jul 12 2018 Fedora Release Engineering - 1.3-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Apr 3 2018 Hans Ulrich Niedermann - 1.3-21 +- Add CVE-2018-0492 fix. +- Behaviour of multiple -f parameters matches documentation now. + +* Wed Feb 07 2018 Fedora Release Engineering - 1.3-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 1.3-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.3-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 1.3-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue May 31 2016 Hans Ulrich Niedermann - 1.3-16 +- Use more appropriate sox play example in README.fedora +- Make command line examples more readable in README.fedora + +* Tue May 31 2016 Hans Ulrich Niedermann - 1.3-15 +- Add shell aliases to allow non-root users to run beep from the shell +- Fix mail address in %%changelog + +* Tue May 31 2016 Hans Ulrich Niedermann - 1.3-14 +- Document how non-root users can run beep via sudo (#1133231) +- Remove spec file conditional required in Fedora 12 times + +* Mon May 16 2016 Hans Ulrich Niedermann - 1.3-13 +- Remove useless %%defattr for clarity + +* Wed Feb 03 2016 Fedora Release Engineering - 1.3-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sun Jan 17 2016 Hans Ulrich Niedermann - 1.3-11 +- Do not replace config file modprobe.d/beep.conf (#1087616) + +* Wed Jun 17 2015 Fedora Release Engineering - 1.3-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Aug 15 2014 Fedora Release Engineering - 1.3-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Nov 19 2013 Hans Ulrich Niedermann - 1.3-7 +- Use new upstream tarball beep-1.3.tar.gz (yes, it has changed!) +- Add a few fixes from upstream git repo +- Move our Makefile cleanup to upstream pull request + +* Sat Aug 03 2013 Fedora Release Engineering - 1.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Feb 13 2013 Fedora Release Engineering - 1.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 1.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jan 12 2012 Fedora Release Engineering - 1.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Feb 07 2011 Fedora Release Engineering - 1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Jul 16 2010 Hans Ulrich Niedermann - 1.3-1 +- Update to upstream release beep-1.3 + +* Fri Jan 22 2010 Hans Ulrich Niedermann - 1.2.2-6 +- Ship modprobe config file with alias for pcspkr on F12 and later + +* Fri Jul 24 2009 Fedora Release Engineering - 1.2.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Feb 23 2009 Fedora Release Engineering - 1.2.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sun Sep 7 2008 Hans Ulrich Niedermann - 1.2.2-3 +- Initial package for submission to Fedora diff --git a/package.cfg b/package.cfg deleted file mode 100644 index 6b189b9..0000000 --- a/package.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[koji] -targets = master fedora diff --git a/sources b/sources index 886e63a..7052993 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (beep-1.4.7.tar.gz) = a1482a16f971c56dc6a62047fa449c96519c897d2e8cb18dcc06178564943c1eb3b9d9106ca6b76054e0fa109e3b161fb8e9ec1966a02d0d739222b5434b71c7 +SHA512 (beep-1.4.12.tar.gz) = 18fed77bc4820ecc84ac12e903d516d5228fa2038df1788cc68db76e40b3c47a271911cc45bc48ce94e3f215803c5c05cb6c08ebb47ae6d7fcf1e0bc1ac169cd