Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 945940 - net-im/signal-desktop-bin-7.35.0 has hard requirement on pulseaudio - should depend on || ( pulseaudio apulse ) instead
Summary: net-im/signal-desktop-bin-7.35.0 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
Assignee: Robert G. Siebeck
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-12-06 01:22 UTC by Alex Barker
Modified: 2025-02-25 13:08 UTC (History)
13 users (show)

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


Attachments
net-im/signal-desktop-bin-7.32.0.ebuild (signal-desktop-bin-7.32.0.ebuild,2.44 KB, application/vnd.gentoo.ebuild)
2024-12-22 21:49 UTC, Evert
Details
signal-desktop-bin-7.40.0.ebuild (signal-desktop-bin-7.40.0.ebuild,2.42 KB, application/vnd.gentoo.ebuild)
2025-02-05 23:39 UTC, Alex Barker
Details
signal-desktop-bin-7.40.1-r1 (signal-desktop-bin-7.40.1-r1.tar,10.00 KB, application/x-tar)
2025-02-10 12:35 UTC, Evert
Details
signal-desktop-bin-7.40.1-r1 (signal-desktop-bin-7.40.1-r1.tar,10.00 KB, application/x-tar)
2025-02-10 13:07 UTC, Evert
Details
signal-desktop-bin-7.40.1-r2 (signal-desktop-bin-7.40.1-r2.tar,10.00 KB, application/x-tar)
2025-02-11 14:27 UTC, Evert
Details
signal-desktop-bin-7.40.1-r3 (signal-desktop-bin-7.40.1-r3.tar,10.00 KB, application/x-tar)
2025-02-11 15:39 UTC, Evert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Barker 2024-12-06 01:22:55 UTC
This appears to be a regression of bug #747775, not sure why use sound was removed and media-libs/libpulse was added instead. Will signal no longer work with apluse? Is there no way to disable sound? I don't really use the desktop client for audio/video calls, so I would rather not introduce pulse audio when nothing else requires it.

Reproducible: Always

Steps to Reproduce:
1. emerge -avu =net-im/signal-desktop-bin-7.35.0
Actual Results:  
The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by media-sound/pulseaudio-daemon-17.0-r1::gentoo[alsa,alsa-plugin]
# required by media-libs/libpulse-17.0::gentoo
# required by net-im/signal-desktop-bin-7.35.0::gentoo
# required by @selected
# required by @world (argument)


Expected Results:  
Installs using media-sound/apulse like it use to in signal-desktop-bin-7.32.0
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-06 10:40:22 UTC
commit fadd3902cf6eceb78a08e2974684d31d5c2a8e09
Author: Robert Siebeck <gentoo.2019@r123.de>
Date:   Thu Dec 5 10:26:54 2024 +0100

    net-im/signal-desktop-bin: add 7.35.0

    Signed-off-by: Robert Siebeck <gentoo.2019@r123.de>
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

Robert, for future reference, could you include any such changes/discussion in the commit message too? Thanks.

I see that it was prompted by https://github.com/gentoo/gentoo/pull/39307#discussion_r1852064873 where juippis found libringrtc-x64.node depends on libpulse.so.0.
Comment 2 Matt Whitlock 2024-12-06 11:12:12 UTC
Since media-libs/libpulse and media-sound/apulse both provide libpulse.so.0, would it be smart to introduce a virtual/libpulse:0 meta-package that depends on either of the aforementioned? Then all packages with a binary dependency on libpulse.so.0 could just depend on the virtual.
Comment 3 Matt Whitlock 2024-12-09 12:41:34 UTC
Attempting to run net-im/signal-desktop-bin-7.35.0 using media-sound/apulse-0.1.13-r3 results in an assertion failure[1] in a "pulse-rs" library at runtime, preventing the app from finishing its startup. Unfortunately, this binary distribution of Signal Desktop does not include debugging info, so no backtrace of the assertion failure could be produced.

