GNU bug report logs - #40832
alsa-lib cannot find its plugins

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Leo Famulari <leo@HIDDEN>; dated Fri, 24 Apr 2020 21:38:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 29 Jul 2020 11:19:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 29 07:19:08 2020
Received: from localhost ([127.0.0.1]:60250 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k0k72-0003ky-LV
	for submit <at> debbugs.gnu.org; Wed, 29 Jul 2020 07:19:08 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:45846)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1k0k70-0003kn-Q8
 for 40832 <at> debbugs.gnu.org; Wed, 29 Jul 2020 07:19:07 -0400
Received: from localhost (80-110-127-146.cgn.dynamic.surfer.at
 [80.110.127.146])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 0D44A3362155;
 Wed, 29 Jul 2020 13:19:05 +0200 (CEST)
Date: Wed, 29 Jul 2020 13:18:44 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: Leo Famulari <leo@HIDDEN>
Subject: Re: bug#40832: alsa-lib cannot find its plugins
Message-ID: <20200729131844.18b08be2@HIDDEN>
In-Reply-To: <20200728235623.GA1936@HIDDEN>
References: <20200424213727.GA11710@HIDDEN>
 <20200728125241.4ff41418@HIDDEN>
 <20200728235623.GA1936@HIDDEN>
X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/rhLah9rhqC6sPImVcJOZc+C";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
Cc: 40832 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--Sig_/rhLah9rhqC6sPImVcJOZc+C
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi Leo,

On Tue, 28 Jul 2020 19:56:23 -0400
Leo Famulari <leo@HIDDEN> wrote:

> On Tue, Jul 28, 2020 at 12:52:41PM +0200, Danny Milosavljevic wrote:
> > some comments on the lastest patch: =20
>=20
> Thank you for reviewing the patch!
>=20
> > * The entire alsa-lib seems to use the idiom "malloc and then strcpy", =
or
> > "malloc and then sprintf", or, worse, "malloc, strcpy and multiple strc=
at".
> > These are a buffer overflow waiting to happen (when changing part of th=
ose
> > while doing ongoing maintenance;  also the places where they use "+" is=
 not
> > checked for overflow).  That said, if they do it, we can do it that way=
, too. =20
>=20
> This confirms what I felt =E2=80=94 it's hard to feel confident about the=
 bounds
> checking in this code. It seems to be based on the names of the plugin
> libraries not exceeding some magic length. It's hard to balance "doing
> the right thing" and using upstream's idioms.

After thinking about it more, I think it's much worse if the thing that is
stuck into the malloced block is the value of an environment variable.

When it's a compile-time variable you basically trust the code and the
distribution package not to have too-long paths in there that could overflow
the "+" in malloc(... + ).  A distribution or upstream could do much worse
things than that, so that is not a credible threat to worry about.

For a runtime variable like the environment variable (that anyone can set to
anything), I am very much in favor of not using malloc(... + ) and instead
using asprintf, in order to prevent an exploitable buffer overflow just by
setting up an environment variable.

> When writing the patch, my investigation into the code made decide that
> it would not overflow, but now I don't remember why I thought that.

Thanks for that remark.  It made me think and I came to the recommendation
above.

--Sig_/rhLah9rhqC6sPImVcJOZc+C
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl8hWxQACgkQ5xo1VCww
uqU6ggf9GepLAqJmnyYpilvAyGOkD4AC1Fj+V7d8EuNqjAOsFmO+3pHaECHAJBne
DKo7h6NL4ynsR+OfPoc/O6zIsFoOjiUVqHX8HpUZCOCvrl7lPyPyoFJOOGChNcXh
x1lkj8bOnaW2uLPpZ2wL5ff3R/k2geqDWha6rEREs/rKgxLswgNOWownozpfYH7M
PVJAqIgggp2FeZ7+Glm2YfFdDrJdz9vgFthk3bhyMCbI41FVPiEu3Iwmq2SQlkGP
pR+ae8tbFkk8Acn8I71F+Pyj/yU+S+nyaHVHR9AK2y3uvsZYKyy6cAw8g8cIFeBF
dt1W6Zh3MRxGj9onS1VPP/iBy73Iag==
=cqCo
-----END PGP SIGNATURE-----

