From patchwork Fri Apr 21 21:15:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 6805 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Q36kD6J4cz3xDh for ; Fri, 21 Apr 2023 21:15:16 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Q36kB1qV1z9Tl; Fri, 21 Apr 2023 21:15:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Q36k95kW4z30Hx; Fri, 21 Apr 2023 21:15:13 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Q36k802N6z2xLX for ; Fri, 21 Apr 2023 21:15:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4Q36k60hkYzj2; Fri, 21 Apr 2023 21:15:10 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1682111710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=N4Db0XMEpi+S9lGCKuLyQV6th3oD+IKwYxtfJy9PKP4=; b=p5oIVPJ/dfSzssHG2gEYuwQdeKC04HbQjdS07t67u1LCpgyNHYG7O0X1aVAI/84PfOv5Cg mWG0Iee5sYTXtTAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1682111710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=N4Db0XMEpi+S9lGCKuLyQV6th3oD+IKwYxtfJy9PKP4=; b=a34rsneFMFoNXVbjkWeiJ9jFdBORVZpAp/3T7Q66DNMzQQhY+/IDYNre0Tp1GGWB36dq2R MbKcgK9AuZUn+KCFudWoeY9vv67QVKOXs7aub23Tf5UHOPioKTCPlqRPE65tLswSSfDHmX ebSpvUyLsk3yW7XoeRrU33XCN/P1F21t9EG67VH+zT/RcwwL60NzDSB+u8EinyzgX4meiR aFcBUr3Qufas4/gPNoUV/Crsp3PivBh58qbtcbondQsPMDYRcp52YZVOYSPgi09UBzbIWe Hjc2wn81RsKWIsjF/QxdiYn6htLH0ZqkHeJxhf/M/OQmRhsX2XoXzKcSP0igmA== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 1/3] alsa: Fix bug#13087 remove services entry Date: Fri, 21 Apr 2023 23:15:01 +0200 Message-Id: <20230421211503.2647702-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - alsa has an initscript but it is not starting and stopping a traditional daemon service. The initscript loads some alsa modules and then restores the asound.state file - This patch updates the PAK_VER number and removes the services entry and explicitly adds alsa in for the initscript installation. Fixes: Bug#13087 Signed-off-by: Adolf Belka --- lfs/alsa | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lfs/alsa b/lfs/alsa index 2d89af880..5c74bd182 100644 --- a/lfs/alsa +++ b/lfs/alsa @@ -37,11 +37,11 @@ DL_FILE = $(THISAPP).tar.bz2 DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) PROG = alsa -PAK_VER = 15 +PAK_VER = 16 DEPS = -SERVICES = alsa +SERVICES = TARGET = $(DIR_INFO)/$(THISAPP) @@ -104,6 +104,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP)/alsa-firmware-$(FVER) && make $(MAKETUNING) $(EXTRA_MAKE) cd $(DIR_APP)/alsa-firmware-$(FVER) && make install # install initscript - $(call INSTALL_INITSCRIPTS,$(SERVICES)) + $(call INSTALL_INITSCRIPTS,alsa) @rm -rf $(DIR_SRC)/alsa* @$(POSTBUILD) From patchwork Fri Apr 21 21:15:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 6807 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Q36kG0YTjz3xFR for ; Fri, 21 Apr 2023 21:15:18 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Q36kB4wZqz9Tr; Fri, 21 Apr 2023 21:15:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Q36k96ZDtz30Jf; Fri, 21 Apr 2023 21:15:13 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Q36k80T2hz2ydZ for ; Fri, 21 Apr 2023 21:15:12 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4Q36k75nS5z1sn; Fri, 21 Apr 2023 21:15:11 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1682111711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7XTrzZFPlHBZzIlqfa/Qhc5AkXk9uUkbn2lsxes2IhE=; b=hnJFJvTJcXZvEHeQhu6fYih1TrsVsJkZKxB7q7ePOi/lWvoz4SkWyoUu0u62KXnCPNxgAD asHqt6vuIWL968Ag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1682111711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7XTrzZFPlHBZzIlqfa/Qhc5AkXk9uUkbn2lsxes2IhE=; b=czc8dVD+N7/ItRN4NFxF0pucC5kFzvChDrLMDlAqjC5MxTEdCbd4rLcX9NKU/1KvTCN2uQ ffZz/GPgyFJQFIwMshkcZyS3vnDZMYvpVcMP4zwRtvVdsI/G7YQsD9IzEwc9/k0+epzOVi bMCI2p6hQZf20NmWaItIsrlDoyprrJy7PJ+YPHqlLkB947NttaNV82evvJqwI5/mfadVd/ prCifV6dClIgiC9AMs9sM7FeWkPVRLkjcSZ5aj2+KfhKOPQOaHQYEBAJ2B56nCZ+GsQefL BGJRHDi9Uh/+99hKSdD0P1bfxUEwzX+WQj0iiJ6T0nmf/nTxqkT/HietNRyHzA== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 2/3] alsa: Fixes Bug#13087 - adds module removal for stopping alsa. Date: Fri, 21 Apr 2023 23:15:02 +0200 Message-Id: <20230421211503.2647702-2-adolf.belka@ipfire.org> In-Reply-To: <20230421211503.2647702-1-adolf.belka@ipfire.org> References: <20230421211503.2647702-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - Stopping alsa or uninstalling it left the sound modules installed until a reboot was carried out. Uninstallation or stopping the kernel modules should also unload them. This patch adds in the modprobe -r commands to unload all the snd modules installed with the start command. The stop command is then added into the uninstall script to remove the modules. Fixes: Bug#13087 Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- src/initscripts/packages/alsa | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/initscripts/packages/alsa b/src/initscripts/packages/alsa index 348e33846..3bfb69f62 100644 --- a/src/initscripts/packages/alsa +++ b/src/initscripts/packages/alsa @@ -33,6 +33,10 @@ case "$1" in ;; stop) boot_mesg "Stopping ALSA... Saving volumes..." + modprobe -r snd_pcm_oss >/dev/null 2>&1 || failed=1 + modprobe -r snd_timer >/dev/null 2>&1 || failed=1 + (exit ${failed}) + evaluate_retval loadproc /usr/sbin/alsactl store ;; From patchwork Fri Apr 21 21:15:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 6806 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Q36kF65wTz3xDh for ; Fri, 21 Apr 2023 21:15:17 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Q36kB4tKsz9Tp; Fri, 21 Apr 2023 21:15:14 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Q36k971mbz30Jl; Fri, 21 Apr 2023 21:15:13 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Q36k84CqYz2ydZ for ; Fri, 21 Apr 2023 21:15:12 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4Q36k772TJz9Tl; Fri, 21 Apr 2023 21:15:11 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1682111712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MaUiU7kCH1zwHNg5y3lpWs5WpefrDp398+XoPRObM2M=; b=4u5LCTPMBFbKMM8T+NbdwkC7JKzKg0UD6Yr5izPLS2x+JyCT8e+F2mM3DpVVfq3vM2mXOo F7hERKOKzG9MWnCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1682111712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MaUiU7kCH1zwHNg5y3lpWs5WpefrDp398+XoPRObM2M=; b=IYxl7/TLmSBwtDkTCruKJPYt721fCHzXMiWGN/cfFmxvUqmwT0q1OLXhir9vf5wOwLcZBC bXdivoCq1PkD7oYZ9omrY4MAD7OLxnYLGEw0xIXsagPO5+nPbgh6FqjaNsG2yu9HEynPYv i390HH3G/qwKIMhMkDD2QQ74QTBa7X150hv/9qx10+HDORPRgk79xU4P+yOEhNVdOzuHrx /qZtLl2cU8x71M8FGcc/RHwVjIRBlFkLv9yOHjhiqM6725p41LNEjw15DOkBp79+FJBktx s0H04zP+OVG1NtIP+p1/AwhoA0gnzJ+JtF7aTm3lzD3AUP4EqXlUQ/IfuUDJ7A== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 3/3] alsa: Fixed Bug#13087 - Corrects the path for asound.state and adds start and stop service Date: Fri, 21 Apr 2023 23:15:03 +0200 Message-Id: <20230421211503.2647702-3-adolf.belka@ipfire.org> In-Reply-To: <20230421211503.2647702-1-adolf.belka@ipfire.org> References: <20230421211503.2647702-1-adolf.belka@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" - start_service added to install.sh and stop_service to uninstall.sh This ensures that the modules are loaded after install and that when doing uninstall the stop_service ensures that the snd modules are unloaded. - the asound.state file was touched by the install.sh cript but the alsactl store and restore commands have default location of /var/lib/alsa/ so the touch command created an asound.state file that was then not used subsequently. It also meant that the first start of alsa would fail as it would try and restore from /var/lib/alsa/asound.state but the file did not exist. - This patch also corrects the path for the touch command for asound.state - The install.sh script also checks if /etc/asound.state exists and if it does removes it. Fixes: Bug#13087 Tested-by: Adolf Belka Signed-off-by: Adolf Belka --- src/paks/alsa/install.sh | 7 ++++++- src/paks/alsa/uninstall.sh | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/paks/alsa/install.sh b/src/paks/alsa/install.sh index 7b6b3dc80..d6ab7b465 100644 --- a/src/paks/alsa/install.sh +++ b/src/paks/alsa/install.sh @@ -24,7 +24,12 @@ . /opt/pakfire/lib/functions.sh extract_files groupadd audio 2>/dev/null -touch /etc/asound.state +touch /var/lib/alsa/asound.state +if [ -f /etc/asound.state ]; then + rm /etc/asound.state +fi ln -svf ../init.d/alsa /etc/rc.d/rc3.d/S65alsa ln -svf ../init.d/alsa /etc/rc.d/rc0.d/K35alsa ln -svf ../init.d/alsa /etc/rc.d/rc6.d/K35alsa +start_service ${NAME} +exit 0 diff --git a/src/paks/alsa/uninstall.sh b/src/paks/alsa/uninstall.sh index 62e27008d..632b695ae 100644 --- a/src/paks/alsa/uninstall.sh +++ b/src/paks/alsa/uninstall.sh @@ -22,5 +22,7 @@ ############################################################################ # . /opt/pakfire/lib/functions.sh +stop_service ${NAME} remove_files rm -rf /etc/rc.d/rc*.d/*alsa +exit 0