Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Debian dependency libappindicator1 #5031

Merged
merged 1 commit into from
Mar 19, 2021

Conversation

hiqua
Copy link
Contributor

@hiqua hiqua commented Feb 16, 2021

libappindicator1 has been deprecated by Debian[0] and will not be shipped from
Debian Bullseye on.

Fixes #4761.

[0]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895037

Contributor checklist:

Description

See #4761 (comment) for more details.

I'm still trying thing out and see if there's anything missing.

Update:

Everything is working (including tray icon) on a Debian with no package containing 'libappindicator' or 'libayatana' (supposed to be the replacement) installed. There might be a dependency required to make this work which was just preinstalled on the system I used (a fresh VM on Xfce), but it's hard to guess like this.

According to https://www.electronjs.org/docs/api/tray:

On Linux distributions that only have app indicator support, you have to install libappindicator1 to make the tray icon work.

This seems to indicate that, at the worst case, only the tray icon feature should fail.

libappindicator1 has been deprecated by Debian[0] and will not be shipped from
Debian Bullseye on.

[0]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895037
@hiqua
Copy link
Contributor Author

hiqua commented Feb 24, 2021

What would be the way forward with this? I see these options:

  1. Need more manual testing. I could ask people in the forum if they could remove the dependency and see if anything breaks in Signal. Once we have a few desktop environments.
  2. Need to list the dependency as a recommends. We could try to use the workaround suggested there: Cannot install on Debian bullseye #4761 (comment) (I can't guarantee that I would do this one myself, and it's more code)
  3. Something else?

@hiqua hiqua mentioned this pull request Mar 1, 2021
1 task
@huguitovi
Copy link

I left the following script to solve this in #4866, I leave it for you to try it and see if it works for you, I also use Bullseye. If it doesn't work I send you a copy of my sources.list

#add old source
echo "deb http://deb.debian.org/debian buster main" | sudo tee -a /etc/apt/sources.list

#Update repos & and install signal-desktop w/aptitude
sudo apt update && sudo aptitude install signal-desktop

@hiqua
Copy link
Contributor Author

hiqua commented Mar 1, 2021

@huguitovi asking users to add older sources that will eventually disappear (albeit in some years) is not a proper fix nor future proof. There are also better workarounds already suggested in #4761.

@EvanHahn-Signal
Copy link
Contributor

I'll plan to discuss this with the team this week. My understanding is that Ubuntu currently includes libappindicator by default (more accurately, it's installable by default) but Debian Buster does not. Based on that understanding, it seems like there are a few options here:

  1. Do what we're doing today and require libappindicator. This means Ubuntu users will have no problems, but Debian users will be completely unable to install.
  2. Drop libappindicator completely. This means Ubuntu and Debian users can install the package, but neither will be able to use the system tray any more. Many people use this, though it's not officially supported as a first-class feature.
  3. Vendor libappindicator ourselves. This is a bit of extra work for us, but feels like the right long-term solution.

I don't think we can trivially switch to libayatana because libappindicator is what Electron requires.

Again, I'll discuss with the team this week. Any feedback you have is welcome.

@hiqua
Copy link
Contributor Author

hiqua commented Mar 1, 2021

@EvanHahn-Signal please fully read my answer, you need the following information:

  • Debian Buster currently has the library, the problem is with the next Debian version, Debian Bullseye, which should be released in the next few months (currently available as "testing", so beta version so to speak).
  • Ubuntu currently has the library. But since it's based on Debian, you should expect breakage eventually, possibly for Ubuntu 21.10 or 22.04 (probably not 21.04 though)
  • Electron does not require libappindicator1. See https://github.com/electron/electron/blob/master/docs/api/tray.md#class-tray, section Platform limitations:
    On Linux the app indicator will be used if it is supported, otherwise GtkStatusIcon will be used instead.
    On Linux distributions that only have app indicator support, you have to install libappindicator1 to make the tray icon work.

Meaning that the GTK library is also fine. Worst case, it seems that only the tray icon would break.

So libappindicator1 is one way to make it work, but not the only one. Right now, on my machine, I have no libappindicator* package installed, but the tray icon works. I think the functionality comes from the package libgtk-3-0 which seems to be a dependency for a lot of packages (so likely already installed everywhere).

  • Vendoring libappindicator1 yourselves (until they fix the dependency in Electron itself) would be fine, but it's also not needed.

@EvanHahn-Signal
Copy link
Contributor

Sorry to take forever to respond to this. Merging now!

@EvanHahn-Signal EvanHahn-Signal merged commit c2be9e6 into signalapp:development Mar 19, 2021
@hiqua
Copy link
Contributor Author

hiqua commented Mar 19, 2021

@EvanHahn-Signal not at all! I'm glad I could contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Cannot install on Debian bullseye
3 participants