- Fix alsactl restore error (bsc#1233353):
0001-alsactl-90-alsa-restore.rules-fix-alsa_restore_go-st.patch OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=222
This commit is contained in:
commit
e79ab10154
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
@ -0,0 +1,40 @@
|
||||
From f90124c73edd050b24961197a4abcf17e53b41a8 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Thu, 14 Nov 2024 09:38:49 +0100
|
||||
Subject: [PATCH] alsactl: 90-alsa-restore.rules - fix alsa_restore_go/std
|
||||
|
||||
Fix the label mismatch which was introduced in the transition from the
|
||||
temporary test rules.
|
||||
|
||||
Closes: https://github.com/alsa-project/alsa-utils/issues/280
|
||||
Fixes: 8116639 ("alsactl: 90-alsa-restore.rules - add support for AMD ACP digital microphone")
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
alsactl/90-alsa-restore.rules.in | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/alsactl/90-alsa-restore.rules.in b/alsactl/90-alsa-restore.rules.in
|
||||
index 85f0b15f4856..dae2ed8ccc8f 100644
|
||||
--- a/alsactl/90-alsa-restore.rules.in
|
||||
+++ b/alsactl/90-alsa-restore.rules.in
|
||||
@@ -3,6 +3,8 @@
|
||||
ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*",@extratest@ GOTO="alsa_restore_go"
|
||||
GOTO="alsa_restore_end"
|
||||
|
||||
+LABEL="alsa_restore_go"
|
||||
+
|
||||
ENV{ALSA_CARD_NUMBER}="$attr{device/number}"
|
||||
|
||||
# mark HDA analog card; HDMI/DP card does not have capture devices
|
||||
@@ -21,7 +23,7 @@ TEST!="/run/udev/alsa-hda-analog-card", GOTO="alsa_restore_std"
|
||||
IMPORT{program}="/usr/bin/cat /run/udev/alsa-hda-analog-card"
|
||||
ENV{ALSA_CARD_HDA_ANALOG}!="", ENV{ALSA_CARD_NUMBER}="$env{ALSA_CARD_HDA_ANALOG}"
|
||||
|
||||
-LABEL="alsa_restore_go"
|
||||
+LABEL="alsa_restore_std"
|
||||
TEST!="@daemonswitch@", RUN+="@sbindir@/alsactl@args@ restore $env{ALSA_CARD_NUMBER}"
|
||||
TEST=="@daemonswitch@", RUN+="@sbindir@/alsactl@args@ nrestore $env{ALSA_CARD_NUMBER}"
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
17
01beep.conf
Normal file
17
01beep.conf
Normal file
@ -0,0 +1,17 @@
|
||||
CTL{reset}="mixer"
|
||||
CTL{name}="PC Speaker Playback Volume",CTL{do_search}=="1", \
|
||||
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="0"
|
||||
CTL{name}="PC Speaker Playback Switch",CTL{do_search}=="1", \
|
||||
CTL{values}="off"
|
||||
|
||||
CTL{reset}="mixer"
|
||||
CTL{name}="PC Beep Playback Volume",CTL{do_search}=="1", \
|
||||
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="0"
|
||||
CTL{name}="PC Beep Playback Switch",CTL{do_search}=="1", \
|
||||
CTL{values}="off"
|
||||
|
||||
CTL{reset}="mixer"
|
||||
CTL{name}="Beep Playback Volume",CTL{do_search}=="1", \
|
||||
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="0"
|
||||
CTL{name}="Beep Playback Switch",CTL{do_search}=="1", \
|
||||
CTL{values}="off"
|
24
alsa-info-no-update-for-distro-script.patch
Normal file
24
alsa-info-no-update-for-distro-script.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Subject: alsa-info: Suppress the automatic update
|
||||
Patch-mainline: Never, distro specific
|
||||
References: bsc#1185280
|
||||
|
||||
We don't want to modify the script distributed in the standard package.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
|
||||
---
|
||||
--- a/alsa-info/alsa-info.sh
|
||||
+++ b/alsa-info/alsa-info.sh
|
||||
@@ -720,11 +720,6 @@ if [ -s "$TEMPDIR/alsa-usbmixer.tmp" ]; then
|
||||
echo "" >> $FILE
|
||||
fi
|
||||
|
||||
-#If no command line options are specified, then run as though --with-all was specified
|
||||
-if [ -z "$1" ]; then
|
||||
- update
|
||||
-fi
|
||||
-
|
||||
fi # proceed
|
||||
|
||||
#loop through command line arguments, until none are left.
|
BIN
alsa-utils-1.2.12.tar.bz2
(Stored with Git LFS)
Normal file
BIN
alsa-utils-1.2.12.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
16
alsa-utils-1.2.12.tar.bz2.sig
Normal file
16
alsa-utils-1.2.12.tar.bz2.sig
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEE8E31BzesGohMSz1xg4BZbablnJEFAmZm7lQACgkQg4BZbabl
|
||||
nJEAsw//QOz2zlAN71eWmBc9y2YxLALkoWm91zpDCBrxt41ij8nuaSXVRwlOyho9
|
||||
jTgK+GF791IGd1s7pYYgAW0nyJf8ntK9AxsWRjQR8KgvR5kigHi7vuW3HApPJTnc
|
||||
kgwvXsw3ORIgsoooJHbNN3M0BpMrRs7/ncvZUBhO+GUMrIvvURaZkprDpRkB1ark
|
||||
GP1ZyMa7qq4tvBuSffbtfxaeEdbknrbKxSmLpjP6Klqb2aWrWJb4sB2HqyKfmZFp
|
||||
mIQgkWRXNzMwHDKgPLQ+A75k1lS2B3AlnkszUB/mnS7zHAFbdlF65e0otUHk2xlc
|
||||
vIATAg5wrXfcHDZhLzJa0PumVvAUEXkmGf9kknyI3HvPEP3DYa3icgmYvc7EMGfA
|
||||
Qowz4HypLToTVQZRZPla15MDchwV6EvoCC/URppuG/4IkLY0FEZV7cSfcEo/ridV
|
||||
FdExH4furlYlx1tmGQYGelFHreDjjxcqjFrLD+C6Q7Q1x2eKsSReAvYH1QLJE8Cb
|
||||
3uxdFhbKjfF1cIBdFxzhtpjAMygKDUSPiYrLgGJHLnXc3gJ0G/9RbxvSpAjqJUwv
|
||||
KYPa/rk4tW71q+865l8ZhFQQCLCBcmmCSKNKC0mfKsapUaMUtKvDP912+oA/p9MS
|
||||
L0BB4XeWQiCTsLMcqngIGL2gFOmq/6roTaw1Ix70TedWeMEmIZg=
|
||||
=Kre1
|
||||
-----END PGP SIGNATURE-----
|
BIN
alsa-utils-1.2.13.tar.bz2
(Stored with Git LFS)
Normal file
BIN
alsa-utils-1.2.13.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
16
alsa-utils-1.2.13.tar.bz2.sig
Normal file
16
alsa-utils-1.2.13.tar.bz2.sig
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEE8E31BzesGohMSz1xg4BZbablnJEFAmczJNYACgkQg4BZbabl
|
||||
nJGHBQ//Ry1jfd8heASAU3cqB/MP8pHImI9s2vGelRw9RFBnDUNTkJlEbtIOLe+x
|
||||
Z5uzVDkPiiy/tmX7fOsS5r1rFRI5vXNFCCsER547JrN+NVb1z53qiZROc/xUrXGg
|
||||
blEl3Q7dxqMQXa8lCypGWAr7Fr0I0p83+B6epbdiLSNb5bNLBTdEoA+JC+vsTG6u
|
||||
ND0/5OjUZdF/aw85DEgAolAWI5F4ubz46B/u5tTRWbHhXp5Zk5Vk5Iphw01cloAD
|
||||
NtDCQJ3LF9SNxJMneu53fBTNrJY1O2wPI2jI60DgrHOdn6a/Yy7YElek7n+dwqUh
|
||||
ANRE6hLJiEtQ/Ffrrbgo7dlTigg8C5A5kcOVNl7NY4DEagZM5BTxSYohPsjNxI18
|
||||
+p5dOW7qewqVBYIimMOn0ti6aE1Yo8MPxQyFlYUF83yzUY0+NIiJ7AAqdCndRg8E
|
||||
tKQepZtB/r6hSHmuvQwzfqFyDUx/uaTfu7VtXz9mCQzMj82WBVrOjr1g4XmeukuG
|
||||
dl7RhLfXUyy+GgMyfWYUtNg13uR1yYfcsC150bY8NZqSm0T5nfpj2cCEpA/vdzbx
|
||||
plTcQdrrfAXZuHuj1HvjNbO6VdeSjZo0K2P+j1wvnmpMHy84wimmwY9OT3r440ni
|
||||
nTKTcdLa0Dc7/XqJQ/2eabuULdMdv4U4cqFJ01QXz2PkeB/jUQ4=
|
||||
=x7Lc
|
||||
-----END PGP SIGNATURE-----
|
13
alsa-utils-configure-version-revert.patch
Normal file
13
alsa-utils-configure-version-revert.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 3c11f3554021..b411ce866794 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -8,7 +8,7 @@ AM_INIT_AUTOMAKE
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
|
||||
AM_GNU_GETTEXT([external])
|
||||
-AM_GNU_GETTEXT_VERSION([0.19.8])
|
||||
+AM_GNU_GETTEXT_VERSION([0.15])
|
||||
|
||||
dnl Checks for programs.
|
||||
|
1557
alsa-utils.changes
Normal file
1557
alsa-utils.changes
Normal file
File diff suppressed because it is too large
Load Diff
29
alsa-utils.keyring
Normal file
29
alsa-utils.keyring
Normal file
@ -0,0 +1,29 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBF+PBUIBEACQ0eLhY6zJkZCztI3Zj7GiEkGyDYXFr10wMn2BmAxXEOhvGs5C
|
||||
XtZYokNnYnojU2ehb14pdQiIYVm7YwjNjPhFmc6DnSJ74tlDtzI0ZfZYgU8B3/AU
|
||||
hHCIe7NeH+uqaS4hQ4gQF3HB19GNQ21keQPtm/cZzNvkAwWQ6wxiIas/odQGt6sg
|
||||
TULub4gXQw42iCW0jNeliNgeOc/4/2qtznN+Ss5G+Hs+EBh0kFCG4+5RcpgtKmYO
|
||||
LEy+8qI/UmlgOeT+47eTXm4LjxHfRuKcbvSExfICUB5XLD2ZmeZbFyP48jkDvB7w
|
||||
A4jNfImtlRfTvoviNlOl08Pk3aJoPR8IZIGw+EQCf3ChXTziadqOg37SAy4yGJ14
|
||||
BjirKgBNO4zB+lkLOAknsVKJOKRt3w54MevCuj0GGbfSyErZAeHvliXrfBa1ACLu
|
||||
c2ynRDR/5j0FA3vPzRsHyOGFC4F34W5BhkXCuJBG2o2VDv/zANzjg/hw+0IbmH3G
|
||||
kYn73EDIaz5giKJolE32WaWkz39DwuuoUaLLyfxyiN+c0p2/XQFCrOSqHNUMfI5z
|
||||
Ll62nL1XruF6u9ApLKRv/uDJN7tLgds83rteYJP7/5/JSYCPB8PcUkmhB8OoVdpr
|
||||
tYI8C/6Y6KREm3Jk4AdkySIFnPXZQCkiOR2qOmAuaQPeesjsrSkUtJYZcwARAQAB
|
||||
tEVBTFNBIFJlbGVhc2UgVGVhbSAoUGFja2FnZSBTaWduaW5nIEtleSB2MSkgPHJl
|
||||
bGVhc2VAYWxzYS1wcm9qZWN0Lm9yZz6JAk4EEwEIADgWIQTwTfUHN6waiExLPXGD
|
||||
gFltpuWckQUCX48FQgIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRCDgFlt
|
||||
puWckRhVD/45DNoD79lHBJEu0Wv93OSlPZDUKR+BnkkdEDgDEhTvk+Bin/EWdb3g
|
||||
Unc+rEczgAqjqblLH7ndBtFZPNGiQ2nu8eAdN0TrOFQx7bFg4Do7KXNUUqdPUETC
|
||||
AgkozF3ucsgOcBbv6LwwDfdQDFjkg7CuNGy8CRcLSO5dLK7domq3RxF5mKl1dkOv
|
||||
4brfw6ssn+pja/jkgM9BKt80ycIDiJtVRuXMBJD19ZB8EzQO9OQBdAPERSG8BwLX
|
||||
LemTLAZqNd0mixVbn50qCQil64UOkOd5DHVBBokxgtlJEcDujqWaCUYSygSiP2ke
|
||||
44ArDr7hRwG5KhhbFOigXo3nBYnKyiuWs0jpnrTQD9+uTxcetyBpJ6BW/i/Fy2a9
|
||||
NBFNhbDI07rCMXM25cLP8qbI5i6nTSDlkpLP40At9yUVYt8gIO6ZpGpO04/lAhT1
|
||||
NxtbZkKMo1nphMHU/MDSusoHyLxUXpppdbXTdMgsuFrXae3gcFDowQbLZqb6ZAJ5
|
||||
opX4sDBIdoHDBsI6wCGTV7AAWB8RXWW0RTYMkyIxqixiiB2N2jaau4yHfqv9QWOY
|
||||
oPcx6ySKqGN0HV50PeRis5eeq7kHIdRrVIOBd0tPIqCKIvyJZk1QXReKvvE84Km2
|
||||
dYPusBlhhF7/4WVovlE6HFwyLSOyb32m4qf5dV35op07ew8i4DHpkQ==
|
||||
=n4lM
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
193
alsa-utils.spec
Normal file
193
alsa-utils.spec
Normal file
@ -0,0 +1,193 @@
|
||||
#
|
||||
# spec file for package alsa-utils
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define build_from_git 0
|
||||
%define do_autoreconf 0
|
||||
%define _udevdir %(pkg-config --variable=udevdir udev)
|
||||
%ifarch %ix86 x86_64 %arm aarch64 ppc64le riscv64
|
||||
%define enable_topology 1
|
||||
%else
|
||||
%define enable_topology 0
|
||||
%endif
|
||||
|
||||
Name: alsa-utils
|
||||
Version: 1.2.13
|
||||
Release: 0
|
||||
Summary: Advanced Linux Sound Architecture Utilities
|
||||
License: GPL-2.0-or-later
|
||||
Group: Productivity/Multimedia/Sound/Players
|
||||
URL: http://www.alsa-project.org/
|
||||
%if 0%{?build_from_git}
|
||||
Source: https://www.alsa-project.org/files/pub/utils/alsa-utils-%{version}.tar.bz2
|
||||
Source1: https://www.alsa-project.org/files/pub/utils/alsa-utils-%{version}.tar.bz2.sig
|
||||
%else
|
||||
Source: alsa-utils-%{version}.tar.bz2
|
||||
%endif
|
||||
Source2: 01beep.conf
|
||||
Source3: sound-extra.service
|
||||
Source5: load-sound-modules.sh
|
||||
# from https://www.alsa-project.org/files/pub/gpg-release-key-v1.txt
|
||||
Source6: alsa-utils.keyring
|
||||
# upstream fixes
|
||||
Patch1: 0001-alsactl-90-alsa-restore.rules-fix-alsa_restore_go-st.patch
|
||||
# downstream fixes
|
||||
Patch100: alsa-info-no-update-for-distro-script.patch
|
||||
Patch101: alsa-utils-configure-version-revert.patch
|
||||
BuildRequires: alsa-devel
|
||||
%if %enable_topology
|
||||
BuildRequires: alsa-topology-devel
|
||||
%endif
|
||||
BuildRequires: fftw3-devel
|
||||
BuildRequires: libsamplerate-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pkgconfig
|
||||
%if 0%{?suse_version} < 1500
|
||||
BuildRequires: python-docutils
|
||||
%else
|
||||
BuildRequires: python3-docutils
|
||||
%endif
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
BuildRequires: pkgconfig(udev)
|
||||
%if 0%{?do_autoreconf} || 0%{?build_from_git}
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
%endif
|
||||
Requires: alsa
|
||||
# for alsa-info.sh
|
||||
Requires: dialog
|
||||
Requires: pciutils
|
||||
Requires: tree
|
||||
|
||||
%description
|
||||
This package contains utility programs supporting ALSA, Advanced Linux
|
||||
Sound Architecture.
|
||||
|
||||
%package -n alsabat
|
||||
Summary: Command-line sound tester for ALSA sound card driver
|
||||
Group: Productivity/Multimedia/Sound/Utilities
|
||||
Requires: alsa-utils = %{version}
|
||||
|
||||
%description -n alsabat
|
||||
BAT (Basic Audio Tester) is a simple command-line utility intended
|
||||
to help automate audio driver and sound server testing with little human
|
||||
interaction. BAT can be used to test audio quality, stress test features
|
||||
and test audio before and after PM state changes.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -P 1 -p1
|
||||
%patch -P 100 -p1
|
||||
%if 0%{?do_autoreconf} || 0%{?build_from_git}
|
||||
%patch -P 101 -p1
|
||||
# fix stupid automake's automatic action
|
||||
sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/' Makefile.am
|
||||
%endif
|
||||
|
||||
%build
|
||||
export AUTOMAKE_JOBS="%{?_smp_mflags}"
|
||||
%if 0%{?build_from_git}
|
||||
export GITCOMPILE_NO_MAKE=1
|
||||
./gitcompile --with-curses=ncursesw \
|
||||
--with-systemdsystemunitdir=%{_unitdir} \
|
||||
--with-udev-rules-dir=%{_udevdir}/rules.d \
|
||||
--with-alsactl-lock-dir=/run/lock
|
||||
%else
|
||||
%if 0%{?do_autoreconf}
|
||||
gettextize -c -f --no-changelog
|
||||
autoreconf -fi
|
||||
%endif
|
||||
%configure --with-curses=ncursesw \
|
||||
--with-systemdsystemunitdir=%{_unitdir} \
|
||||
--with-udev-rules-dir=%{_udevdir}/rules.d \
|
||||
--with-alsactl-lock-dir=/run/lock
|
||||
%endif
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%make_install
|
||||
mkdir -p %{buildroot}%{_datadir}/alsa/init/preinit
|
||||
mkdir -p %{buildroot}%{_datadir}/alsa/init/postinit
|
||||
%if %enable_topology
|
||||
rm -f %{_libdir}/alsa-topology/*.la
|
||||
%endif
|
||||
for i in %{_sourcedir}/[0-9]*.conf; do
|
||||
install -c -m 0644 $i %{buildroot}%{_datadir}/alsa/init/postinit
|
||||
done
|
||||
# remove obsoleted alsaconf script
|
||||
rm -f %{buildroot}%{_sbindir}/alsaconf
|
||||
rm -f %{buildroot}%{_datadir}/locale/*/*/alsaconf.mo
|
||||
rm -f %{buildroot}%{_mandir}/*/man*/alsaconf.*
|
||||
rm -f %{buildroot}%{_mandir}/man*/alsaconf.*
|
||||
rmdir --ignore-fail-on-non-empty -p %{buildroot}%{_mandir}/*/man* %{buildroot}%{_mandir}/man*
|
||||
%find_lang %{name} --all-name
|
||||
ln -s alsa-restore.service %{buildroot}%{_unitdir}/alsasound.service
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/alsa
|
||||
# systemd unit files
|
||||
install -c -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}
|
||||
ln -s ../sound-extra.service %{buildroot}%{_unitdir}/sound.target.wants
|
||||
mkdir -p %{buildroot}%{_prefix}/lib/systemd/scripts
|
||||
install -c -m 0755 %{SOURCE5} %{buildroot}%{_prefix}/lib/systemd/scripts
|
||||
|
||||
%pre
|
||||
%service_add_pre sound-extra.service
|
||||
|
||||
%post
|
||||
%service_add_post sound-extra.service
|
||||
# migrate the old asound.state
|
||||
if [ ! -f %{_localstatedir}/lib/alsa/asound.state ]; then
|
||||
test -f /etc/asound.state && \
|
||||
cp -a /etc/asound.state %{_localstatedir}/lib/alsa/asound.state
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%preun
|
||||
%service_del_preun sound-extra.service
|
||||
|
||||
%postun
|
||||
%service_del_postun sound-extra.service
|
||||
|
||||
%files -f %{name}.lang
|
||||
%license COPYING
|
||||
%doc README.md
|
||||
%doc seq/aconnect/README*
|
||||
%doc seq/aseqnet/README*
|
||||
%{_mandir}/man*/*
|
||||
%{_bindir}/*
|
||||
%{_sbindir}/*
|
||||
%exclude %{_bindir}/alsabat
|
||||
%exclude %{_sbindir}/alsabat-test.sh
|
||||
%if %enable_topology
|
||||
%{_libdir}/alsa-topology
|
||||
%endif
|
||||
%exclude %{_mandir}/man*/alsabat.*
|
||||
%{_datadir}/sounds/alsa
|
||||
%{_datadir}/alsa
|
||||
%{_udevdir}
|
||||
%{_unitdir}/*.service
|
||||
%{_unitdir}/sound.target.wants
|
||||
%{_prefix}/lib/systemd/scripts
|
||||
%{_localstatedir}/lib/alsa
|
||||
|
||||
%files -n alsabat
|
||||
%license COPYING
|
||||
%{_bindir}/alsabat
|
||||
%{_sbindir}/alsabat-test.sh
|
||||
%{_mandir}/man*/alsabat.*
|
||||
|
||||
%changelog
|
29
load-sound-modules.sh
Normal file
29
load-sound-modules.sh
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
test -r /etc/sysconfig/sound && . /etc/sysconfig/sound
|
||||
|
||||
if [ "$LOAD_OSS_EMUL_MODULES" = "yes" ]; then
|
||||
/sbin/modprobe -q snd-mixer-oss
|
||||
/sbin/modprobe -q snd-pcm-oss
|
||||
fi
|
||||
|
||||
if [ "$LOAD_SEQUENCER" = "yes" ]; then
|
||||
/sbin/modprobe -q snd-seq
|
||||
fi
|
||||
|
||||
if [ -r /proc/asound/seq/drivers ]; then
|
||||
OLDIFS="$IFS"
|
||||
IFS=","
|
||||
while read t x c; do
|
||||
/sbin/modprobe -q $t
|
||||
done < /proc/asound/seq/drivers
|
||||
IFS="$OLDIFS"
|
||||
fi
|
||||
|
||||
if [ -d /proc/asound/seq ]; then
|
||||
if [ "$LOAD_OSS_SEQ_MODULE" = "yes" ]; then
|
||||
/sbin/modprobe -q snd-seq-oss
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
16
sound-extra.service
Normal file
16
sound-extra.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Load extra kernel modules for sound stuff
|
||||
After=alsa-restore.service
|
||||
ConditionPathExists=/proc/asound
|
||||
|
||||
[Service]
|
||||
# added automatically, for details please see
|
||||
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
||||
ProtectSystem=full
|
||||
ProtectHome=true
|
||||
ProtectHostname=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectKernelLogs=true
|
||||
ProtectControlGroups=true
|
||||
Type=oneshot
|
||||
ExecStart=/usr/lib/systemd/scripts/load-sound-modules.sh
|
Loading…
Reference in New Issue
Block a user