Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 747775 - net-im/signal-desktop-bin-1.36.3 has hard requirement on pulseaudio - should depend on || ( pulseaudio apulse ) instead
Summary: net-im/signal-desktop-bin-1.36.3 has hard requirement on pulseaudio - should ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Robert G. Siebeck
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-10-11 09:15 UTC by Michael Moon
Modified: 2020-10-26 14:54 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixed signal-desktop-bin-1.36.3.ebuild (signal-desktop-bin-1.36.3.ebuild,3.38 KB, text/plain)
2020-10-12 07:19 UTC, Michael Moon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Moon 2020-10-11 09:15:29 UTC
portage got quite angry with me today because net-im/signal-desktop-bin-1.36.3 requires media-sound/pulseaudio rather than (pulseaudio || apulse) like many other packages.

I haven't tried to see if it works with apulse yet, I will test and report back.

Meanwhile I've blocked versions other than 1.36.2 which didn't have this requirement, and portage will actually let me do updates.
Comment 1 Scott McClung 2020-10-12 01:19:57 UTC
I have it working in my local overlay with:

|| (
       media-sound/apulse[sdk]
       media-sound/pulseaudio
)
Comment 2 Michael Moon 2020-10-12 06:04:19 UTC
I added this to mine too, seems to work fine
Comment 3 Michael Moon 2020-10-12 07:19:22 UTC
Created attachment 664837 [details]
Fixed signal-desktop-bin-1.36.3.ebuild

Fixed signal-desktop-bin-1.36.3.ebuild with media-sound/pulseaudio -> || ( media-sound/pulseaudio media-sound/apulse[sdk] )
Comment 4 El Goretto 2020-10-12 08:53:41 UTC
Hello,

I must admit I didn't use net-im/signal-desktop-bin for audio or video calls so far (so don't be too harsh ;)) so I wonder: are pulseaudio or apulse even required at all?

Because similar other Electron binary packages (provided by different upstream projects, yes) like net-im/teams and www-client/google-chrome don't rely solely on pulseaudio and are fine with a bare ALSA setup.
Comment 5 El Goretto 2020-10-12 12:51:53 UTC
OK, don't mind my last comment, pulseaudio or apulse is needed for net-im/signal-desktop-bin-1.36.3: otherwise sound (like notifications and all) still works but there is no audio in calls.

Regards,
Elgo
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-10-12 12:53:03 UTC
If it works with apulse, I can add that. Do we need USE=sdk?
Comment 7 Michael Moon 2020-10-12 14:39:01 UTC
Without sdk flag I imagine it won't work from the .desktop shortcut via GUI menu since it would need to be opened under apulse - unless we update the desktop shortcut if apulse is detected?

I haven't tried though, I only use signal infrequently..
Comment 8 SacredRide 2020-10-12 20:07:14 UTC
Removing pulseaudio from RDEPEND in the 1.36.3 ebuild and running with "apulse signal-desktop" works just fine, I can confirm that both speaker and microphone are working.
Comment 9 Michael Moon 2020-10-12 20:15:12 UTC
We've five separate commenters other than Jonas Stein altering assignation, can we change the bug status to confirmed?