thread '<unnamed>' panicked at pulse-rs/src/error.rs:34:9:
assertion failed: err > 0
stack backtrace:
   0:     0x7f6b52f81b25 - <unknown>
   1:     0x7f6b52fa528b - <unknown>
   2:     0x7f6b52f7f73f - <unknown>
   3:     0x7f6b52f82c71 - <unknown>
   4:     0x7f6b52f8294c - <unknown>
   5:     0x7f6b52f832d1 - <unknown>
   6:     0x7f6b52f83103 - <unknown>
   7:     0x7f6b52f81fe9 - <unknown>
   8:     0x7f6b52f82dc4 - <unknown>
   9:     0x7f6b525a62e3 - <unknown>
  10:     0x7f6b525a636c - <unknown>
  11:     0x7f6b52fd6089 - <unknown>
  12:     0x7f6b52fb5d94 - <unknown>
  13:     0x7f6b52fb1545 - <unknown>
  14:     0x7f6b52fae333 - <unknown>
  15:     0x7f6b52fb8caa - <unknown>
  16:     0x7f6b52fb7397 - <unknown>
  17:     0x7f6b52fb7a1a - <unknown>
  18:     0x7f6b52fadd1c - <unknown>
  19:     0x7f6b52faf03a - <unknown>
  20:     0x7f6b52fad697 - <unknown>
  21:     0x7f6b52f615a4 - <unknown>
  22:     0x7f6b52f5cab5 - <unknown>
  23:     0x7f6b52f5b6ff - <unknown>
  24:     0x7f6b526695bc - <unknown>
  25:     0x7f6b5266eac8 - <unknown>
  26:     0x7f6b525d1729 - <unknown>
  27:     0x7f6b52615890 - <unknown>
  28:     0x7f6b526269e2 - <unknown>
  29:     0x55b8ad4bbee1 - <unknown>

[1] https://github.com/mozilla/cubeb-pulse-rs/blob/6bac666467e4a37cf057f0e17e8c9e8a024b060b/pulse-rs/src/error.rs#L34

