Signal Desktop on Fedora

Signal Desktop has been released some time ago and while a native application may have its advantages, it also needs time and effort until it will be available for other platforms.

Binary installation

The install routine for "Debian-based Linux" instructs us to do the following:

 > curl -s | sudo apt-key add -
 > $ echo "deb [arch=amd64] xenial main" | \
 >   sudo tee -a /etc/apt/sources.list.d/signal-xenial.list
 > $ sudo apt update && sudo apt install signal-desktop
With only a Fedora distribution around, we could of course use alien to install the package, but:

$ sudo dnf install alien
Transaction Summary
Install  70 Packages
....let's not and instead do this manually. Luckily, their download directory structure adhers to the Debian Repository Format, so with a bit of fiddling we can produce the necessary URLs:

$ curl -sLO
$ gpg --recv-keys D980A17457F6FB06

$ gpg --verify InRelease
gpg: Signature made Wed 20 Dec 2017 11:43:08 AM PST
gpg:                using RSA key D980A17457F6FB06
gpg: Good signature from "Open Whisper Systems " [unknown]
Primary key fingerprint: DBA3 6B51 81D0 C816 F630  E889 D980 A174 57F6 FB06
The InRelease is signed and contains checksums to the Packages file:

$ curl -sLO
$ sha256sum Packages 
121c0e796cef911240bb39b6d5ebed747202e9be8261808ecbf3fc4641da9e7b  Packages

$ grep 121c0e796cef911240bb39b6d5ebed747202e9be8261808ecbf3fc4641da9e7b InRelease 
121c0e796cef911240bb39b6d5ebed747202e9be8261808ecbf3fc4641da9e7b     2578 main/binary-amd64/Packages
Let's look at the Packages file for the actual packages available for download:

$ egrep '^(Package|SHA256|File|$)' Packages 
Package: signal-desktop
Filename: pool/main/s/signal-desktop/signal-desktop_1.1.0_amd64.deb
SHA256: 74ee408fa5c7047b1f2a7faa2a9fe0d5947f7f960bd7776636705af69a6b1eec

Package: signal-desktop
Filename: pool/main/s/signal-desktop/signal-desktop_1.0.41_amd64.deb
SHA256: 9cf87647e21bbe0c1b81e66f88832fe2ec7e868bf594413eb96f0bf3633a3f25

Package: signal-desktop-beta
Filename: pool/main/s/signal-desktop-beta/signal-desktop-beta_1.1.0-beta.6_amd64.deb
SHA256: a38eb35001618019affba7df4e54ccbb36581d232876e0f1af9622970b38aa12
We decide to use the signal-desktop-beta and continue:

$ curl -sLO
$ sha256sum signal-desktop-beta_1.1.0-beta.6_amd64.deb 
a38eb35001618019affba7df4e54ccbb36581d232876e0f1af9622970b38aa12  signal-desktop-beta_1.1.0-beta.6_amd64.deb
To extract the package, we'll need the dpkg package:

$ sudo dnf install dpkg
$ dpkg -x signal-desktop-beta_1.1.0-beta.6_amd64.deb deb
Check if all libraries are installed:

$ ldd deb/opt/Signal\ Beta/signal-desktop-beta | grep not
Looks good - let's "install" the package in /opt now:
sudo mv deb/opt/Signal\ Beta /opt/
sudo chown -R root:root /opt/Signal\ Beta/
sudo ln -s /opt/Signal\ Beta/signal-desktop-beta /usr/local/bin/signal-desktop-beta
Create desktop shortcut and icons:

mv deb/usr/share/applications/signal-desktop-beta.desktop ~/.local/share/applications/signal-desktop-beta.desktop
rsync -av deb/usr/share/icons/hicolor/ ~/.local/share/icons/hicolor/
The .desktop file should contain something like this:

$ cat  ~/.local/share/applications/signal-desktop-beta.desktop
[Desktop Entry]
Name=Signal Desktop Beta
Comment=Private messaging from your desktop
Exec="/opt/Signal Beta/signal-desktop-beta" %U
With all that in place, Signal Desktop Beta should be ready to go. Don't forget to migrate the data from the old installation!

Build from source

Building from source may need a ton of dependencies, so it may or may not be desirable to install all that on a desktop system. The short version of the install routine would be:

git clone Signal-Desktop-git
cd Signal-Desktop-git

yarn config set cache-folder /usr/local/src/tmp/yarn/
npm config set cache /usr/local/src/tmp/npm/
TMPDIR=/usr/local/src/tmp/ npm install
So far, so good, but then there's some grunt breakage:

$ node_modules/grunt-cli/bin/grunt 
Loading "sass.js" tasks...ERROR
>> Error: ENOENT: no such file or directory, scandir '../node_modules/node-sass/vendor'
Loading "sass.js" tasks...ERROR
>> Error: ENOENT: no such file or directory, scandir '../node_modules/node-sass/vendor'
Warning: Task "sass" not found. Use --force to continue.

Aborted due to warnings.
...TBD :-\