Even as original submitter I can only choose unconfirmed or resolved..
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-10-12 20:16:18 UTC
(In reply to Michael Moon from comment #9)
> We've five separate commenters other than Jonas Stein altering assignation,
> can we change the bug status to confirmed?
> 
> Even as original submitter I can only choose unconfirmed or resolved..

CONFIRMED or UNCONFIRMED doesn't change how real the problem is. It's just a formality, we don't use it much in Gentoo.
Comment 11 Larry the Git Cow gentoo-dev 2020-10-12 20:36:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91a244d7155fb9becc0a56604512fa814461b74f

commit 91a244d7155fb9becc0a56604512fa814461b74f
Author:     Robert Siebeck <gentoo.2019@r123.de>
AuthorDate: 2020-10-12 17:36:15 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2020-10-12 20:36:40 +0000

    net-im/signal-desktop-bin: make pulseaudio optional by adding apulse as alternate dependency
    
    Closes: https://bugs.gentoo.org/747775
    Signed-off-by: Robert Siebeck <gentoo.2019@r123.de>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../signal-desktop-bin-1.36.3-r1.ebuild            | 107 +++++++++++++++++++++
 1 file changed, 107 insertions(+)
Comment 12 SacredRide 2020-10-13 10:34:05 UTC
Now it's mandatory to either choose pulseaudio or apulse[sdk]. Choosing USE=sdk for media-sound/apulse, however, doesn't deploy the wrapper "apulse" that is required to eventually run signal-desktop via "$ apulse signal-desktop", which makes the recent change somewhat pointless.

Am I missing anything here?
Comment 13 Michael Moon 2020-10-13 10:38:05 UTC
(In reply to SacredRide from comment #12)
> Now it's mandatory to either choose pulseaudio or apulse[sdk]. Choosing
> USE=sdk for media-sound/apulse, however, doesn't deploy the wrapper "apulse"
> that is required to eventually run signal-desktop via "$ apulse
> signal-desktop", which makes the recent change somewhat pointless.
> 
> Am I missing anything here?

Apulse's 'sdk' use flag installs it as the pulseaudio provider systemwide, meaning that the apulse wrapper script is not required - and in fact doesn't even get installed.
Comment 14 SacredRide 2020-10-13 11:08:07 UTC
Nice. thanks for clarifying
Comment 15 Timo Ollech 2020-10-13 12:52:46 UTC
(In reply to Michael Moon from comment #13)

> Apulse's 'sdk' use flag installs it as the pulseaudio provider systemwide,
> meaning that the apulse wrapper script is not required - and in fact doesn't
> even get installed.

Won't that hurt other programs? Or what exactly does this use flag do? On the apulse github page it says

"By default, libraries from apulse are installed into a separate directory, in order to hide them from all applications.

Most applications in the wild, that support both PulseAudio and ALSA, try to autodetect which sound system is used. First, applications try to start with PulseAudio. Original client libraries fail early if no PulseAudio daemon is running or can be started. Then they switch to ALSA. Decision is made once, at the beginning. It works fine with PulseAudio, but doesn't work with apulse. Latter has no daemons, it happily says that everything is fine, and it's capable of playing audio. Applications then try to call more functions, and eventually touch unimplemented parts, often with crashes. So, libraries are hidden, and become visible only when a program is called through apulse wrapper script."
Comment 16 mAhdi 2020-10-13 14:21:49 UTC
I agree with above, re-compiling apulse with SDK broke some other apps e.g. chromium which expects apulse libraries being in different path.
Comment 17 Michael Moon 2020-10-13 14:26:52 UTC
So y'all want to remove the dep on [sdk] and instead munge the .desktop entry if apulse is found instead of pulseuadio?

That should work fine too I guess, wanna post an updated ebuild?
Comment 18 mAhdi 2020-10-13 14:30:30 UTC
or perhaps it's about missing apulse script when sdk is on which breaks the other apps. Temporarily moved ebuild to local overlay and removed sdk flag, signal works ok (don't need calls on desktop).
Comment 19 SacredRide 2020-10-13 15:46:16 UTC
(In reply to mAhdi from comment #16)
> I agree with above, re-compiling apulse with SDK broke some other apps e.g.
> chromium which expects apulse libraries being in different path.

Latest chromium built with USE=-pulseaudio works OK here with apulse[sdk].
Comment 20 Matt Whitlock 2020-10-15 02:47:59 UTC
net-im/signal-desktop-bin-1.36.3-r1 starts and runs fine here with NEITHER media-sound/pulseaudio NOR media-sound/apulse installed. (I added media-sound/apulse-0 to my /etc/portage/profile/package.provided.)

I understand that I will not be able to use the voice calling feature of Signal. No big loss for me, as I have no need for that.

Perhaps the dependency on || ( media-sound/pulseaudio media-sound/apulse[sdk] ) should be put behind a USE flag. The flag could be enabled by default, but it would be nice to allow those of us who don't care at all about voice features to disable it and avoid the excess dependency.
Comment 21 Daniel Pielmeier gentoo-dev 2020-10-15 17:30:29 UTC
Don't now what is wrong with my setup here but I only got it working with pulseaudio. With apulse[sdk] or apulse[-sdk] I am unable to establish a call. The call screen appears, ringing works too but as soon as the call is answered or I try to access the call settings signal-desktop freezes and I have to kill the process.
Comment 22 Michael Moon 2020-10-16 09:58:43 UTC
If the app is usable without either pulse or apulse (but has no sound), perhaps we need to slap a USE flag or two on it rather than mucking around with how exactly to express the dependency?

Only caveat then would be munging the desktop file to invoke it under apulse if apulse[-sdk] is detected.
Comment 23 Klaus Ethgen 2020-10-18 09:34:32 UTC
Jet another idea: How about using the method, firefox is using to use apulse (without sdk)?

patchelf --set-rpath "${apulselib}" "${ED}${MOZILLA_FIVE_HOME}/libxul.so"
Comment 24 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-10-18 13:30:20 UTC
(In reply to Klaus Ethgen from comment #23)
> Jet another idea: How about using the method, firefox is using to use apulse
> (without sdk)?
> 
> patchelf --set-rpath "${apulselib}" "${ED}${MOZILLA_FIVE_HOME}/libxul.so"

If this works for you, we could do that.

The wild variation in what works for some people and not others is a bit concerning, but we can try express it with USE flags if needed.
Comment 25 Robert G. Siebeck 2020-10-19 20:31:03 UTC
I opened this PR: https://github.com/gentoo/gentoo/pull/17977

I addressed the comments discussed in this issue as follows: a use flag "sound" has been added (enabled by default), which pulls in pulseaudio or apulse. If apulse is installed without the sdk use flag, the .desktop entry for signal is patched so that it is called with the apulse wrapper.
Comment 26 Larry the Git Cow gentoo-dev 2020-10-26 14:54:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=375d23336742354c645f3f1f4791fcd1dc948766

commit 375d23336742354c645f3f1f4791fcd1dc948766
Author:     Robert Siebeck <gentoo.2019@r123.de>
AuthorDate: 2020-10-19 20:25:13 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-10-26 14:54:15 +0000

    net-im/signal-desktop-bin: add new version 1.37.2
    
    Closes: https://bugs.gentoo.org/747775
    Signed-off-by: Robert Siebeck <gentoo.2019@r123.de>
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 net-im/signal-desktop-bin/Manifest                 |   1 +
 .../signal-desktop-bin-1.37.2.ebuild               | 115 +++++++++++++++++++++
 2 files changed, 116 insertions(+)