I downgraded back to net-im/signal-desktop-bin-7.32.0, which still works, while we await a solution.
Comment 4 Evert 2024-12-09 21:24:14 UTC
Kind of the same here.
I have used signal-desktop-bin for a long time without pulseaudio (I'm using ALSA only).
I know about --start-in-tray and --use-tray-icon options and I can live without audio support.
Now net-im/signal-desktop-bin-7.35.0 seems to require pulseaudio (for some reason).
Older versions of signal have been removed from portage.
How can I run signal without pulseaudio?

$ signal-desktop
...
Error: libpulse.so.0: cannot open shared object file: No such file or directory
    at process.func [as dlopen] (node:electron/js2c/node_init:2:2559)
    at Module._extensions..node (node:internal/modules/cjs/loader:1602:18)
    at Object.func [as .node] (node:electron/js2c/node_init:2:2786)
    at Module.load (node:internal/modules/cjs/loader:1295:32)
    at Module._load (node:internal/modules/cjs/loader:1111:12)
    at c._load (node:electron/js2c/node_init:2:16955)
    at Module.require (node:internal/modules/cjs/loader:1318:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> ([REDACTED]/node_modules/@signalapp/ringrtc/dist/ringrtc/Native.js:33:19)
    at Module._compile (node:internal/modules/cjs/loader:1484:14)
App Version: 7.35.0
OS: linux
Comment 5 Evert 2024-12-09 22:29:12 UTC
Found the previous ebuild version somewhere in git.
net-im/signal-desktop-bin-7.32.0 works OK
Comment 6 Marco Leogrande 2024-12-10 04:54:09 UTC
My guess is that the dependency is now mandatory due to:
* https://github.com/signalapp/Signal-Desktop/commit/2a3c1069fbac72027ee6c0aae1ed5f80f3f784d0 (that bumped the dependency on ringrtc to v2.48.6)
* https://github.com/signalapp/ringrtc/commit/2c4f2b3980b7d3c1704f7a6d482f7e7af8de3424 (the actual change in the ringrtc dependency, pointing at some low-level changes in mozilla/cubeb-rs).

In the ringrtc repo, https://github.com/signalapp/ringrtc/issues/59 might be related.
Comment 7 Matt Whitlock 2024-12-10 06:14:34 UTC
(In reply to Marco Leogrande from comment #6)
> In the ringrtc repo, https://github.com/signalapp/ringrtc/issues/59 might be
> related.

That's unrelated. That issue is about a dynamic link error, and it was resolved in Signal Desktop 7.34.

Our issue is about an assertion failure, likely due to apulse's not exactly replicating the API of libpulse. The pulse-rs library in Signal is expecting libpulse to report errors in a certain way and is asserting that it does, but apulse does not satisfy that expectation and does not pass that assertion.

I tried building apulse with -DWITH_TRACE=2, which is supposed to emit at runtime a trace log of all Pulse function calls, but I saw nothing from a failed start of Signal Desktop, so that was not helpful.
Comment 8 Robert Theron Brockman II 2024-12-12 03:04:44 UTC
I have this same problem, and am curious why the old ebuild that still works correctly is not in the portage tree.  Can 7.32.0 be added back until this bug gets fixed?
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-12 03:21:05 UTC
(In reply to Robert Theron Brockman II from comment #8)
> I have this same problem, and am curious why the old ebuild that still works
> correctly is not in the portage tree. 

Nobody added it back yet -- in part because keeping old versions of prebuilt binaries is unattractive and they often stop working if they're for a service.

But it's up to its maintainer in Gentoo, Robert, as to if he wants to do that.

It's also a niche configuration (sorry) and unclear whether upstream Signal are going to fix it. Has it been reported to them at all? I'm not its maintainer in Gentoo, but I'd be far more willing to restore an old version if upstream confirmed they were going to fix it, as opposed to being on the line to keep it indefinitely.
Comment 10 Matt Whitlock 2024-12-12 05:44:58 UTC
(In reply to Sam James from comment #9)
> keeping old versions of prebuilt
> binaries is unattractive

What happened to net-im/signal-desktop (not -bin)? I had the thought to switch to it to patch around this upstream misstep, but it's gone.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-12 05:49:32 UTC
(In reply to Matt Whitlock from comment #10)
> What happened to net-im/signal-desktop (not -bin)? I had the thought to
> switch to it to patch around this upstream misstep, but it's gone.

I don't seem to get any result for git log -p -- net-im/signal-desktop.
Comment 12 Matt Whitlock 2024-12-18 17:37:50 UTC
(In reply to Sam James from comment #11)
> I don't seem to get any result for git log -p -- net-im/signal-desktop.

I must have imagined it, but I really thought I remembered becoming so put off by the enormous number of esoteric dependencies and the extreme amount of build time that I threw in the towel and switched to the binary blob and prayed that it doesn't contain a back door. Maybe the source version was in an overlay. Or maybe I'm remembering some other Electron app.
Comment 13 Evert 2024-12-22 21:49:24 UTC
Created attachment 914781 [details]
net-im/signal-desktop-bin-7.32.0.ebuild

Any reason not to have net-im/signal-desktop (not -bin)?
Signal is Open Source, isn't it?
https://github.com/signalapp/Signal-Desktop

Anyway, here the net-im/signal-desktop-bin-7.32.0 ebuild which still works without pulse ...
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-22 21:57:43 UTC
(In reply to Evert from comment #13)
> Any reason not to have net-im/signal-desktop (not -bin)?
> Signal is Open Source, isn't it?
> https://github.com/signalapp/Signal-Desktop
> 

Try package it and we'll see ;)

node and friends aren't fun to handle.
Comment 15 Timo Ollech 2024-12-30 11:14:35 UTC
I reported the issue upstream to apulse, let's see if that helps:
https://github.com/i-rinat/apulse/issues/127
Comment 16 Alex Barker 2025-02-05 03:40:11 UTC
I managed to get the latest (7.40.0) working with USE=sound (apluse) again.

1. Revert these changes to the ebuild: https://github.com/gentoo/gentoo/pull/39307/files#diff-ae2fd3db2df2dfd2f964104a34026334b38324f29598d9f472aa3767f6b55e32
2. create a symlink: cd /opt/Signal &&  ln -s /usr/lib64/apulse/libpulse.so.0

I am not sure how libpulse.so.0 is suppose to to end up in the LD_LIBRARY_PATH, I am sure there is a better way to accomplish step 2. I don't use the audio on this app so I have no idea if it works, but the app does run without crashing.
Comment 17 Alex Barker 2025-02-05 03:56:55 UTC
you don't even need the second step, `sed -i 's/Exec=/Exec=apulse /g' usr/share/applications/signal-desktop.desktop || die` already took care of it.

This seems to work fine with apulse 🤔
Comment 18 Timo Ollech 2025-02-05 07:55:14 UTC
This issue just got urgent for me - today signal-desktop-bin-7.32.0 refused to synchronize with the mobile client because it is too old.
Comment 19 Matt Whitlock 2025-02-05 10:39:47 UTC
(In reply to Alex Barker from comment #16)
> 1. Revert these changes to the ebuild:
> https://github.com/gentoo/gentoo/pull/39307/files#diff-
> ae2fd3db2df2dfd2f964104a34026334b38324f29598d9f472aa3767f6b55e32

That's not entirely sufficient. Reverting those changes does not allow 7.40.0 to run with USE="-sound". So the sound dependency is still mandatory, and there should not be a USE flag to toggle it. After removing the IUSE and the conditional in RDEPEND, Signal Desktop 7.40.0 *does* work with apulse now. (Or, at least, it starts up with apulse. I don't use the sound stuff, so I don't know if it "works.")
Comment 20 Alex Barker 2025-02-05 15:44:27 UTC
> That's not entirely sufficient. Reverting those changes does not allow 7.40.0 to run with USE="-sound". So the sound dependency is still mandatory, and there should not be a USE flag to toggle it. After removing the IUSE and the conditional in RDEPEND, Signal Desktop 7.40.0 *does* work with apulse now. (Or, at least, it starts up with apulse. I don't use the sound stuff, so I don't know if it "works.")

Oh I see, I missed that the use conditional is incorrect. Instead of making sound optional, we need a flag to switch between media-sound/apulse and media-libs/libpulse making sound mandatory but pulseaudio optional. Mayabe USE="+pulseaudio". This should be trivial to add so I will give it a try tonight.

> This issue just got urgent for me - today signal-desktop-bin-7.32.0 refused to synchronize with the mobile client because it is too old.

I ran into the same issue which prompted me to take a look at this again. I was able to test the call audio with apluse last night and it work as expected so I think we can probably get this shortly.
Comment 21 Matt Whitlock 2025-02-05 16:10:25 UTC
(In reply to Alex Barker from comment #20)
> Instead of making
> sound optional, we need a flag to switch between media-sound/apulse and
> media-libs/libpulse making sound mandatory but pulseaudio optional.

What? You don't need a flag for that. Just do

emerge media-sound/apulse net-im/signal-desktop-bin

The || (any-of) dependency in net-im/signal-desktop-bin will be satisfied by media-sound/apulse if you have it installed (or are installing it concomitantly), and as long as media-sound/apulse remains installed, Portage won't try to install media-libs/libpulse solely on account of net-im/signal-desktop-bin. (You don't even need to keep media-sound/apulse in your world set, as Signal's dependency on it is enough to keep it installed.)
Comment 22 Alex Barker 2025-02-05 23:39:43 UTC
Created attachment 918233 [details]
signal-desktop-bin-7.40.0.ebuild
Comment 23 Zoë Sparks 2025-02-06 10:03:18 UTC
(In reply to Alex Barker from comment #22)
> Created attachment 918233 [details]
> signal-desktop-bin-7.40.0.ebuild

I tried this ebuild and got the same error as Evert on trying to run signal (https://bugs.gentoo.org/945940#c4). I have apulse installed.
Comment 24 Robert Theron Brockman II 2025-02-06 19:48:49 UTC
(In reply to Zoë Sparks from comment #23)
> (In reply to Alex Barker from comment #22)
> > Created attachment 918233 [details]
> > signal-desktop-bin-7.40.0.ebuild
> 
> I tried this ebuild and got the same error as Evert on trying to run signal
> (https://bugs.gentoo.org/945940#c4). I have apulse installed.

Yep, I still have the problem unless I create the symlink as described:

cd /opt/Signal &&  ln -s /usr/lib64/apulse/libpulse.so.0

However with the new ebuild and the symlink Signal works for me again, with sound.  Yay!
Comment 25 Alex Barker 2025-02-07 02:16:53 UTC
how are you two running signal? The .desktop file has been patch to run with apulse which should setup the LD_LIBRARY_PATH for pulseaudio. I suspect your are launching with just signal-desktop.
Comment 26 Matt Whitlock 2025-02-07 03:43:56 UTC
@Alex: Your ebuild works for me with no symlink hackery. I start Signal from the applications menu in Plasma shell.

Nit: It's preferred to omit IUSE="" in an ebuild when it's empty.
Comment 27 Zoë Sparks 2025-02-07 17:09:46 UTC
(In reply to Alex Barker from comment #25)
> how are you two running signal? The .desktop file has been patch to run with
> apulse which should setup the LD_LIBRARY_PATH for pulseaudio. I suspect your
> are launching with just signal-desktop.

Yes, that's true, I just run it from the shell, but that should be supported—this is Gentoo after all. :P Not everyone uses a desktop environment.

I think a more portable and cleaner solution would be to move or rename the `signal-desktop` binary during installation and have `/usr/bin/signal-desktop` be a shell script that invokes the binary with `apulse PATH_TO_SIGNAL_BIN` if apulse is needed. (There's no need to create a symlink; with Alex's recent ebuild `apulse signal-desktop` works in my environment.) I'm not sure if the Gentoo staff would consider that a good solution, but it seems preferable to me to relying on the .desktop file or that symlink.
Comment 28 Zoë Sparks 2025-02-07 17:13:39 UTC
Actually, now that I look, I realize that the ebuild has `/usr/bin/signal-desktop` symlinked to `/opt/Signal/signal-desktop`, so replacing that symlink with a shell script seems pretty unobtrusive.
Comment 29 Zoë Sparks 2025-02-07 17:55:17 UTC
Something almost like this I think:

    #!/bin/sh

    SIGNAL_BIN="/opt/Signal/signal-desktop"

    if [ -z "$(ldconfig -p | grep libpulse)"]; then
        apulse $SIGNAL_BIN
    else
        $SIGNAL_BIN
    fi

Of course, in practice I think the right way to set `SIGNAL_BIN` wouldn't be from within the script but rather using an environment variable set from a file in `/etc/env.d` (as far as I know), to eliminate duplication and allow the path to be changed easily from within the ebuild if need be.
Comment 30 Matt Whitlock 2025-02-07 18:47:59 UTC
(In reply to Zoë Sparks from comment #29)
>     if [ -z "$(ldconfig -p | grep libpulse)"]; then
>         apulse $SIGNAL_BIN
>     else
>         $SIGNAL_BIN
>     fi

That's buggy. Imagine someone has a library called libpulsedriver.so installed. Also, dumping the whole ldconfig cache is slowwwww. Also, you should use 'exec' so the script interpreter doesn't stick around as an extraneous process. And you forgot to forward the arguments.

How about this?:

    exec $(command -v apulse) /opt/Signal/signal-desktop "${@}"

If 'apulse' is found in $PATH, then it'll be launched with /opt/Signal/signal-desktop as its first argument. Otherwise, if no 'apulse' is found, then the $(command) substitution resolves to an empty string, and the command that is actually executed is just /opt/Signal/signal-desktop. (Note, this breaks if 'apulse' is found in a directory whose pathname contains spaces, but who would do that? ;)

Of course, actually the wrapper script needs to be constructed dynamically by the ebuild because the path to the binary is really "${EPREFIX}/opt/Signal/signal-desktop".
Comment 31 Robert Theron Brockman II 2025-02-08 02:29:28 UTC
(In reply to Alex Barker from comment #25)
> how are you two running signal? The .desktop file has been patch to run with
> apulse which should setup the LD_LIBRARY_PATH for pulseaudio. I suspect your
> are launching with just signal-desktop.

Oops, my xfce panel hadn't been updated.  Running signal with apulse from the desktop now works correctly.  Probably still best to have it start cleanly from the command line.
Comment 32 Evert 2025-02-10 12:35:49 UTC
Created attachment 918521 [details]
signal-desktop-bin-7.40.1-r1

Looking to all the above, this works for me.
Please test.
Comment 33 Evert 2025-02-10 13:07:58 UTC
Created attachment 918522 [details]
signal-desktop-bin-7.40.1-r1

The same (pkg_preinst moved after src_install)
Please test.
Comment 34 Alex Barker 2025-02-11 01:37:52 UTC
Is there any benefit to using the pulseaudio use over || ()?

 IUSE="pulseaudio"
 pulseaudio? ( media-libs/libpulse )
 !pulseaudio? ( media-sound/apulse )

VS

  || (
      media-libs/libpulse
      media-sound/apulse
  )


Changing the shell script to:

#!/bin/sh
exec $(command -v apulse) /opt/Signal/signal-desktop "${@}"

as Matt Whitlock suggested would eliminate the need for the entire pkg_preinst block:

pkg_preinst() {
        if ! use pulseaudio; then
                # bug #945940
                sed 's|^exec |exec /usr/bin/apulse |' -i "${ED}/usr/bin/${MY_PN}"
        fi
}
Comment 35 Matt Whitlock 2025-02-11 02:05:52 UTC
The tricky thing here is that, if you use a || dependency in RDEPEND, then the installed package needs to work when either/any of the listed alternatives is installed and must continue working (without needing to be reinstalled) if the set of installed alternatives changes. In particular, Portage will not force a reinstall of net-im/signal-desktop-bin if the user switches between media-libs/libpulse and media-sound/apulse, so you have to install Signal Desktop in a way that is prepared to handle either scenario on the fly at runtime.

If you use an explicit USE flag, then you *can* force a reinstall when switching between dependencies. That said, I prefer the || approach with the dynamically selecting wrapper script, as I suggested.
Comment 36 Evert 2025-02-11 14:27:18 UTC
Created attachment 918753 [details]
signal-desktop-bin-7.40.1-r2

Thanks. I don't really care about one or the other method,
however I did not have any-of media-libs/libpulse media-sound/apulse installed and
    || (
        media-libs/libpulse
        media-sound/apulse
    )
undesirably chooses media-libs/libpulse above media-sound/apulse despite I have USE="-pulseaudio".
So if we want use the || method, I suggest swapping the || deps into apulse first:
    || (
        media-sound/apulse
        media-libs/libpulse
    )

Howewer, I still prefer (IMHO more clean)
    pulseaudio? ( media-libs/libpulse )
    !pulseaudio? ( media-sound/apulse )
over
    || (
        media-sound/apulse
        media-libs/libpulse
    )

Again, please test.
Comment 37 Evert 2025-02-11 15:39:08 UTC
Created attachment 918772 [details]
signal-desktop-bin-7.40.1-r3

Like I said, this would be my preferred ebuild
- respects pulseaudio USE flag
- dynamically uses apulse when present (as per your desirement)
However signal-desktop-bin-7.40.1-r2 would suffice for me as well.
Comment 38 Robert G. Siebeck 2025-02-11 17:23:57 UTC
Thank you all for your valuable suggestions!

I prepared an ebuild for signal-desktop-bin-7.41.0 with the pulseaudio use-flag. When emerging with USE=-pulseaudio, apulse is used as suggested above.

I'd appreciate it if you could test the ebuild and give feedback. Please find the PR here: https://github.com/gentoo/gentoo/pull/40535
Comment 39 Matt Whitlock 2025-02-11 17:31:36 UTC
(In reply to Robert G. Siebeck from comment #38)
> https://github.com/gentoo/gentoo/pull/40535

That PR modifies 7.40.1. It does not add 7.41.0. It also does the questionable symlink rather than using the apulse wrapper. Nak.
Comment 40 Evert 2025-02-11 21:18:01 UTC
Agreed with Matt Whitlock, this is not good.
Please use signal-desktop-bin-7.40.1-r3 attachment 918772 [details] see above.
This (tar file) contains both ebuild and shell-script
- signal-desktop-bin-7.40.1-r3.ebuild
- files/signal-desktop
and should work for all of us.

By the way, I still have one question:
What's the difference between
    IUSE="pulseaudio"
and
    IUSE="+pulseaudio"
? https://devmanual.gentoo.org/ebuild-writing/variables/index.html#iuse doesn't give me any info about the + sign
Comment 41 Matt Whitlock 2025-02-11 21:23:53 UTC
(In reply to Evert from comment #40)
> By the way, I still have one question:
> What's the difference between
>     IUSE="pulseaudio"
> and
>     IUSE="+pulseaudio"
> ? https://devmanual.gentoo.org/ebuild-writing/variables/index.html#iuse
> doesn't give me any info about the + sign

The + prefix turns on the flag by default unless the profile or the user explicitly turns it off.
Comment 42 Robert G. Siebeck 2025-02-17 20:21:11 UTC
I've updated the PR so that it uses the apulse wrapper as suggested and included a bump to 7.42.0
Comment 43 Matt Whitlock 2025-02-17 22:04:10 UTC
That looks much better, but what happens if the package is installed in a prefix?

# emerge --prefix=/gentoo net-im/signal-desktop-bin

Then wouldn't the wrapper script contain the wrong path to the signal-desktop binary? This is why I said…

> Of course, actually the wrapper script needs to be constructed dynamically by the ebuild because the path to the binary is really "${EPREFIX}/opt/Signal/signal-desktop".
Comment 44 Alex Barker 2025-02-25 03:35:45 UTC
I've created https://github.com/robert7k/gentoo/pull/1 to address the prefix issue as well as some comments from juippis. This also bumps the version to 7.43. It would be nice if we could get this merged soon-ish. Please add any comments to the PR.
Comment 45 Evert 2025-02-25 09:55:33 UTC
See comment #36
Please change
    || (
        media-libs/libpulse
        media-sound/apulse
    )
into
    || (
        media-sound/apulse
        media-libs/libpulse
    )
or even better (re)introduce IUSE="pulseaudio"
    pulseaudio? ( media-libs/libpulse )
    !pulseaudio? ( media-sound/apulse )
Comment 46 Larry the Git Cow gentoo-dev 2025-02-25 13:08:34 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=135913dc458143839ec3dab93339a89bd7b3f209

commit 135913dc458143839ec3dab93339a89bd7b3f209
Author:     Robert Siebeck <gentoo.2019@r123.de>
AuthorDate: 2025-02-17 20:30:04 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2025-02-25 13:08:31 +0000

    net-im/signal-desktop-bin: add 7.43.0
    
    Bring back optional support for apulse instead of pulseaudio
    
    Closes: https://bugs.gentoo.org/945940
    Co-authored-by: Alexander Barker <alex@1stleg.com>
    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-7.43.0.ebuild               | 95 ++++++++++++++++++++++
 2 files changed, 96 insertions(+)