--Sig_/rhLah9rhqC6sPImVcJOZc+C--




Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 28 Jul 2020 23:56:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 28 19:56:57 2020
Received: from localhost ([127.0.0.1]:59465 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k0ZSr-0007Yf-KA
	for submit <at> debbugs.gnu.org; Tue, 28 Jul 2020 19:56:57 -0400
Received: from out2-smtp.messagingengine.com ([66.111.4.26]:58637)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1k0ZSq-0007YT-EX
 for 40832 <at> debbugs.gnu.org; Tue, 28 Jul 2020 19:56:56 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id 3F8D25C00FF;
 Tue, 28 Jul 2020 19:56:51 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Tue, 28 Jul 2020 19:56:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-type:in-reply-to; s=mesmtp; bh=dC50rpDq4O5nSzrzfjlC6HzS
 t2x1h2dH6x3F1kZoHhs=; b=tgCDVIciIIIyxs4pnKzV/RmNc2pZNrtojgkty+lq
 SdFUoI5oBMNgreOad7LWI990tJntMuvEdi0TW+1I8+IoPFI07x/bNTU3KMwIpHsf
 xKHS7F5RdCJ2VDwJv9v/dP8mLx7egTD19ErpjBd7AcY49zA5LIKHdTHA2HUR5vCs
 FJI=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=dC50rp
 Dq4O5nSzrzfjlC6HzSt2x1h2dH6x3F1kZoHhs=; b=ga3OYqX9qIiRwbmZBett3K
 auwCYMaiaiwzbtMasoqoeX4onb3laDmuwnY98xqwOHbr8148Xyq+3YLPJg0OP25w
 C5RO6Z1N8AepNFURXfLHT3PKCQ3onbiY8jGl+cF+tWWJUxJGeGHpWz0UUkcfyksW
 Fzwtz9RYu+a3rDfl40aB9mXOKKNeOp2ZNUj9H7dXTljnTwCkPj1d4eVFRgmRcUPk
 GBFTuejIMTxTQAcY2I4l0z2Ej97irDcdMt1+jVAt6TYXm3+qHlcBw5EjxGRZC14j
 hzZfaOEVUjkI34Vudkq/gKK8dQW/5SozLvpQuT4uE6IeZnd9at+a1B4MpEZ3zT8Q
 ==
X-ME-Sender: <xms:Q7sgXwZDIRnL74ir-IQVl5Y6OYFWQ0rISM9L6la6WBsJuscJEnIkug>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrieefgddvjecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepnfgvohcuhfgr
 mhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhirdhnrghmvgeqnecuggftrfgrthhtvg
 hrnhepudekveegteekleetgfeitdejgfejkeffudethedvhfeukeduleeikeejfeehffet
 necukfhppeejfedrudeguddruddvjedrudegieenucevlhhushhtvghrufhiiigvpedtne
 curfgrrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv
X-ME-Proxy: <xmx:Q7sgX7YJ39qsUDtkusUekj9SmUxMcj2h6647HbU1qoz_9KB3yXRB5A>
 <xmx:Q7sgX6_-2FIB-VfS4O7oCHbH2yzbfXX9NZSt-BUi5z11JGodN6wiGw>
 <xmx:Q7sgX6oWbQsC9AFIBk31E097NITyhZ-A86YF1cRF9lrjjtlquteJpg>
 <xmx:Q7sgX43IGNx_7pFF91xZeZ2AYbFgcGzCvHqny3pLNI9FjQ2aYjBevQ>
Received: from localhost (c-73-141-127-146.hsd1.pa.comcast.net
 [73.141.127.146])
 by mail.messagingengine.com (Postfix) with ESMTPA id 040F3306005F;
 Tue, 28 Jul 2020 19:56:50 -0400 (EDT)
Date: Tue, 28 Jul 2020 19:56:49 -0400
From: Leo Famulari <leo@HIDDEN>
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: bug#40832: alsa-lib cannot find its plugins
Message-ID: <20200728235649.GB1936@HIDDEN>
References: <20200728125241.4ff41418@HIDDEN>
 <20200728125619.44c2ad23@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="MW5yreqqjyrRcusr"
Content-Disposition: inline
In-Reply-To: <20200728125619.44c2ad23@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
Cc: 40832 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


--MW5yreqqjyrRcusr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Jul 28, 2020 at 12:56:19PM +0200, Danny Milosavljevic wrote:
> * src/control/control.c patch uses ALSA_PLUGIN_DIR and then, if necessary,
> GUIX_ALSA_PLUGIN_DIRS.  But src/dlmisc.c uses only GUIX_ALSA_PLUGIN_DIRS,
> no ALSA_PLUGIN_DIR. src/pcm/pcm.c uses ALSA_PLUGIN_DIR and then, if necessary,
> GUIX_ALSA_PLUGIN_DIRS.  Is that discrepancy on purpose?

I will look into it, thanks for noticing!

--MW5yreqqjyrRcusr
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl8gu0EACgkQJkb6MLrK
fwgE1RAA2OS1LAHD7gkgKUqZcFskRcX4KM3tJvI6zWkYJXyUzbO9OQw+jG/2iJf3
wawyIhdKbKt0lps1gwH9gIKrVBrWuljQOunLEmAUWjSx33IqaOcgx4xkzU9/QEGR
RRWDUmMeKgj51j/PxDFPv0QzoYQA4TkKLtpBkPAo5Dg0yx/ZgVPQ/UKvpkWMfmdJ
gdTODlLxxex2C7zpLoWYDCmqpvQJ3Qi/kxahCffEfX+xP+dccr5140JlhO11cLw+
OJPK2RyZdkhvJ7gOR+V2oenIO8e1yK1+8g/pc7KSXGXuWEA+KT8Iidpf35YbvfLg
jAxVNyvXYpOfyl27AQV9yU9Ww4bYL400BkEjjfic4LNU3LgRudrhma/0xVc2ZRM1
uuiiQFDOgG78FolwIBdeFfY7h8mvPVKAN1QoRjlcShz+GL2BanRUKHDSKwsqydR6
+XTw2Y0pFU0f5SqpJAf+DOcqPEZXkZPhaflX1k0x+jXg8oHoYyyQyQO89I3SI6Ze
KdiKv5JQXEfxItlOp0v032nRKgbOfw4kF+U6mFP/rRLyiaco9dLI/8/u8gwBXAtW
+drB8iTpnDX/wDwkmwPBNhpVG8+N443P83Dbz+1G33/aB6snijoBW3G0zTr8SToQ
DeuZn8nMUvq1BkTCMDep6mfPU6X6uTcLrwqTJbc8mHKO8Vbnuc8=
=1R2O
-----END PGP SIGNATURE-----

--MW5yreqqjyrRcusr--




Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 28 Jul 2020 23:56:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 28 19:56:40 2020
Received: from localhost ([127.0.0.1]:59461 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k0ZSa-0007YB-7u
	for submit <at> debbugs.gnu.org; Tue, 28 Jul 2020 19:56:40 -0400
Received: from out2-smtp.messagingengine.com ([66.111.4.26]:38067)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1k0ZSV-0007Xu-LU
 for 40832 <at> debbugs.gnu.org; Tue, 28 Jul 2020 19:56:39 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id 46FDD5C014E;
 Tue, 28 Jul 2020 19:56:30 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Tue, 28 Jul 2020 19:56:30 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-type:in-reply-to; s=mesmtp; bh=3JDJVli4b/v0Fe+sFl5tT2cS
 080zXf+0mlV7sMOhKM0=; b=ea+zXHWFAvYxtyWgKMymXnwzUSelg5uNUCrae7Dr
 BreZ5YKNErTulHvPJGYRoJlU7SXo/d9RjznpeEK335KINvXCDEjUAi1CwMGFA7pK
 md0WPdKeh+9JY3zpdRZkyciKYxNPqot/QXwjmln3F7FuIfuZEDmlNyFPU4GZO7Eg
 bVM=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=3JDJVl
 i4b/v0Fe+sFl5tT2cS080zXf+0mlV7sMOhKM0=; b=MzGG9/d1RcuwyUHxZdxTzg
 QduYb5sSJ+7+ulslBYPAcXCeODhWKA2uENQd5RtTzv7dORUyV7MD24QaUdunQR7/
 CgG3hNlemwlzAxu/8XkQ2rnk9X/b9q8smoljNh6sbukqsO0CYZQpQ/iMXHYi4kmM
 M+hopKidkrnS0rmCzuDmB89EmPalmtwrHL568sEyXTMJ8GwPklcbZGNMkIgfOGiy
 AYSI75wdVAmG+UZ2Cj/seTkLQQnuisZITGnBnPMtssuO5dP2fQ/g6YoE5pfjls+R
 N9cK0+iFtHvc0U9pqpCEDd+rlE//nXYvfgjO74in/xlUkxbAuC0CHiZ81YdVBNdw
 ==
X-ME-Sender: <xms:LbsgX_7NEkA-cGZVfa2NoGCv-9LqdR7-JnKSnqlOhq_uQlEfumqYwA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrieefgddvjecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpeffhffvuffkfhggtggujgesghdtreertddtjeenucfhrhhomhepnfgvohcuhfgr
 mhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhirdhnrghmvgeqnecuggftrfgrthhtvg
 hrnhepiefghfeffedtffekveektddtieekfeffledtgfevkeekteeufedtfefhgefhkeef
 necukfhppeejfedrudeguddruddvjedrudegieenucevlhhushhtvghrufhiiigvpedtne
 curfgrrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv
X-ME-Proxy: <xmx:LbsgX04FMp-Uz0HFL1D_Ej2Vals8gIpcYI51CecH0BpOE2WXEDdq_Q>
 <xmx:LbsgX2euWDhfmxc0YmK8SbNZa4xB2WoADTzK9sthdAR9K4njBYycgw>
 <xmx:LbsgXwI4SghLMPII_NbTke_dxwYabknTBw8IZxkIoZb03pNoRBszzA>
 <xmx:LrsgX4W6YwTmClBv7eLMcL5nY0l9qSnPEepWOSQB_9FYXe5xUlg1kQ>
Received: from localhost (c-73-141-127-146.hsd1.pa.comcast.net
 [73.141.127.146])
 by mail.messagingengine.com (Postfix) with ESMTPA id 4D4D4306005F;
 Tue, 28 Jul 2020 19:56:29 -0400 (EDT)
Date: Tue, 28 Jul 2020 19:56:23 -0400
From: Leo Famulari <leo@HIDDEN>
To: Danny Milosavljevic <dannym@HIDDEN>
Subject: Re: bug#40832: alsa-lib cannot find its plugins
Message-ID: <20200728235623.GA1936@HIDDEN>
References: <20200424213727.GA11710@HIDDEN>
 <20200728125241.4ff41418@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="3V7upXqbjpZ4EhLz"
Content-Disposition: inline
In-Reply-To: <20200728125241.4ff41418@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
Cc: 40832 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


--3V7upXqbjpZ4EhLz
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jul 28, 2020 at 12:52:41PM +0200, Danny Milosavljevic wrote:
> some comments on the lastest patch:

Thank you for reviewing the patch!

> * The entire alsa-lib seems to use the idiom "malloc and then strcpy", or
> "malloc and then sprintf", or, worse, "malloc, strcpy and multiple strcat=
".
> These are a buffer overflow waiting to happen (when changing part of those
> while doing ongoing maintenance;  also the places where they use "+" is n=
ot
> checked for overflow).  That said, if they do it, we can do it that way, =
too.

This confirms what I felt =E2=80=94 it's hard to feel confident about the b=
ounds
checking in this code. It seems to be based on the names of the plugin
libraries not exceeding some magic length. It's hard to balance "doing
the right thing" and using upstream's idioms.

When writing the patch, my investigation into the code made decide that
it would not overflow, but now I don't remember why I thought that.

> * The environment variable GUIX_ALSA_PLUGIN_DIRS is only checked if the
> respective file does not exist in alsa-lib.  That is not how environment
> variables usually work--it should be possible to override built-in things
> by setting this environment variable, too.

Good point. I don't remember now if I specifically decided to do things
this way or if it was a side effect of where I inserted the new code.

> * Instead of alloca and strcpy, can just use strdupa.

I didn't know about this function, thanks.

> * strtok_r man page states that the first argument should be NULL on the
> non-first calls.  You do that already, but maybe add a comment why that
> is done where it's set to NULL.

Right.

> * strtok_r man page states that "On some implementations, *saveptr is req=
uired
> to be NULL on  the first call to strtok_r() that is being used to parse s=
tr.".
> So I'd use "char* saveptr =3D NULL;"

My Linux 4.16 man pages from Debian don't contain this note. Good to
know!

> * Instead of malloc and sprintf, could just use asprintf.  But they don't,
> so let's not either, for easier review.  Also, magical value 32... sigh.
> Well, they do it, too.

Right...

> * If GUIX_ALSA_PLUGIN_DIRS contained for example "a:" then it would search
> "a" and "/", right?  OK as long as we want that.

I don't remember how it behaves anymore... I'll look into this and
decide.

Thanks again for the review!

--3V7upXqbjpZ4EhLz
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl8guyQACgkQJkb6MLrK
fwgo5g//QbfZWOEhJGAIerkFEk8gFSlRdcViVdqcDSd7GPhm/Q88B1d3YlRytgJ0
iyxQ8lll5uZ9uM1DZOrkwrmJBSi3WoADV+4Rkbao+9Ak3acrzn2tWBueng4o5EG8
I+lzlwu09miMoQEEXuAjpDE1wa1vHDCpUM1Z43ng1+pzsIAiFNFxx2MZnX57CSDK
pjDyLMvE2coiEaw2geuqjPZnGl16ZQgmIhZEIqDFxlS+eVDQcHDaACnB/FFw/whs
cbN9pBm+GuS1JAKAhZcYjCt63Lv2Lkvwv0RpPkaY5h7gCepkB5J4zEPSzA2HQlsa
m3VmZ1PMPWYB9TC5Lu395yPJFd7RVU5ouU11/5+jWGwRh5N9MrheyQRu4/N3GnxW
sCfcvv+DlE7stlP3BTj2idHlqn2f7Qz590yz2aPNZp3/kdgOPZP9mUWF8N1LkqPj
RG+rlHlFaCf4OoFsd6ptW/8ZyW3a34+XUHsXmkmSMO/t0v5zHbquVOmaoNrz6qFr
JPOCi3MdQXg5kF6OEb18JTJrGcinSj1r/MRt4XDJeUpl4zgXIhFC3t/co8LZ8lPn
mYfCdNk4JN47j8JKvKGnGTaSiTceNPoIjoF7QeKyXO8AdRADwSZ/nDaoJSInDxie
apnXHOnnC+glFpsxBi6TW/lXvSoB5FPtjM8eQANKY/TlrdOFg7o=
=Wkny
-----END PGP SIGNATURE-----

--3V7upXqbjpZ4EhLz--




Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 28 Jul 2020 10:56:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 28 06:56:22 2020
Received: from localhost ([127.0.0.1]:57399 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k0NHS-00071O-5v
	for submit <at> debbugs.gnu.org; Tue, 28 Jul 2020 06:56:22 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:35110)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1k0NHR-00071H-1o
 for 40832 <at> debbugs.gnu.org; Tue, 28 Jul 2020 06:56:21 -0400
Received: from localhost (80-110-127-146.cgn.dynamic.surfer.at
 [80.110.127.146])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 483E33366D30
 for <40832 <at> debbugs.gnu.org>; Tue, 28 Jul 2020 12:56:20 +0200 (CEST)
Date: Tue, 28 Jul 2020 12:56:19 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: 40832 <at> debbugs.gnu.org
Subject: Re: alsa-lib cannot find its plugins
Message-ID: <20200728125619.44c2ad23@HIDDEN>
In-Reply-To: <20200728125241.4ff41418@HIDDEN>
References: <20200728125241.4ff41418@HIDDEN>
X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/lY=0gR.6RPTV3_51F8.m=FE";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--Sig_/lY=0gR.6RPTV3_51F8.m=FE
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

* src/control/control.c patch uses ALSA_PLUGIN_DIR and then, if necessary,
GUIX_ALSA_PLUGIN_DIRS.  But src/dlmisc.c uses only GUIX_ALSA_PLUGIN_DIRS,
no ALSA_PLUGIN_DIR. src/pcm/pcm.c uses ALSA_PLUGIN_DIR and then, if necessa=
ry,
GUIX_ALSA_PLUGIN_DIRS.  Is that discrepancy on purpose?

--Sig_/lY=0gR.6RPTV3_51F8.m=FE
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl8gBFMACgkQ5xo1VCww
uqUKswf/Zr0bjy30jriVSw5u2kw5W5iyaB2EJyUZ8NEQM7XGYeZLi+dctn6Q+6Ah
vCkR+qr1w/v8Wnzdv67uUZ0bYB/cMis4IP7Mdk0BgOoaNOiEFY0wksg35NeYiyjo
YVs6KcRfeubQGcjFMeT+iNEtPQbpFOh+I3HwOo6cTnAsaf2MQp5Ss2dVqDh43DaS
XN9i7u1GXsQUgldDYLz/mySaXETf8NdSbWLYGQ/xZjicSRBEaFLcSnME8QpDww5p
YQdsSOn/jDxxpqQg64AFXzo/1NoGocobPKN4WbWi/s9ylvMLpK2UHhlW96uKb5Al
+fTlReetYM7+h6UXIE18IXZS0ceEUw==
=FIjY
-----END PGP SIGNATURE-----

--Sig_/lY=0gR.6RPTV3_51F8.m=FE--




Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 28 Jul 2020 10:53:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 28 06:53:16 2020
Received: from localhost ([127.0.0.1]:57395 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1k0NES-0006wv-NM
	for submit <at> debbugs.gnu.org; Tue, 28 Jul 2020 06:53:16 -0400
Received: from dd26836.kasserver.com ([85.13.145.193]:34846)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dannym@HIDDEN>) id 1k0NER-0006wm-49
 for 40832 <at> debbugs.gnu.org; Tue, 28 Jul 2020 06:53:16 -0400
Received: from localhost (80-110-127-146.cgn.dynamic.surfer.at
 [80.110.127.146])
 by dd26836.kasserver.com (Postfix) with ESMTPSA id 9C1453366D30
 for <40832 <at> debbugs.gnu.org>; Tue, 28 Jul 2020 12:53:13 +0200 (CEST)
Date: Tue, 28 Jul 2020 12:52:41 +0200
From: Danny Milosavljevic <dannym@HIDDEN>
To: 40832 <at> debbugs.gnu.org
Subject: alsa-lib cannot find its plugins
Message-ID: <20200728125241.4ff41418@HIDDEN>
X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/Txz4xBtVh+deZhNGdMRPbn7";
 protocol="application/pgp-signature"; micalg=pgp-sha512
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--Sig_/Txz4xBtVh+deZhNGdMRPbn7
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi Leo,

some comments on the lastest patch:

* The entire alsa-lib seems to use the idiom "malloc and then strcpy", or
"malloc and then sprintf", or, worse, "malloc, strcpy and multiple strcat".
These are a buffer overflow waiting to happen (when changing part of those
while doing ongoing maintenance;  also the places where they use "+" is not
checked for overflow).  That said, if they do it, we can do it that way, to=
o.
* The environment variable GUIX_ALSA_PLUGIN_DIRS is only checked if the
respective file does not exist in alsa-lib.  That is not how environment
variables usually work--it should be possible to override built-in things
by setting this environment variable, too.
* Instead of alloca and strcpy, can just use strdupa.
* strtok_r man page states that the first argument should be NULL on the
non-first calls.  You do that already, but maybe add a comment why that
is done where it's set to NULL.
* strtok_r man page states that "On some implementations, *saveptr is requi=
red
to be NULL on  the first call to strtok_r() that is being used to parse str=
.".
So I'd use "char* saveptr =3D NULL;"
* Instead of malloc and sprintf, could just use asprintf.  But they don't,
so let's not either, for easier review.  Also, magical value 32... sigh.
Well, they do it, too.
* If GUIX_ALSA_PLUGIN_DIRS contained for example "a:" then it would search
"a" and "/", right?  OK as long as we want that.

Otherwise LGTM!

--Sig_/Txz4xBtVh+deZhNGdMRPbn7
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl8gA3kACgkQ5xo1VCww
uqX71wgAnuA4W4hCgGgf4voKKgP75dr7156T3uabZ2cqpwboRuMIsF/LzsWLOe/x
vuow284NYaDdSvIbCcmji0bXy+FIfyqaSR/w161BUDCRsOIlwf+4yk2F3TsnxOxf
0mYZPDMaTjl4uTEyi/CcpGTIX667Zsy0gHtmALwbAByH3m3onf6F2VqSFvMXchlk
CkLmyNV6yaOsSCXeNdT3pqkJKBDcLYTqqTxe9PHLp0/gjAyv18hzBnyb4aKNJr0J
SrRRF3RZ05PwtH+51Yd/zIY9+iu0z8yx498bF5wNhrRiHsvs5mv6hTf46+EAXr6X
KYZCAva+/iFV0UAMfv4Z27XuVl2LkQ==
=PlR0
-----END PGP SIGNATURE-----

--Sig_/Txz4xBtVh+deZhNGdMRPbn7--




Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 17 May 2020 18:19:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun May 17 14:19:19 2020
Received: from localhost ([127.0.0.1]:44703 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jaNsc-0000C7-Up
	for submit <at> debbugs.gnu.org; Sun, 17 May 2020 14:19:19 -0400
Received: from out4-smtp.messagingengine.com ([66.111.4.28]:36393)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1jaNsa-0000Bu-OK
 for 40832 <at> debbugs.gnu.org; Sun, 17 May 2020 14:19:18 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id 5401D5C008B;
 Sun, 17 May 2020 14:19:11 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Sun, 17 May 2020 14:19:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=date:from:to:subject:message-id:references:mime-version
 :content-type:in-reply-to; s=mesmtp; bh=CDRom2sgX8sMj6fuFkf3CgXZ
 78Vwsstgaq7pUhY+7b8=; b=j28xT8ARWg6zX9cn5IusGyB3PX2OycuWF7dDFec8
 pz5ZZbloleXQWr8X/QPumvyhJUuHmyE/KdTbJ0SOqrHBDabKGOtfTKgQ2mrsYHXc
 OVpxNnxdlt2kQvg5d6xS1Zn9L/Fh8vVMa0vwy4Jik+On9eP8ShH9Vy5MGqQRWooF
 ayE=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=CDRom2
 sgX8sMj6fuFkf3CgXZ78Vwsstgaq7pUhY+7b8=; b=S68lVNMbhXDyzJxhsMHRmf
 YwavA3Xi4p/run6g/jYyHI5Zw0lI6NzokSROn9+ySn9mgPA90yRAXitQPQaF1lzp
 JVVyf83YrnJL7CkaD4GjuV/fU4BvDyNBW7Pse9cXcTOHaiilPCWXdvW3W4FR8G1Z
 rHVust/2gK00oyR9vhDR1hH5k6vfhvFQgZoddv59G3CnspUJweMd3Tz//T+XyyUO
 MXPS0c7JQUlsuFf6uCDYCbg9WklVysxm0X4H+k8TcT8rqeSEYPZ5BSdIkf2f5fUY
 +atujD80fWNncorNxD8tB6QQVDsP2J05l4zH8ZkLV42TGjkLqoT3T3/sd7u3mVFQ
 ==
X-ME-Sender: <xms:H4DBXshAl32oez7QQReGtQjzmzVz7y8znsCrRUE3tTyCOE-v2zuMpA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddtfedguddvvdcutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjsehttd
 ertddttddvnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhl
 rghrihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeeukeektdffvddtudegjeegtdevhf
 eufeeivdejiedtieegtdevjedvjeehffevgfenucfkphepjeeirdduvdegrddufeekrdei
 feenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvg
 hosehfrghmuhhlrghrihdrnhgrmhgv
X-ME-Proxy: <xmx:H4DBXlBh8M0UBEWU5BGpLYNpo6tra4bdcfoQMWuENCSTtJcYHIm3AA>
 <xmx:H4DBXkGn57Or6YQb3kui3QE7deeZlNIOdW7Drpgn1I88buMktqqLlg>
 <xmx:H4DBXtQItoyoUgd-uIXv0Aos_H9RrRpMrj0Aso6CsICHzwtZk1pfew>
 <xmx:H4DBXtjs-QB5neKu6vV-5U6aV6PxIQsWZVsHmv1bVM98twtc27dSrg>
Received: from localhost (c-76-124-138-63.hsd1.pa.comcast.net [76.124.138.63])
 by mail.messagingengine.com (Postfix) with ESMTPA id 0C65C328005D
 for <40832 <at> debbugs.gnu.org>; Sun, 17 May 2020 14:19:11 -0400 (EDT)
Date: Sun, 17 May 2020 14:19:07 -0400
From: Leo Famulari <leo@HIDDEN>
To: 40832 <at> debbugs.gnu.org
Subject: Re: [PATCH 0/2] Help alsa-lib find its plugins
Message-ID: <20200517181907.GA26362@HIDDEN>
References: <cover.1589657580.git.leo@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <cover.1589657580.git.leo@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Sat, May 16, 2020 at 03:33:59PM -0400, Leo Famulari wrote:
> These patches work well for me on Debian. I'm currently reconfiguring my
> Guix System machine to test them here. Feedback welcome

I tested this on Guix System and it does not interfere with the
default alsa-service, which sets up /etc/asound.conf

I'd like to push this to master soon-ish, with a followup ungraft on
staging.




Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 16 May 2020 19:34:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 16 15:34:42 2020
Received: from localhost ([127.0.0.1]:41772 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ja2a2-00040w-Hu
	for submit <at> debbugs.gnu.org; Sat, 16 May 2020 15:34:42 -0400
Received: from out5-smtp.messagingengine.com ([66.111.4.29]:58893)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1ja2Zt-00040G-1l
 for 40832 <at> debbugs.gnu.org; Sat, 16 May 2020 15:34:37 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id C58525C00AA;
 Sat, 16 May 2020 15:34:27 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Sat, 16 May 2020 15:34:27 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=from:to:subject:date:message-id:mime-version
 :content-transfer-encoding; s=mesmtp; bh=QKZOoZitkgxHEyIrCO+hBjX
 G+Zg6bn6qySti4hNMJ0E=; b=TkNJwlS073gT83ruMpvDxw5IJnImJ5lX8IfK0f4
 CbejelAmM4hLYZzTzIVl+qAQI9NA2i3KHQR2eSfC4/6A1gb8lxzqyyoZFSXrp7fY
 tPlQLRPLQGX66hC1aaFkbTFRyq7V/eo5SXDw6n2EwI8MrdeI7O1bMPJFNwEviUou
 7mFE=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-transfer-encoding:date:from
 :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=QKZOoZitkgxHEyIrC
 O+hBjXG+Zg6bn6qySti4hNMJ0E=; b=M9EPbzuqumAPIqTpIRo8Yp9YYLYvEhVst
 VhDUdIqUbKZLKEev+hNNGkhy5k8TOVOIe3XKz/RD7EIZpj+5VIUF61rrokc2sd/k
 jW3jMqI0mroJ7mHp2NGCC9JTqs/70EHdvms5bYa7ATFqLMTXfFwCGLNf4ckDOowX
 qPeSzS7S+KdYtk3ebo61US+a1wYIpt6wrEP74DJGzoPLIH7+8PQai+g8N9A5fft8
 ecMD30SswHs4fiks64DnnKicor503rXgWCn8uBAAMm3gqpWOy2vWSuyx7x+PfULN
 mYXs+plT76WJwkrxcFIL4hlPCEV9zPY7EeuLnEqls7vgL1G9g5NFA==
X-ME-Sender: <xms:Q0DAXlSdePw_PZrS81ypx-zr9rePq_b8Fdx2AzKwqiApfTVEO_1Hdw>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddttddgudefjecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertd
 ertddtnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhlrghr
 ihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeetueeigfelheekveffveetffeugeeuud
 dvgeeiffevkeeuffefteduvdfhhfduhfenucfkphepjeeirdduvdegrddufeekrdeifeen
 ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghose
 hfrghmuhhlrghrihdrnhgrmhgv
X-ME-Proxy: <xmx:Q0DAXuyQGgZ-Y7KL77oJoOPIhyUrV1-ZYgFDaHSJ3_INADGTi3Q8hQ>
 <xmx:Q0DAXq0UdLCSN2XEvKo5U08iTYGhaFJ1vypzxPdDEj9B3gogif6HIw>
 <xmx:Q0DAXtCnX8awZQkXglRVGIHCHerBs5W8SaUezHJldnza5f0OTh_pQQ>
 <xmx:Q0DAXpT_jD5Ga1_HZqkL6d_QGZiSGdgfS_s6WcKQHFszKN1S3pTngw>
Received: from jasmine.lan (c-76-124-138-63.hsd1.pa.comcast.net
 [76.124.138.63])
 by mail.messagingengine.com (Postfix) with ESMTPA id 456C73066398
 for <40832 <at> debbugs.gnu.org>; Sat, 16 May 2020 15:34:27 -0400 (EDT)
From: Leo Famulari <leo@HIDDEN>
To: 40832 <at> debbugs.gnu.org
Subject: [PATCH 0/2] Help alsa-lib find its plugins
Date: Sat, 16 May 2020 15:33:59 -0400
Message-Id: <cover.1589657580.git.leo@HIDDEN>
X-Mailer: git-send-email 2.26.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

These patches work well for me on Debian. I'm currently reconfiguring my
Guix System machine to test them here. Feedback welcome

Leo Famulari (2):
  gnu: alsa-plugins: Add GUIX_ALSA_PLUGIN_DIRS search path
    specification.
  gnu: Help alsa-lib find its plugins on foreign distros.

 gnu/local.mk                                  |   1 +
 gnu/packages/linux.scm                        |  14 ++
 .../patches/alsa-lib-plugin-dirs.patch        | 149 ++++++++++++++++++
 3 files changed, 164 insertions(+)
 create mode 100644 gnu/packages/patches/alsa-lib-plugin-dirs.patch

-- 
2.26.2





Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 16 May 2020 19:34:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 16 15:34:42 2020
Received: from localhost ([127.0.0.1]:41770 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ja2a2-00040p-7x
	for submit <at> debbugs.gnu.org; Sat, 16 May 2020 15:34:42 -0400
Received: from out5-smtp.messagingengine.com ([66.111.4.29]:41809)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1ja2Zt-00040F-1k
 for 40832 <at> debbugs.gnu.org; Sat, 16 May 2020 15:34:37 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id B65A35C00A5;
 Sat, 16 May 2020 15:34:27 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Sat, 16 May 2020 15:34:27 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=from:to:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding; s=mesmtp; bh=zq1o+p4HRG
 MJ6flIbqy61ulnd0RRk0okH0+oMdpi4a0=; b=hhOfVSP7KEffjUOzKzg98isBzY
 xpjFZnsRzP3EJenfzbuCyluiQ2OrRx9Clbm+0xO9kxNUr0CPuJXuWtQnTOIqxJ2G
 iWFys9gkYAHtZMjrPRIyio5Zc5oJ8VGPUrReM+xhSpVIkc4NlVaF9FXYHtUg+iN8
 dExm/UVUqQKRYVin8=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-transfer-encoding:date:from
 :in-reply-to:message-id:mime-version:references:subject:to
 :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm2; bh=zq1o+p4HRGMJ6flIbqy61ulnd0RRk0okH0+oMdpi4a0=; b=jFlrCseM
 3ai/cmle+fXkbi7B8Nv6kB46P4sDfv5Q+sAM0j0B/pW3Ay+FMeaoXJGecVtMzIJC
 8E+tucx34p+hmD3eHYBh/7zRNJjpBmYJ7ZPqveNepAU4lAn4WqWWXGFT87iGQYV/
 R2IKurrQ5lboT0elpnUVBI8BNPBsgLGM7wBga8HcFzsc9Ytq6OaCStrSIM8LOJFT
 y6d9oXSknT8QaXJQtFL4kqLnEs2b8oTueYxidH+27tUS62Yd9I3xdUvcYfoGsIxP
 2FN9DJv/L3hr0TGDKaAsnm8QSHhFrD0acqFjpqYsVDIixjf++eTJi3saGYOODq/I
 82/9aGru1sbHRg==
X-ME-Sender: <xms:Q0DAXgZc0olr7ReBv1GyZ-xVHc9F-Vmnu83d_KRfKByXw39s1vhViA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddttddgudefjecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke
 ertdertddtnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhl
 rghrihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpefhgeegteeitddvudduveeuhedvhe
 fhfeehgfehvdfhudegueekhedvhfffhffhgeenucfkphepjeeirdduvdegrddufeekrdei
 feenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvg
 hosehfrghmuhhlrghrihdrnhgrmhgv
X-ME-Proxy: <xmx:Q0DAXrauvP4B0hSlzwjvW-MWVsjeOHt8tsdLrKSsGJ2PCpG3hjQryQ>
 <xmx:Q0DAXq8_dtZF2GivVSYfg9NA9zJFkJTUROrRiAzDIFUJP8MOSvtPuA>
 <xmx:Q0DAXqrDx0nTeQqJtONEb6k-Y7V0fHwSj5tYJ-ub5qC27X6Zlvd-1w>
 <xmx:Q0DAXg6_RLrIqGT1HLwdJbA_MWzlMyCfhph74CVu2zDDDgSl_oPLLg>
Received: from jasmine.lan (c-76-124-138-63.hsd1.pa.comcast.net
 [76.124.138.63])
 by mail.messagingengine.com (Postfix) with ESMTPA id 6D577306639A
 for <40832 <at> debbugs.gnu.org>; Sat, 16 May 2020 15:34:27 -0400 (EDT)
From: Leo Famulari <leo@HIDDEN>
To: 40832 <at> debbugs.gnu.org
Subject: [PATCH 1/2] gnu: alsa-plugins: Add GUIX_ALSA_PLUGIN_DIRS search path
 specification.
Date: Sat, 16 May 2020 15:34:00 -0400
Message-Id: <de108ca666c1b4f27945dfb3de06bcfc2f3f4b6c.1589657580.git.leo@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <cover.1589657580.git.leo@HIDDEN>
References: <cover.1589657580.git.leo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/linux.scm (alsa-plugins)[native-search-paths]: New field.
---
 gnu/packages/linux.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 40323a85d6..4fb29b8490 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1858,6 +1858,10 @@ MIDI functionality to the Linux-based operating system.")
               (base32
                "0z9k3ssbfk2ky2w13avgyf202j1drsz9sv3834bp33cj1i2hc3qw"))))
     (build-system gnu-build-system)
+    (native-search-paths
+      (list (search-path-specification
+              (variable "GUIX_ALSA_PLUGIN_DIRS")
+              (files '("lib/alsa-lib")))))
     ;; TODO: Split libavcodec and speex if possible. It looks like they can not
     ;; be split, there are references to both in files.
     ;; TODO: Remove OSS related plugins, they add support to run native
-- 
2.26.2





Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 16 May 2020 19:34:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 16 15:34:42 2020
Received: from localhost ([127.0.0.1]:41768 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ja2Zy-00040j-CV
	for submit <at> debbugs.gnu.org; Sat, 16 May 2020 15:34:42 -0400
Received: from out5-smtp.messagingengine.com ([66.111.4.29]:47459)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1ja2Zt-00040H-1j
 for 40832 <at> debbugs.gnu.org; Sat, 16 May 2020 15:34:37 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id CF6595C00B4;
 Sat, 16 May 2020 15:34:27 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Sat, 16 May 2020 15:34:27 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=from:to:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding; s=mesmtp; bh=usJjXtoBp6
 OjqLZLmxP+FsaRCIVLajc1WkD8rUapuiQ=; b=aN4xN9rriW59/OZMtEvaVa9YJ5
 Kc4pu2vCNCv6AoEoNtIkQAilMeQL2xmeKFxO1KcTKZGHGwMPsA6RSkACAQOJwxAQ
 XcZNEaF46AFu1rIoaUP7DmOlqU0xviXzvcoxEqgcE3q2pWtxTOY/lCoB7Df4//p0
 4ssl8surkD4Ca5R3o=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-transfer-encoding:date:from
 :in-reply-to:message-id:mime-version:references:subject:to
 :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=
 fm2; bh=usJjXtoBp6OjqLZLmxP+FsaRCIVLajc1WkD8rUapuiQ=; b=HVAXRHqz
 L0OqP706g0vwBACkDn53k4+ShqrHZ44R0/f4IZ2plabxxdtxRtthqK/1EjUMHPx8
 F0D8I+qGqKnaz9FBEu/CZE4q5uM5XKyLfxoq8c1zZbXEYYQ3PSiURhyXsoJ5115K
 7cNOeLNxl7fRfVnWgYSZdmljU2ItK7f8HSUp4DttjDuUMXqpXWm9TWecuzQ1y26Q
 tktFY3MbPyfT95Vh547EsTSGNcQjrDbOnh3o2qJgdMh+ZaQOTIDzPeH/YC6fhyQr
 7pqeooWUKk3J8LCZEFmYNxM3sIZmROJklRHojRKeMHRgRNHl1RJ64vQ86FlAUlFv
 t1DNUs7u+xrJTw==
X-ME-Sender: <xms:Q0DAXqKf5A4qMhXP2fRNzc9cyE3vJRCuMCnFupda_lseOBNzJR_Dwg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddttddgudefjecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtke
 ertdertddtnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhl
 rghrihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpefhvdehgfetueehhfehfedvgfdthe
 efkeeuudeltdduudeuveelfeefhfefveekheenucffohhmrghinhepghhnuhdrohhrghen
 ucfkphepjeeirdduvdegrddufeekrdeifeenucevlhhushhtvghrufhiiigvpedtnecurf
 grrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv
X-ME-Proxy: <xmx:Q0DAXiKgEawZXyILFFYiPp_tCNPVTsIIjIr_hRlVaxeZE_8mTnp5QA>
 <xmx:Q0DAXqsSGCy1UO7D74LRqYRTc3AzQEkoPehju1MoXvgKPmvJNzwjKw>
 <xmx:Q0DAXvYAjStVkGPwQlB8oRJ0xlETTunUKYrOo1Zkq8fqc2U18C3RmQ>
 <xmx:Q0DAXhoFLccONrWa5UeGnMhvz4QOCLbk1MZiOb7TWC9AnT7WdET6wg>
Received: from jasmine.lan (c-76-124-138-63.hsd1.pa.comcast.net
 [76.124.138.63])
 by mail.messagingengine.com (Postfix) with ESMTPA id 8FA97306639B
 for <40832 <at> debbugs.gnu.org>; Sat, 16 May 2020 15:34:27 -0400 (EDT)
From: Leo Famulari <leo@HIDDEN>
To: 40832 <at> debbugs.gnu.org
Subject: [PATCH 2/2] gnu: Help alsa-lib find its plugins on foreign distros.
Date: Sat, 16 May 2020 15:34:01 -0400
Message-Id: <30199c186ff45e84c629765a2d23e04ca6737d70.1589657580.git.leo@HIDDEN>
X-Mailer: git-send-email 2.26.2
In-Reply-To: <cover.1589657580.git.leo@HIDDEN>
References: <cover.1589657580.git.leo@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Fixes <https://bugs.gnu.org/40832>.

* gnu/packages/linux.scm (alsa-lib)[replacement]: New field.
(alsa-lib/fixed): New variable.
* gnu/packages/patches/alsa-lib-plugin-dirs.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |   1 +
 gnu/packages/linux.scm                        |  10 ++
 .../patches/alsa-lib-plugin-dirs.patch        | 149 ++++++++++++++++++
 3 files changed, 160 insertions(+)
 create mode 100644 gnu/packages/patches/alsa-lib-plugin-dirs.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 39267f2765..78e63fe7ff 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -741,6 +741,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/akonadi-not-relocatable.patch		\
   %D%/packages/patches/akonadi-timestamps.patch		\
   %D%/packages/patches/allegro-mesa-18.2.5-and-later.patch	\
+  %D%/packages/patches/alsa-lib-plugin-dirs.patch		\
   %D%/packages/patches/amule-crypto-6.patch			\
   %D%/packages/patches/anki-mpv-args.patch			\
   %D%/packages/patches/antiword-CVE-2014-8123.patch			\
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 4fb29b8490..8ea5bb909a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1771,6 +1771,7 @@ intercept and print the system calls executed by the program.")
 (define-public alsa-lib
   (package
     (name "alsa-lib")
+    (replacement alsa-lib/fixed)
     (version "1.2.2")
     (source (origin
              (method url-fetch)
@@ -1792,6 +1793,15 @@ intercept and print the system calls executed by the program.")
 MIDI functionality to the Linux-based operating system.")
     (license license:lgpl2.1+)))
 
+(define alsa-lib/fixed
+  (package
+    (inherit alsa-lib)
+    (source (origin
+              (inherit (package-source alsa-lib))
+              (patches (append
+                         (origin-patches (package-source alsa-lib))
+                         (search-patches "alsa-lib-plugin-dirs.patch")))))))
+
 (define-public alsa-utils
   (package
     (name "alsa-utils")
diff --git a/gnu/packages/patches/alsa-lib-plugin-dirs.patch b/gnu/packages/patches/alsa-lib-plugin-dirs.patch
new file mode 100644
index 0000000000..0d6cb57f4e
--- /dev/null
+++ b/gnu/packages/patches/alsa-lib-plugin-dirs.patch
@@ -0,0 +1,149 @@
+From 5bc1a490fa68187bce15eb9e8305b88ff6fbdbe5 Mon Sep 17 00:00:00 2001
+From: Leo Famulari <leo@HIDDEN>
+Date: Mon, 27 Apr 2020 13:09:54 -0400
+Subject: [PATCH] Search for plugins in $GUIX_ALSA_PLUGIN_DIRS.
+
+* src/control/control.c (snd_ctl_open_conf): If ALSA plugins cannot be found in
+the default locations, look in the directories in $GUIX_ALSA_PLUGIN_DIRS.
+* src/dlmisc.c (snd_dlopen): Likewise.
+* src/pcm/pcm.c (snd_pcm_open_conf): Likewise.
+---
+ src/control/control.c | 35 ++++++++++++++++++++++++++++++++++-
+ src/dlmisc.c          | 26 +++++++++++++++++++++-----
+ src/pcm/pcm.c         | 35 ++++++++++++++++++++++++++++++++++-
+ 3 files changed, 89 insertions(+), 7 deletions(-)
+
+diff --git a/src/control/control.c b/src/control/control.c
+index 27f42135..108a560b 100644
+--- a/src/control/control.c
++++ b/src/control/control.c
+@@ -1342,8 +1342,41 @@ static int snd_ctl_open_conf(snd_ctl_t **ctlp, const char *name,
+ 				err = -ENOMEM;
+ 				goto _err;
+ 			}
++			sprintf(buf1, "%s/libasound_module_pcm_%s.so", ALSA_PLUGIN_DIR, str);
++			if (access(buf1, F_OK) != 0) {
++				const char *plugindirs = getenv("GUIX_ALSA_PLUGIN_DIRS");
++
++				if (plugindirs) {
++					char *plugindirs_copy = alloca(strlen(plugindirs) + 1);
++					if (plugindirs_copy == NULL) {
++						err = -ENOMEM;
++						goto _err;
++					}
++					strcpy(plugindirs_copy, plugindirs);
++					char *saveptr;
++					while (1) {
++						char *dir_tok = strtok_r(plugindirs_copy, ":", &saveptr);
++						if (dir_tok == NULL)
++							break;
++						char *so_file = malloc(strlen(dir_tok) + 1 + strlen(str) + 32);
++						if (so_file == NULL) {
++							err = -ENOMEM;
++							goto _err;
++						}
++
++						sprintf(so_file, "%s/libasound_module_ctl_%s.so", dir_tok, str);
++
++						if (access(so_file, F_OK) == 0) {
++							buf1 = so_file;
++							break;
++						} else {
++							free (so_file);
++						}
++						plugindirs_copy = NULL;
++					}
++				}
++			}
+ 			lib = buf1;
+-			sprintf(buf1, "%s/libasound_module_ctl_%s.so", ALSA_PLUGIN_DIR, str);
+ 		}
+ 	}
+ #ifndef PIC
+diff --git a/src/dlmisc.c b/src/dlmisc.c
+index 8c8f3ff7..b115447c 100644
+--- a/src/dlmisc.c
++++ b/src/dlmisc.c
+@@ -82,11 +82,27 @@ void *snd_dlopen(const char *name, int mode, char *errbuf, size_t errbuflen)
+ 	char *filename = NULL;
+ 
+ 	if (name && name[0] != '/') {
+-		filename = alloca(sizeof(ALSA_PLUGIN_DIR) + 1 + strlen(name) + 1);
+-		if (filename) {
+-			strcpy(filename, ALSA_PLUGIN_DIR);
+-			strcat(filename, "/");
+-			strcat(filename, name);
++		const char *plugindirs = getenv("GUIX_ALSA_PLUGIN_DIRS");
++		if (plugindirs) {
++			char *plugindirs_copy = alloca(strlen(plugindirs) + 1);
++			if (plugindirs_copy == NULL)
++				goto errpath;
++			strcpy(plugindirs_copy, plugindirs);
++			char *saveptr;
++			while (1) {
++				char *dir_tok = strtok_r(plugindirs_copy, ":", &saveptr);
++				if (dir_tok == NULL)
++					break;
++				char *sofilename = malloc(strlen(dir_tok) + 1 + strlen(name) + 1);
++				sprintf(sofilename, "%s/%s" ,dir_tok, name);
++				if (access(sofilename, F_OK) == 0) {
++					filename = sofilename;
++					break;
++				} else {
++					free (sofilename);
++				}
++				plugindirs_copy = NULL;
++			}
+ 			handle = dlopen(filename, mode);
+ 			if (!handle) {
+ 				/* if the filename exists and cannot be opened */
+diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
+index 1064044c..90ba00ac 100644
+--- a/src/pcm/pcm.c
++++ b/src/pcm/pcm.c
+@@ -2578,8 +2578,41 @@ static int snd_pcm_open_conf(snd_pcm_t **pcmp, const char *name,
+ 				err = -ENOMEM;
+ 				goto _err;
+ 			}
+-			lib = buf1;
+ 			sprintf(buf1, "%s/libasound_module_pcm_%s.so", ALSA_PLUGIN_DIR, str);
++			if (access(buf1, F_OK) != 0) {
++				const char *plugindirs = getenv("GUIX_ALSA_PLUGIN_DIRS");
++
++				if (plugindirs) {
++					char *plugindirs_copy = alloca(strlen(plugindirs) + 1);
++					if (plugindirs_copy == NULL) {
++						err = -ENOMEM;
++						goto _err;
++					}
++					strcpy(plugindirs_copy, plugindirs);
++					char *saveptr;
++					while (1) {
++						char *dir_tok = strtok_r(plugindirs_copy, ":", &saveptr);
++						if (dir_tok == NULL)
++							break;
++						char *so_file = malloc(strlen(dir_tok) + 1 + strlen(str) + 32);
++						if (so_file == NULL) {
++							err = -ENOMEM;
++							goto _err;
++						}
++
++						sprintf(so_file, "%s/libasound_module_pcm_%s.so", dir_tok, str);
++
++						if (access(so_file, F_OK) == 0) {
++							buf1 = so_file;
++							break;
++						} else {
++							free (so_file);
++						}
++						plugindirs_copy = NULL;
++					}
++				}
++			}
++			lib = buf1;
+ 		}
+ 	}
+ #ifndef PIC
+-- 
+2.26.2
+
-- 
2.26.2





Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 9 May 2020 05:24:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat May 09 01:24:26 2020
Received: from localhost ([127.0.0.1]:46606 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jXHyL-0005GZ-PU
	for submit <at> debbugs.gnu.org; Sat, 09 May 2020 01:24:25 -0400
Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:38193)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1jXHyK-0005GG-Dq
 for 40832 <at> debbugs.gnu.org; Sat, 09 May 2020 01:24:25 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.west.internal (Postfix) with ESMTP id 4AF83690;
 Sat,  9 May 2020 01:24:18 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Sat, 09 May 2020 01:24:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=date:from:to:subject:message-id:references:mime-version
 :content-type:in-reply-to; s=mesmtp; bh=JsA088OE08hIn+t2a/bEFvW7
 L1C/zsYa5CwOT3KP3Go=; b=EEJtpYcZlqR8X8kys2DvYYXzlK05BaXfoSEdt8UP
 LWM7GMua+CzSuYZYaZsJ40X+DRsjOxSbfzVP+T99s7zpC2a67j6snuWB42oGIL0H
 jSv6xOwznVHkblDbWbdAGE13Ld+MGFyYfbUKZ5MReNrXXWriCqIlB+4wV9E9dPGk
 HnU=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=JsA088
 OE08hIn+t2a/bEFvW7L1C/zsYa5CwOT3KP3Go=; b=XYO/SCcPF92mLDsBhWeADc
 sIRXfPfvfTGhCD3UJPBWVbKSrFh5Gs88/FkqpQH7B0eX2rdUhnpnp7emN6oIiXmn
 52idb4497IVWX3uzMnNg6+bv+sbUdI9P3hNp+yKHIcTIp9kE9kjWGOKHQ/PlW3YT
 pdFJm2vsmi8JV96Ib7+wR9a/PWTYs57NSEA6wNRfIxmD2XNS1RcOSC900rW/p7aI
 wU9KwMoYDAeXvzmwm48IezMInghZLlpwjOWWNP/FakEWa/wtB7Xn2OGcnRq2SAtU
 n+RWFTiNhAbdjQ7QT6B/mLJc9wNJ2y18St8NUay0BACclY97HbbHzYPhteSCQq0w
 ==
X-ME-Sender: <xms:gD62Xq9yWxVV2haOuTH8CIUquZ6oT7La7ep4Jrr3HQ4CgQg1WtSsMA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrkeeggdeklecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjsehgtderre
 dttddvnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhlrghr
 ihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpedukeevgeetkeeltefgiedtjefgjeekff
 duteehvdfhueekudelieekjeefheffteenucfkphepjeeirdduvdegrddufeekrdeifeen
 ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghose
 hfrghmuhhlrghrihdrnhgrmhgv
X-ME-Proxy: <xmx:gD62Xu8Dcl2SX2TtyKUD0zBQTrU2iAJrlwoStANo96ctzoDeIl4HNQ>
 <xmx:gD62XrBTE90i9csH2eScutiE7K2aIMjRn2PjWJXVfNpZR6v28ynXhQ>
 <xmx:gD62XmzLqVNkrexBp8I0-gJac6q0ljhC9eAw9tYF65HWj9fGjTalxw>
 <xmx:gT62XqkGmsCmQFrSTMSIi5S-5WkwosNCR7bLkFbFai9AARoA9RkjuQ>
Received: from localhost (c-76-124-138-63.hsd1.pa.comcast.net [76.124.138.63])
 by mail.messagingengine.com (Postfix) with ESMTPA id AEEC93280059
 for <40832 <at> debbugs.gnu.org>; Sat,  9 May 2020 01:24:16 -0400 (EDT)
Date: Sat, 9 May 2020 01:24:15 -0400
From: Leo Famulari <leo@HIDDEN>
To: 40832 <at> debbugs.gnu.org
Subject: Re: bug#40832: Audacity does not work with PulseAudio
Message-ID: <20200509052415.GA937@HIDDEN>
References: <20200424213727.GA11710@HIDDEN>
 <20200424231524.GA16696@HIDDEN> <87imhjs3oz.fsf@HIDDEN>
 <20200428223908.GB31840@HIDDEN>
 <20200508224518.GA3682@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="J2SCkAp4GZ/dPZZf"
Content-Disposition: inline
In-Reply-To: <20200508224518.GA3682@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Fri, May 08, 2020 at 06:45:18PM -0400, Leo Famulari wrote:
> My current patch is attached...

I already found a lot of problems with patch 3/3... Don't look too
closely at it :)

--J2SCkAp4GZ/dPZZf
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl62PnwACgkQJkb6MLrK
fwic6BAArAFsRCI18olLm+8iFQhS9ARCGyYx0UKXH/5HYCyadM4UoaOn3VL58fZM
OJPaiZxLKiHHYlgegpuWcK5InPcIvlV6lGz9xneYVwJpRpGHpGrc3WEVcSsQKC/K
obTPkzQZx6+AZn3dgp8jA8PslehOvgCFkwrUgUxSM4GJ0wxWolJFu1fQEAN95Psg
9GTQJJC2B0yLcZcH7e9GrDN1q1tp+Om9BSIjwv7LMD+ncggqMNaBAajs1sWyrq9Y
K/9ur3UvrdVnEY+l3GEztSddqPCOjC27seHMEGd92txus16xsP/F/N3H9ZpfLOUZ
oXF9NcWcoqKRDG0DMYvvuEZFbvqx/uTj9a719od7t3GuhS/562NyGJIp/t1FyJHa
tN2xhqK2dSZQsbi6fXziaqW6CJKrUBvPszyVrqjLnuOcW/M8RhnfOCICH4PjkpsA
xmxu/1UK4g2e4e1iwcQnitK0kjO4s3yXcJ+hstSmkvXhuwnfPb27yQ0yL856mbdX
t5ss0Tf0vYC5Wfo9bygPE2AKMhsmV0COBLlnjUTHN1AY0VacGHKnmCcxX/73t9jb
BDG9kkcF+nXu8w39PMi508uLpUA70aAGMDlIkEvlx+z9B1d7UUCtqNGsEImtMTe7
Bcs/rqU+mGlvTaQ4bksddTxcphjWd234zDhqhIDfroSNSlGFQ00=
=zzME
-----END PGP SIGNATURE-----

--J2SCkAp4GZ/dPZZf--




Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 8 May 2020 22:45:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri May 08 18:45:38 2020
Received: from localhost ([127.0.0.1]:46450 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jXBkJ-0001OY-RC
	for submit <at> debbugs.gnu.org; Fri, 08 May 2020 18:45:38 -0400
Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:47393)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1jXBkF-0001OF-Kl
 for 40832 <at> debbugs.gnu.org; Fri, 08 May 2020 18:45:31 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.west.internal (Postfix) with ESMTP id 558C54B5;
 Fri,  8 May 2020 18:45:21 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Fri, 08 May 2020 18:45:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=date:from:to:subject:message-id:references:mime-version
 :content-type:in-reply-to; s=mesmtp; bh=0eOeY0gBdUXhhaPsevCZdPhg
 rTGOfGAlCh7ToLntKpE=; b=KWP1vZQGnT79jFgCEtDI9H+3jG8Rwb+ClSy0AfI7
 swVBVDKfnjrR9LeoEpAlSVBzA4+vL+5tulFwEaAbn8matxNGhUrfSqkpG140BSXf
 OWi87Njx3AOHIqvLFErFKHcAKp7DvstLU/B0iLv9umy3PWYQRt0QHq/OUMSeRUJr
 fmo=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=0eOeY0
 gBdUXhhaPsevCZdPhgrTGOfGAlCh7ToLntKpE=; b=L+58Yyi4n54H35emplFxWc
 CjishPX3QNR0RF8ZPI+WIwxBBHebFqMWOENXxcXI0GdqOul9ROvdoAddvPuiELfg
 Yu3MVxFlRHUBAHQQZdGOPp5Nz57yRTG8v8i9NgkxZGsBNwJvQ+vVk/EqRO7y4jm1
 k4lMXwLqulL/SEg0UZCxnyr+/lssILkpFsn8ZeoURh3IEKY+z9ZlcH7BUT3PfsLw
 LsZeiett8X1+UQodYI3YXnmVZi3XciWQomRcxRrDTFN9nwZJJNcQ3NIxgF/HNqXv
 LQOSXXI2AWwZWpLSNz0lvmTEWoSCTFSv+8tPe5FWmFXtTr9tQbKileKcO5JDlhFA
 ==
X-ME-Sender: <xms:AOG1XqZb4Bi4GbdDmk-h7iHS7_Bx-pAh_wco54cY6ibL7-F__XqpDg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrkeeggddtlecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjsehgtderre
 dttddvnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhlrghr
 ihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpedukeevgeetkeeltefgiedtjefgjeekff
 duteehvdfhueekudelieekjeefheffteenucfkphepjeeirdduvdegrddufeekrdeifeen
 ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghose
 hfrghmuhhlrghrihdrnhgrmhgv
X-ME-Proxy: <xmx:AOG1XpsWkVwiRXAiuPlciI3iu3HmBToHRYDYf47X_VOg4n0wQ84ngw>
 <xmx:AOG1Xnvr-BNpbhhVpsdDKyhlpCHQeCKrnL_cdWPJ4TWGhscgTwhKMg>
 <xmx:AOG1XudkhLyE7QYnwMFUV5bCNKuvq-ne9GzCKYMY50JwHIs1ZTkt3g>
 <xmx:AOG1XvV6cdAZuQJ_rbZsPCGkueMb8p8wU_r6vhh56eFkSr2Gd7Mi7A>
Received: from localhost (c-76-124-138-63.hsd1.pa.comcast.net [76.124.138.63])
 by mail.messagingengine.com (Postfix) with ESMTPA id 9AEDA3280060
 for <40832 <at> debbugs.gnu.org>; Fri,  8 May 2020 18:45:20 -0400 (EDT)
Date: Fri, 8 May 2020 18:45:18 -0400
From: Leo Famulari <leo@HIDDEN>
To: 40832 <at> debbugs.gnu.org
Subject: Re: bug#40832: Audacity does not work with PulseAudio
Message-ID: <20200508224518.GA3682@HIDDEN>
References: <20200424213727.GA11710@HIDDEN>
 <20200424231524.GA16696@HIDDEN> <87imhjs3oz.fsf@HIDDEN>
 <20200428223908.GB31840@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="TRYliJ5NKNqkz5bu"
Content-Disposition: inline
In-Reply-To: <20200428223908.GB31840@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


--TRYliJ5NKNqkz5bu
Content-Type: multipart/mixed; boundary="+QahgC5+KEYLbs62"
Content-Disposition: inline


--+QahgC5+KEYLbs62
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

An update on this:

To begin, I installed alsa-plugins and alsa-plugins:pulseaudio and
configured the build of alsa-lib like this:

"--with-plugindir=/var/guix/profiles/per-user/leo/guix-profile/lib/alsa-lib"

Everything worked that way, but obviously it's not a solution.

Now, I am working on making alsa-lib respect ALSA_PLUGIN_DIRS, which
would be a search path specified by packages that provide ALSA plugins,
such as alsa-plugins. However, so far my attempt fails in another part
of alsa-lib, like this:

------
$ mpg123 -o alsa ~/file.mp3
ALSA lib dlmisc.c:204:(snd_dlsym_verify) unable to verify version for symbol conf_pulse_hook_load_if_running
ALSA lib conf.c:3686:(snd_config_hooks_call) symbol conf_pulse_hook_load_if_running is not defined inside libasound_module_conf_pulse.so
ALSA lib pcm.c:2685:(snd_pcm_open_noupdate) Unknown PCM default
[src/libout123/modules/alsa.c:181] error: cannot open device default
[src/libout123/libout123.c:455] error: Found no driver out of [alsa] working with device <default>.
main: [src/mpg123.c:314] error: out123 error 3: failure loading driver module
------

I don't know why snd_dlsym_verify fails with my patch but succeeds when
using '--with-plugindir'.

My current patch is attached...

--+QahgC5+KEYLbs62
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="alsa-lib-plugin-dirs.patch"
Content-Transfer-Encoding: quoted-printable

=46rom 2dc0cf223a71d2a22ca19eff6c59d55d72028c64 Mon Sep 17 00:00:00 2001
=46rom: Leo Famulari <leo@HIDDEN>
Date: Sun, 26 Apr 2020 20:13:01 -0400
Subject: [PATCH 1/3] gnu: alsa-plugins: Add ALSA_PLUGIN_DIRS search path
 specification.

* gnu/packages/linux.scm (alsa-plugins)[native-search-paths]: New field.
---
 gnu/packages/linux.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 40323a85d6..b451f591ea 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1858,6 +1858,10 @@ MIDI functionality to the Linux-based operating syst=
em.")
               (base32
                "0z9k3ssbfk2ky2w13avgyf202j1drsz9sv3834bp33cj1i2hc3qw"))))
     (build-system gnu-build-system)
+    (native-search-paths
+      (list (search-path-specification
+              (variable "ALSA_PLUGIN_DIRS")
+              (files '("lib/alsa-lib")))))
     ;; TODO: Split libavcodec and speex if possible. It looks like they ca=
n not
     ;; be split, there are references to both in files.
     ;; TODO: Remove OSS related plugins, they add support to run native
--=20
2.26.2


=46rom a9ce47575add9eeb015eb6c605bde01948c5e341 Mon Sep 17 00:00:00 2001
=46rom: Leo Famulari <leo@HIDDEN>
Date: Mon, 27 Apr 2020 01:05:41 -0400
Subject: [PATCH 2/3] gnu: Add the old Nix alsa-lib patch with a graft.

* gnu/packages/linux.scm (alsa-lib)[replacement]: New field.
(alsa-lib/fixed): New variable.
* gnu/packages/patches/alsa-lib.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                        |   1 +
 gnu/packages/linux.scm              |  10 +++
 gnu/packages/patches/alsa-lib.patch | 110 ++++++++++++++++++++++++++++
 3 files changed, 121 insertions(+)
 create mode 100644 gnu/packages/patches/alsa-lib.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 39267f2765..de17670beb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -741,6 +741,7 @@ dist_patch_DATA =3D						\
   %D%/packages/patches/akonadi-not-relocatable.patch		\
   %D%/packages/patches/akonadi-timestamps.patch		\
   %D%/packages/patches/allegro-mesa-18.2.5-and-later.patch	\
+  %D%/packages/patches/alsa-lib.patch				\
   %D%/packages/patches/amule-crypto-6.patch			\
   %D%/packages/patches/anki-mpv-args.patch			\
   %D%/packages/patches/antiword-CVE-2014-8123.patch			\
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index b451f591ea..e0ed8c040d 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1771,6 +1771,7 @@ intercept and print the system calls executed by the =
program.")
 (define-public alsa-lib
   (package
     (name "alsa-lib")
+    (replacement alsa-lib/fixed)
     (version "1.2.2")
     (source (origin
              (method url-fetch)
@@ -1792,6 +1793,15 @@ intercept and print the system calls executed by the=
 program.")
 MIDI functionality to the Linux-based operating system.")
     (license license:lgpl2.1+)))
=20
+(define alsa-lib/fixed
+  (package
+    (inherit alsa-lib)
+    (source (origin
+              (inherit (package-source alsa-lib))
+              (patches (append
+                         (origin-patches (package-source alsa-lib))
+                         (search-patches "alsa-lib.patch")))))))
+
 (define-public alsa-utils
   (package
     (name "alsa-utils")
diff --git a/gnu/packages/patches/alsa-lib.patch b/gnu/packages/patches/als=
a-lib.patch
new file mode 100644
index 0000000000..3cee02aa0c
--- /dev/null
+++ b/gnu/packages/patches/alsa-lib.patch
@@ -0,0 +1,110 @@
+diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
+index 74d1d1a..17ffb12 100644
+--- a/src/pcm/pcm.c
++++ b/src/pcm/pcm.c
+@@ -2042,6 +2042,19 @@ static const char *const build_in_pcms[] =3D {
+ 	NULL
+ };
+=20
++
++// helper funcion used below
++int file_exists(const char * filename)
++{
++	FILE * file;
++	if (file =3D fopen(filename, "r"))
++	{
++		fclose(file);
++		return 1;
++	}
++	return 0;
++}
++
+ static int snd_pcm_open_conf(snd_pcm_t **pcmp, const char *name,
+ 			     snd_config_t *pcm_root, snd_config_t *pcm_conf,
+ 			     snd_pcm_stream_t stream, int mode)
+@@ -2141,8 +2154,38 @@ static int snd_pcm_open_conf(snd_pcm_t **pcmp, cons=
t char *name,
+ 				err =3D -ENOMEM;
+ 				goto _err;
+ 			}
+-			lib =3D buf1;
+ 			sprintf(buf1, "%s/libasound_module_pcm_%s.so", ALSA_PLUGIN_DIR, str);
++			if (!file_exists(buf1)){
++				// try to locate plugin in one of ALSA_PLUGIN_DIRS which is colon sep=
arated list of paths
++				char * pdirs =3D getenv("ALSA_PLUGIN_DIRS");
++
++				if (pdirs){ // env var set?
++					char * saveptr;
++					while (1) {
++						char * dir_tok =3D strtok_r(pdirs, "::::", &saveptr); // "::::" to =
work around bug in glibc and -O2 ? ":" seems to cause a segfault
++						if (dir_tok =3D=3D NULL)
++                            break;
++						char * so_file =3D malloc(strlen(str) + strlen(dir_tok) + 32);
++						if (so_file =3D=3D NULL) {
++							err =3D -ENOMEM;
++							goto _err;
++						}
++
++						sprintf(so_file, "%s/libasound_module_pcm_%s.so", dir_tok, str);
++
++						if (file_exists(so_file)){
++
++							free(buf1);
++							buf1 =3D so_file;
++							break;
++						} else {
++							free (so_file);
++						}
++						pdirs =3D NULL;
++					}
++				}
++			}
++			lib =3D buf1;
+ 		}
+ 	}
+ #ifndef PIC
+
+
+diff --git a/src/control/control.c b/src/control/control.c
+index c090797..137fe57 100644
+--- a/src/control/control.c
++++ b/src/control/control.c
+@@ -854,8 +854,38 @@ static int snd_ctl_open_conf(snd_ctl_t **ctlp, const =
char *name,
+ 				err =3D -ENOMEM;
+ 				goto _err;
+ 			}
++			sprintf(buf1, "%s/libasound_module_pcm_%s.so", ALSA_PLUGIN_DIR, str);
++			if (!file_exists(buf1)){
++				// try to locate plugin in one of ALSA_PLUGIN_DIRS which is colon sep=
arated list of paths
++				char * pdirs =3D getenv("ALSA_PLUGIN_DIRS");
++
++				if (pdirs){ // env var set?
++					char * saveptr;
++					while (1) {
++						char * dir_tok =3D strtok_r(pdirs, "::::", &saveptr); // "::::" to =
work around bug in glibc and -O2 ? ":" seems to cause a segfault
++						if (dir_tok =3D=3D NULL)
++                            break;
++						char * so_file =3D malloc(strlen(str) + strlen(dir_tok) + 32);
++						if (so_file =3D=3D NULL) {
++							err =3D -ENOMEM;
++							goto _err;
++						}
++
++						sprintf(so_file, "%s/libasound_module_ctl_%s.so", dir_tok, str);
++
++						if (file_exists(so_file)){
++
++							free(buf1);
++							buf1 =3D so_file;
++							break;
++						} else {
++							free (so_file);
++						}
++						pdirs =3D NULL;
++					}
++				}
++			}
+ 			lib =3D buf1;
+-			sprintf(buf1, "%s/libasound_module_ctl_%s.so", ALSA_PLUGIN_DIR, str);
+ 		}
+ 	}
+ #ifndef PIC
--=20
2.26.2


=46rom 71c5ccb8f24165bea6154d566056b2474adeebc7 Mon Sep 17 00:00:00 2001
=46rom: Leo Famulari <leo@HIDDEN>
Date: Fri, 8 May 2020 18:27:00 -0400
Subject: [PATCH 3/3] WIP: Make alsa-lib look for ALSA plugins at run-time.

Currently it doesn't work :(

Test on foreign distro with `mpg123 -o alsa ~/file.mp3`.

* gnu/packages/patches/alsa-lib.patch: Make alsa-lib look up plugins in
the directories named in $ALSA_PLUGIN_DIRS.
---
 gnu/packages/patches/alsa-lib.patch | 76 +++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/gnu/packages/patches/alsa-lib.patch b/gnu/packages/patches/als=
a-lib.patch
index 3cee02aa0c..7ca6b7960a 100644
--- a/gnu/packages/patches/alsa-lib.patch
+++ b/gnu/packages/patches/alsa-lib.patch
@@ -108,3 +108,79 @@ index c090797..137fe57 100644
  		}
  	}
  #ifndef PIC
+diff --git a/src/dlmisc.c b/src/dlmisc.c
+index 8c8f3ff7..274d4b84 100644
+--- a/src/dlmisc.c
++++ b/src/dlmisc.c
+@@ -82,19 +82,52 @@ void *snd_dlopen(const char *name, int mode, char *err=
buf, size_t errbuflen)
+ 	char *filename =3D NULL;
+=20
+ 	if (name && name[0] !=3D '/') {
+-		filename =3D alloca(sizeof(ALSA_PLUGIN_DIR) + 1 + strlen(name) + 1);
+-		if (filename) {
+-			strcpy(filename, ALSA_PLUGIN_DIR);
+-			strcat(filename, "/");
+-			strcat(filename, name);
+-			handle =3D dlopen(filename, mode);
+-			if (!handle) {
+-				/* if the filename exists and cannot be opened */
+-				/* return immediately */
+-				if (access(filename, X_OK) =3D=3D 0)
+-					goto errpath;
++                // 'name' is the full library.so name, e.g. libasound_mod=
ule_conf_pulse.so
++		fprintf(stderr, "XXX name is %s\n", name);
++		char * plugindirs =3D getenv("ALSA_PLUGIN_DIRS");
++		fprintf(stderr, "XXX plugindirs are %s\n" ,plugindirs);
++		if (plugindirs) {
++			char * saveptr;
++			while (1) {
++				// See comment in src/control/control.c about "::::"
++				char * dir_tok =3D strtok_r(plugindirs, "::::", &saveptr);
++				if (dir_tok =3D=3D NULL)
++					break;
++				fprintf(stderr, "XXX dir token is %s\n" ,dir_tok);
++				char * so_file =3D malloc(strlen(name) + strlen(dir_tok) + 32);
++				sprintf(so_file, "%s/%s" ,dir_tok, name);
++				// TODO Check if so_file =3D=3D NULL here
++				if (file_exists(so_file)) {
++					fprintf(stderr, "XXX Found the library %s\n" ,so_file);
++					handle =3D dlopen(filename, mode);
++					if (!handle) {
++						/* if the filename exists and cannot be opened */
++						/* return immediately */
++						if (access(filename, X_OK) =3D=3D 0)
++							goto errpath;
++					}
++					break;
++				} else {
++					fprintf(stderr, "XXX Did not find the library %s\n" ,so_file);
++					break;
++				}
+ 			}
+ 		}
++// Cut here:
++//		filename =3D alloca(sizeof(ALSA_PLUGIN_DIR) + 1 + strlen(name) + 1);
++//		if (filename) {
++//			strcpy(filename, ALSA_PLUGIN_DIR);
++//			strcat(filename, "/");
++//			strcat(filename, name);
++//			handle =3D dlopen(filename, mode);
++//			if (!handle) {
++//				/* if the filename exists and cannot be opened */
++//				/* return immediately */
++//				if (access(filename, X_OK) =3D=3D 0)
++//					goto errpath;
++//			}
++//		}
++// ... to here.
+ 	}
+ 	if (!handle) {
+ 		handle =3D dlopen(name, mode);
+@@ -104,6 +137,7 @@ void *snd_dlopen(const char *name, int mode, char *err=
buf, size_t errbuflen)
+ 	return handle;
+ errpath:
+ 	if (errbuf)
++		fprintf(stderr, "XXX couldn't find your thing!\n");
+ 		snprintf(errbuf, errbuflen, "%s: %s", filename, dlerror());
+ #endif
+ 	return NULL;
--=20
2.26.2


--+QahgC5+KEYLbs62--

--TRYliJ5NKNqkz5bu
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl614PoACgkQJkb6MLrK
fwgxNA//YqRuh+ircNhGnq7hP9qGwGMDngvFBgGmjPZFGc0iy+dZBaOA27Gi8ALc
WJHExw51N6aC6ZfQ1OCE5x3j4eJhh7LnqGoGho/x8jwNxBbz0eIHcUtk3IXXxXXJ
huCLkQ70xKBdvAR8l+qor0ksAwg2GvKXW6h6bNbYx2k5HNdGHVuB/FlY2j/shd+K
KVV5UnrlsnvJ8EzNypP3RIV5zVkNtK5mR0toUuD+DjZdvfpeqg3geeod3dCnNHXh
tYYMo5yUZj02riZn8HbEZMSa5IOZl3d1lHdDiZ9aw+N6mqJO1/i+9otMlYZKSIrR
is9zFhDYu3VHMFm/j1WgUj0W5nk+0DG1ebx1dH7orTyI0VhVa4ytPp03IbVmYpV9
0hxb09KvlzSPtQ1Dm8+8yvG3DGzP5E/f3Dfs6AXCwNAEa7kEbvAQGE6tLzMZveQw
Bcr2TeMzGYOcRQB0zEo8XYUBlbyBslwKw533hR5mfGfVL/Jru+motEwzZfsV6nVn
lM262fQ4Rr5Xr61+ISFIgFuO4itr5S3OQrdAn/MJyH+nAeS524noR+v4QfiPNmhX
R8zVlcnDFTwLDwOJWvfkE6H4YmWmRWB4S5jr0xnUznx6dTCtsewrkYnHSrTz4+KM
aZFnTujPtd6dm7I0dlitTbJ+Fw4Zrg3iqEMqAbAX4mvcn711W/c=
=b/jo
-----END PGP SIGNATURE-----

--TRYliJ5NKNqkz5bu--




Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 28 Apr 2020 22:39:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 28 18:39:18 2020
Received: from localhost ([127.0.0.1]:41829 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTYsn-00077B-Oq
	for submit <at> debbugs.gnu.org; Tue, 28 Apr 2020 18:39:17 -0400
Received: from out3-smtp.messagingengine.com ([66.111.4.27]:57319)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1jTYsm-00076x-8d
 for 40832 <at> debbugs.gnu.org; Tue, 28 Apr 2020 18:39:16 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id 28BB85C0526;
 Tue, 28 Apr 2020 18:39:11 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Tue, 28 Apr 2020 18:39:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-type:content-transfer-encoding:in-reply-to; s=mesmtp;
 bh=iiZd/KBT3HCeV92f7pyxMynTOjWzZxNHGw/O2apkXrE=; b=GtZjptvxQe51
 ZPgiXB9i3BX7jFLESSCklQcpN084463x12Iw4zA6T+Fod22oHIF/F1c05gsHV/rw
 hy65cpNvhVZ5BQgZz6+nky8FNWlqPLiz75SOhmXFsRhydv0wC5cSeWxB2+lcbrPB
 AW8LsvfV4wxVIxcw1BosRpgkmGEjEdo=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm2; bh=iiZd/KBT3HCeV92f7pyxMynTOjWzZxNHGw/O2apkX
 rE=; b=QasKYBAUpVqduyehchbK+JUq1FigTGk9UN/ifWaITF0oK23eYH9Sw6YV3
 2kAtXrrPhmLTI/hRg+JChFzNqYzG8Fke4ExKTijOsqeYUelascLzIe2C1ygBSwNj
 TgEvCrf9kHZdCXLOcCsuNz0+xk38nsUgXofIxxp8MYADDBWSZ8CYKjh/+Mclcyiy
 drkMTHdIfG8HA8q6Y7OrGe0pb/9NOuAg/7oMSRFZwlPfsQTi5WkY/aY9TiGMWwUQ
 moTnSbhQ6rrIy+uXDrG6Q9HxdrKn+J/6iPf+b4ZNjPtbPjdsOyI2MIEfcoaqadMr
 sv+HVPGytijwY4fIVwitUplke4DTA==
X-ME-Sender: <xms:jrCoXu4uNtDMvJgyJ6Zxp367pE3AQ2rNLzKgAJAOjnOE-HhX6BlDig>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedriedvgdduudcutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpeffhffvuffkfhggtggugfgjsehtkeertddttdejnecuhfhrohhmpefnvghoucfh
 rghmuhhlrghrihcuoehlvghosehfrghmuhhlrghrihdrnhgrmhgvqeenucffohhmrghinh
 epphhulhhsvgdrshhonecukfhppeejiedruddvgedrudefkedrieefnecuvehluhhsthgv
 rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgvohesfhgrmhhulhgrrh
 hirdhnrghmvg
X-ME-Proxy: <xmx:jrCoXsKmSkhnCZ4-TV9-bl5x4tLL6Zo9AeCSpczxO35OXPe5FNkXkA>
 <xmx:jrCoXgnxaBiyL0UlMGXIniXCurOcJOZu_F3yoVLfboqTk4a1JP687g>
 <xmx:jrCoXpfuanVOCBc7fNqSkK691xM2da004Pw8r4PtNN12Vz0CxJat5w>
 <xmx:j7CoXiK769Jg49hta4xzlSH8Pkx2hbcWOMpHdOebIsX6Bb25jHVlLg>
Received: from localhost (c-76-124-138-63.hsd1.pa.comcast.net [76.124.138.63])
 by mail.messagingengine.com (Postfix) with ESMTPA id 5CD393065ECF;
 Tue, 28 Apr 2020 18:39:10 -0400 (EDT)
Date: Tue, 28 Apr 2020 18:39:08 -0400
From: Leo Famulari <leo@HIDDEN>
To: Ludovic =?iso-8859-1?Q?Court=E8s?= <ludo@HIDDEN>
Subject: Re: bug#40832: Audacity does not work with PulseAudio
Message-ID: <20200428223908.GB31840@HIDDEN>
References: <20200424213727.GA11710@HIDDEN>
 <20200424231524.GA16696@HIDDEN> <87imhjs3oz.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87imhjs3oz.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
Cc: 40832 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Tue, Apr 28, 2020 at 11:25:32PM +0200, Ludovic Courtès wrote:
> Could it be that the problem is in Audacity and not in alsa-lib?

I'm not 100% sure but I don't think so.

The function snd_config_hooks_call() is from alsa-lib I can't find any
way in alsa-lib for it work in this case, even though it aims to work by
default on systems with plugins in '/usr/lib/alsa-lib' or similar.

The lookup is performed in alsa-lib's 'src/dlmisc.c', by the function
snd_dlopen(), and it only looks in the hard-coded path provided by the
ALSA_PLUGIN_DIR C object macro, which ends up being alsa-lib's own store
directory.

> I can do this with mpg123:
> 
> --8<---------------cut here---------------start------------->8---
> $ cat ~/.asoundrc
> pcm.!default {
>     type pulse
> }
> $ mpg123 -o alsa …
> --8<---------------cut here---------------end--------------->8---
> 
> and the sound goes through PulseAudio.

Is that on Guix System or another distro? On Guix System, this is
handled by the service alsa-service-type.

On Debian, using mpg123 from Guix, and with your ~/.asoundrc, it fails
in the same way as Audacity:

------
% mpg123 -o alsa ...
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
	version 1.25.13; written and copyright by Michael Hipp and others
	free software (LGPL) without any warranty but with best wishes
ALSA lib conf.c:3683:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/gnu/store/nyylgcnzmbw8wrn4sna2crl0g7zxxh33-alsa-lib-1.2.2/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
[src/libout123/modules/alsa.c:181] error: cannot open device default
[src/libout123/libout123.c:455] error: Found no driver out of [alsa] working with device <default>.
main: [src/mpg123.c:314] error: out123 error 3: failure loading driver module
------




Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 28 Apr 2020 21:25:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 28 17:25:44 2020
Received: from localhost ([127.0.0.1]:41782 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jTXjb-0005EI-Rm
	for submit <at> debbugs.gnu.org; Tue, 28 Apr 2020 17:25:44 -0400
Received: from eggs.gnu.org ([209.51.188.92]:45230)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jTXja-0005E2-E6
 for 40832 <at> debbugs.gnu.org; Tue, 28 Apr 2020 17:25:42 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41302)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jTXjV-0003gR-4y; Tue, 28 Apr 2020 17:25:37 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=58926 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jTXjS-0005Hc-38; Tue, 28 Apr 2020 17:25:34 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Leo Famulari <leo@HIDDEN>
Subject: Re: bug#40832: Audacity does not work with PulseAudio
References: <20200424213727.GA11710@HIDDEN>
 <20200424231524.GA16696@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 10 =?utf-8?Q?Flor=C3=A9al?= an 228 de la =?utf-8?Q?R?=
 =?utf-8?Q?=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Tue, 28 Apr 2020 23:25:32 +0200
In-Reply-To: <20200424231524.GA16696@HIDDEN> (Leo Famulari's message of
 "Fri, 24 Apr 2020 19:15:24 -0400")
Message-ID: <87imhjs3oz.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40832
Cc: 40832 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Leo Famulari <leo@HIDDEN> skribis:

> When Audacity starts, it prints this line:
>
> ------
> ALSA lib conf.c:3683:(snd_config_hooks_call) Cannot open shared library l=
ibasound_module_conf_pulse.so (/gnu/store/nyylgcnzmbw8wrn4sna2crl0g7zxxh33-=
alsa-lib-1.2.2/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_modul=
e_conf_pulse.so: cannot open shared object file: No such file or directory)
> ------
>
> But, this file exists in the "pulseaudio" output of alsa-plugins, not
> alsa-lib:
>
> /gnu/store/pwsz9hf66na0s9x3ay9qk02vk8l4v8vi-alsa-plugins-1.2.2-pulseaudio=
/lib/alsa-lib/libasound_module_conf_pulse.so

Could it be that the problem is in Audacity and not in alsa-lib?

I can do this with mpg123:

--8<---------------cut here---------------start------------->8---
$ cat ~/.asoundrc
pcm.!default {
    type pulse
}
$ mpg123 -o alsa =E2=80=A6
--8<---------------cut here---------------end--------------->8---

and the sound goes through PulseAudio.

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 26 Apr 2020 20:03:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Apr 26 16:03:53 2020
Received: from localhost ([127.0.0.1]:35005 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jSnVJ-0004rU-2F
	for submit <at> debbugs.gnu.org; Sun, 26 Apr 2020 16:03:53 -0400
Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:37135)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1jSnVE-0004rB-Vs
 for 40832 <at> debbugs.gnu.org; Sun, 26 Apr 2020 16:03:51 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.west.internal (Postfix) with ESMTP id 10C6331E;
 Sun, 26 Apr 2020 16:03:43 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Sun, 26 Apr 2020 16:03:43 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=date:from:to:subject:message-id:references:mime-version
 :content-type:in-reply-to; s=mesmtp; bh=tX6jXRvhWqmrwF7Q7DRghKNT
 kdnPYw70V4Yvo62fdkc=; b=0gzj6VISrf4QhXzjEXIGw0Kabu14d8iJfysriIh9
 sSXmFeXqMpm5USdmjSMRyWCcNw4XvurADZcrj97uC6QBwpDx4Dy66owaZRQOU+Th
 lFkybmMHDLhfO7+co2lwYDslnIbxnWjThnByH1t7Ux6nZ/onNrtl0h7TQf5tYqXn
 4ig=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=tX6jXR
 vhWqmrwF7Q7DRghKNTkdnPYw70V4Yvo62fdkc=; b=R4CRTyHZ5p4+OiMVNMrXXx
 gnRIcOrsi85y0gr3AdXX9L9oGeHYGVtupsXVWmo8avI8wtUK/6TD5btkKoywGA3q
 rIkp+lUbFat2gcld4uTpexJU1xgqvRugH5jTJz8eibKeHMFnoJq/vigmUFs5GThc
 8Btw8tfuz7z4qQT6vMgGogjWHpQEkvVzS+l8WKELHfIE3gNiCO4oBGi6LB9z+Tvn
 CFOESSbAnoNbmkA61dE393MswP1gC3maLItQbvbmA4F4x6HTj9+uo0RaBO5IYj7k
 DqMhxzIYUdB2uTCxlcSofOWkOU/H3ddD0tEsqnYbeoLtks5Xsog36Jcp0z9wVU9g
 ==
X-ME-Sender: <xms:HOmlXgjO774pIFzJ96aIwDfsPXfYmP3j-Sm3tlsyNUOez3aNGKoBYQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrheejgddugeehucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesthdtre
 dttddtvdenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgr
 rhhirdhnrghmvgeqnecukfhppeejiedruddvgedrudefkedrieefnecuvehluhhsthgvrh
 fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgvohesfhgrmhhulhgrrhhi
 rdhnrghmvg
X-ME-Proxy: <xmx:HOmlXqkmRNEpulk0pCRgxhRVuoNXvkLyR1-ZoB_0sr4HGhiRTL6QMw>
 <xmx:HOmlXnXiFs3N_4f1WhcpS-TOVyBPvS7uAi0f1ay8VOuuwG2DtM8mig>
 <xmx:HOmlXntbDkdyZSeQOnVGmSUSt7eScQ_S3dH64yOxTQ6AXKkBPNZtrw>
 <xmx:HumlXs-bCJt8Lk8r9bDjtrGeggTkDofPpQmprZRfHw9sT0tDA_Cidg>
Received: from localhost (c-76-124-138-63.hsd1.pa.comcast.net [76.124.138.63])
 by mail.messagingengine.com (Postfix) with ESMTPA id 4D31B328005E
 for <40832 <at> debbugs.gnu.org>; Sun, 26 Apr 2020 16:03:40 -0400 (EDT)
Date: Sun, 26 Apr 2020 16:03:34 -0400
From: Leo Famulari <leo@HIDDEN>
To: 40832 <at> debbugs.gnu.org
Subject: Re: alsa-lib cannot find its plugins
Message-ID: <20200426200334.GB555@HIDDEN>
References: <20200424231524.GA16696@HIDDEN>
 <20200425040341.GA24170@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20200425040341.GA24170@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

I propose we make alsa-lib respect an environment variable
ALSA_PLUGIN_DIRS, and make that a Guix package search path that matches
'lib/alsa-lib'. I think this will do what we need. Any feedback?




Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.
Changed bug title to 'alsa-lib cannot find its plugins' from 'Audacity does not work with PulseAudio' Request was from Leo Famulari <leo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 25 Apr 2020 04:03:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 25 00:03:55 2020
Received: from localhost ([127.0.0.1]:58345 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jSC2l-00051g-Dx
	for submit <at> debbugs.gnu.org; Sat, 25 Apr 2020 00:03:55 -0400
Received: from out4-smtp.messagingengine.com ([66.111.4.28]:51321)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1jSC2j-00051Q-4Y
 for 40832 <at> debbugs.gnu.org; Sat, 25 Apr 2020 00:03:53 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id BC6455C01D8;
 Sat, 25 Apr 2020 00:03:47 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Sat, 25 Apr 2020 00:03:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=date:from:to:subject:message-id:references:mime-version
 :content-type:in-reply-to; s=mesmtp; bh=5r+QTrNTC+6LOtSWdQXlRj3q
 gnBkAaI3GCavZ8fG0a0=; b=mgA9c81KvFGNqvqjxsT9b06Bt2bh6g4tRXv3pbNg
 s0W82yU33nCkYa3mCFObdXy5D23PZA/sWpXRxFr/9WlWi/l5/zplxC4esRHwbBzf
 GN39eQDoDdElDG5Ked8OVUpKqnPJ+qx+geiJD89GXInOykMCgqCzG3YTfAbcrifm
 5Lw=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=5r+QTr
 NTC+6LOtSWdQXlRj3qgnBkAaI3GCavZ8fG0a0=; b=iRyEj4UgVzbE8RB0JHqOBj
 yaX7MjuxaMUKs+iYcl/9cN6PwUhd095vzQ/vZapzn3TL3cBN15fH+7CQuWcqgz/0
 nbkUhC2W2PLuS13eEsbHs9o35o4YdTY3SGTiT3hSAllsD7W4hzKYJu7fQJAAQjhr
 OaVk3Pcndq7aYogLgrOleelukRJAXrxFq3LeZSZmJ5oMSGBehFlRI0NwPFnnQFmI
 G++3z7ILLd9j/E70+0e90Zy2PT6TR8G7dTIc4j9bC/NI23qyNR6UeU/c8J1jjPe+
 9LjsANjnx/4HPURMYg8lpp3faV6Jj9UETW77hwBTmiGGHsDnX/d4sRytypO2NzOg
 ==
X-ME-Sender: <xms:o7ajXseGl6zOZ3doB0kMrelb7dwMBbp9iwC7CGHYM2R72iA_6boIIg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrhedvgdejkecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjsehttdertd
 dttddvnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhlrghr
 ihdrnhgrmhgvqeenucffohhmrghinhepphhulhhsvgdrshhopdhgihhthhhusgdrtghomh
 enucfkphepjeeirdduvdegrddufeekrdeifeenucevlhhushhtvghrufhiiigvpedtnecu
 rfgrrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv
X-ME-Proxy: <xmx:o7ajXrmVzwTKQIEYAeArH3AF3nXAMnDXMl_vbYNIsxduXEbWAblC-A>
 <xmx:o7ajXnAG5cOpVXhB3fQJ7Jd9Td1Jz1b0F7qUWxN67wK_r-uY-X4_wA>
 <xmx:o7ajXtMfB8WcsRaX4hY03ZHHdx-riU5VPs5clA_kOfISomHyrxmLVQ>
 <xmx:o7ajXoqjFrNNlmDz1PV4U6AZJ2o8MB9rNGvWyvRRmm0GOTaeYrtytQ>
Received: from localhost (c-76-124-138-63.hsd1.pa.comcast.net [76.124.138.63])
 by mail.messagingengine.com (Postfix) with ESMTPA id 59B983065DDB
 for <40832 <at> debbugs.gnu.org>; Sat, 25 Apr 2020 00:03:47 -0400 (EDT)
Date: Sat, 25 Apr 2020 00:03:41 -0400
From: Leo Famulari <leo@HIDDEN>
To: 40832 <at> debbugs.gnu.org
Subject: Re: Audacity does not work with PulseAudio
Message-ID: <20200425040341.GA24170@HIDDEN>
References: <20200424231524.GA16696@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20200424231524.GA16696@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Fri, Apr 24, 2020 at 07:15:24PM -0400, Leo Famulari wrote:
> ------
> ALSA lib conf.c:3683:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/gnu/store/nyylgcnzmbw8wrn4sna2crl0g7zxxh33-alsa-lib-1.2.2/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
> ------

alsa-lib looks for this based on the compile-time constant
ALSA_PLUGIN_DIR, set during configure using --with-plugindir.

This is tricky because alsa-plugins depends on alsa-lib, and there are
also other packages that can provide plugins, like bluez-alsa.

Nixpkgs used to patch alsa-lib to look things up at runtime with an
environment variable, but stopped for some reason. That discussion even
points back to Guix periodically, but no solutions:

https://github.com/NixOS/nixpkgs/issues/6860




Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at 40832 <at> debbugs.gnu.org:


Received: (at 40832) by debbugs.gnu.org; 24 Apr 2020 23:15:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 24 19:15:33 2020
Received: from localhost ([127.0.0.1]:58220 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jS7Xh-0004Sz-C7
	for submit <at> debbugs.gnu.org; Fri, 24 Apr 2020 19:15:33 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:50145)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1jS7Xg-0004Si-5z
 for 40832 <at> debbugs.gnu.org; Fri, 24 Apr 2020 19:15:32 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id 15ABD5C0207;
 Fri, 24 Apr 2020 19:15:27 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Fri, 24 Apr 2020 19:15:27 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=date:from:to:subject:message-id:mime-version:content-type; s=
 mesmtp; bh=ToE6g6o8I/eAZgbEsqp7Movm8NsIpDJ1t0SgrTdd/qo=; b=lsf7v
 H56zeslzQgCJooTkwXZyyjr/H9TDw01pKEtLA5nAZQ5Uw88s6nG/HJni4+w6mu+5
 E2tkHF4DQ8glhbpDERYw7bHzXv2xJgssHwUlN/LiZJjDyv1J1qHwSr4NUdyMGlUN
 nmbPVF075o+Sjy4IkxwRSQ7sPDfqZ1Az0TSfkY=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm2; bh=ToE6g6o8I/eAZgbEsqp7Movm8NsIp
 DJ1t0SgrTdd/qo=; b=iG+RBUlgy4oL5IZjQdW1MHY/bHU2sOK3sVh78n8XS71E/
 0vZwI1zmo3w2oNgtOquGgq8s8x1/9nCrxJE+gpzxzmCdj868Ay3VRenu2ejGKVaq
 ffu5jSqBwJw7faGySPv7YKaRGFrFzkDIaw2Rs08T4Ryhfc0Ulj5IgjcRVQR3WR8h
 eGeqZ2IbRWgMTw9pOUgv/DwYCq36INMjJn6HEl8Y2S/pYmAsHEZwxz/+Ejpwu2RE
 ReZgY/hKtBZkH8yHCaiiUk2qyv9go2HxiODPjG5Iq1eMGN6AHI1tvjGLb4EIAV5a
 mxn169nGsglX8xj6p7sOKnpiBWwAechI/GJoF+weA==
X-ME-Sender: <xms:DnOjXuEj-OIfUa1Rzwnq5Y1ls95SNYK1arVkBDvZQKR0Om--6saL2w>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrhedvgddukecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggusehttdertddttd
 dvnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhlrghrihdr
 nhgrmhgvqeenucffohhmrghinhepphhulhhsvgdrshhonecukfhppeejiedruddvgedrud
 efkedrieefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho
 mheplhgvohesfhgrmhhulhgrrhhirdhnrghmvg
X-ME-Proxy: <xmx:DnOjXrLXgIJPUO9IgKnTYUTrmGoiPSnO2-DuEne6lpOQJQLJHCwY3Q>
 <xmx:DnOjXjj8Dk9I3yV2hFtMSJRBgbIiUEuzpBYvuhL1E4dNwLMmNjPEkA>
 <xmx:DnOjXhnxSWYLz_RQ6yukhoOY-ymHTwLchdTakvHcb3pfviMjrZ43PA>
 <xmx:D3OjXpSuKU28qfg_4wxfv2uWQr6kqrtvQUovGLZWYFMo-pg9rQf3QQ>
Received: from localhost (c-76-124-138-63.hsd1.pa.comcast.net [76.124.138.63])
 by mail.messagingengine.com (Postfix) with ESMTPA id BC2283065DCA
 for <40832 <at> debbugs.gnu.org>; Fri, 24 Apr 2020 19:15:26 -0400 (EDT)
Date: Fri, 24 Apr 2020 19:15:24 -0400
From: Leo Famulari <leo@HIDDEN>
To: 40832 <at> debbugs.gnu.org
Subject: Re: Audacity does not work with PulseAudio
Message-ID: <20200424231524.GA16696@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40832
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

When Audacity starts, it prints this line:

------
ALSA lib conf.c:3683:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/gnu/store/nyylgcnzmbw8wrn4sna2crl0g7zxxh33-alsa-lib-1.2.2/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
------

But, this file exists in the "pulseaudio" output of alsa-plugins, not
alsa-lib:

/gnu/store/pwsz9hf66na0s9x3ay9qk02vk8l4v8vi-alsa-plugins-1.2.2-pulseaudio/lib/alsa-lib/libasound_module_conf_pulse.so

On Debian, this library is found at:

/usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_conf_pulse.so




Information forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 24 Apr 2020 21:37:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 24 17:37:33 2020
Received: from localhost ([127.0.0.1]:58134 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jS60r-000235-7c
	for submit <at> debbugs.gnu.org; Fri, 24 Apr 2020 17:37:33 -0400
Received: from lists.gnu.org ([209.51.188.17]:51146)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1jS60q-00022z-Er
 for submit <at> debbugs.gnu.org; Fri, 24 Apr 2020 17:37:32 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48788)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <leo@HIDDEN>) id 1jS60p-0003nJ-Oe
 for bug-guix@HIDDEN; Fri, 24 Apr 2020 17:37:32 -0400
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,
 DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,
 RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,
 URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1)
 (envelope-from <leo@HIDDEN>) id 1jS60p-0008Nw-5v
 for bug-guix@HIDDEN; Fri, 24 Apr 2020 17:37:31 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:49417)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <leo@HIDDEN>) id 1jS60o-0008NN-LU
 for bug-guix@HIDDEN; Fri, 24 Apr 2020 17:37:30 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id BE1535C02E8;
 Fri, 24 Apr 2020 17:37:29 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute2.internal (MEProxy); Fri, 24 Apr 2020 17:37:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=date:from:to:subject:message-id:mime-version:content-type; s=
 mesmtp; bh=jMeFq1K/fgnGBF8ZyISPijeSZHdmMj8r15FoTevlgI0=; b=lTZ2G
 UIzOlCQ0Of1ZJbVn682tNbZKnxo7PjcNKx9e9/1K6/gF5u7p0ObYHTxtI0u7cNGg
 KRT9gvwzwziGXDtfVZAvVzeyi7+E6Q6ZfqijGNWBxGMVeS7MYMf5hotClN0m27Ix
 QSa70nZ33v+FfcEDM+SXB0q7qZ+Kljh1NYbFpo=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=content-type:date:from:message-id
 :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender
 :x-me-sender:x-sasl-enc; s=fm2; bh=jMeFq1K/fgnGBF8ZyISPijeSZHdmM
 j8r15FoTevlgI0=; b=JIYffughJhxchbL1a7vO2WgjLogvPSVNlSheeiH5X5WMg
 d63Jq56vjfsa3u4Nv3Fk2gGZ6h53IyOlgNqiXB7uduGrxBwRSCvxRAHvRbl2D7wz
 ejwfVtzXPpix6wnB2IscKZTUoRywVUqBRJQTAsasMjv8GQQogVgjqmNsAWdNS/M1
 nAMYsl0XWSUJyhVWhSHzmUJwYDVhe/fPS92buWR1rlT8UjqOsHj05hlM3pIPN5R/
 wF0DTKcYp2Ox2LFyfpZo2QJ0OZMOAwforBjKV+bObeNtGnIUul85xNGN2yNIdLV8
 vEhLD4GOpWopNBGpLIdy5GYg1aY8lM9BLC0yt196A==
X-ME-Sender: <xms:GVyjXleEvjIgjM1n9E_0IErbsvcTo6L_2M6WOtseSKczlwKmZryFHA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrhedugdduheelucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugesthdtredttd
 dtvdenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhi
 rdhnrghmvgeqnecuffhomhgrihhnpegruhgurggtihhthihtvggrmhdrohhrghenucfkph
 epjeeirdduvdegrddufeekrdeifeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr
 mhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv
X-ME-Proxy: <xmx:GVyjXnd4Xdm-gm5GudZgxIo-mwucxISote7cI21sIbAgk5euKxpMBA>
 <xmx:GVyjXpghZoiMPP6ZsV20kIC2MIpl5jEIEIHq_sk6jvaUlHEuKjxvKw>
 <xmx:GVyjXjTnyaybU2tLDx3dfm5tMZz9EEVUXlVsvXtsQH-cdlNBEW3KhA>
 <xmx:GVyjXvEWa1Tz6ucoSvOMkl-kG40DpmH9HlR7VZPLU69DFWRsEZ4rFA>
Received: from localhost (c-76-124-138-63.hsd1.pa.comcast.net [76.124.138.63])
 by mail.messagingengine.com (Postfix) with ESMTPA id 74D42328005E
 for <bug-guix@HIDDEN>; Fri, 24 Apr 2020 17:37:29 -0400 (EDT)
Date: Fri, 24 Apr 2020 17:37:27 -0400
From: Leo Famulari <leo@HIDDEN>
To: bug-guix@HIDDEN
Subject: Audacity does not work with PulseAudio
Message-ID: <20200424213727.GA11710@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Received-SPF: pass client-ip=66.111.4.25; envelope-from=leo@HIDDEN;
 helo=out1-smtp.messagingengine.com
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/24 17:37:29
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic] [fuzzy]
X-Received-From: 66.111.4.25
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

Since I can remember, Guix's Audacity doesn't work with PulseAudio on my
foreign distro (Debian).

Debian's Audacity does work correctly in this regard.

In practice, this means that I cannot play or record audio in Audacity
while any other application is using sound on the system. If I close or
stop those other applications, then Audacity is able to select the
'sysdefault' output sound device and can start working.

I found a few discussions about similar issues [0], and it seems that
Audacity needs alsa-plugins in order to make this work.

I tried installing Audacity along side alsa-plugins,
alsa-plugins:pulseaudio, and pulseaudio, as well as building with them
as dependencies, but it still didn't work.

[0] e.g. https://forum.audacityteam.org/viewtopic.php?t=89278




Acknowledgement sent to Leo Famulari <leo@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#40832; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 29 Jul 2020 11:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.