Max Pyziur wrote:
> Per the subject line, what's the preferred version of
> Signal-Desktop for FC44? I seem to be using one that was
> built for FC29. 
> 
> It works, but ...

I think many folks prefer the Flatpak install.

Outside of that, you can use dpkg on Fedora to install the
offical binary packages from Signal.  I do that with a few
scripts to install and update the package.  Feel free to
review and use/adapt them.

They're attached.

-- 
Todd
#!/bin/bash

# Install signal on fedora using apt/dpkg (thanks to Sergio B)

# Sources:
# https://www.signal.org/download/linux/
# 
https://ask.fedoraproject.org/t/has-anyone-installed-signal-apps-desktop-version-in-fedora/11997/6

expected_fprs=(
    DBA36B5181D0C816F630E889D980A17457F6FB06
    16762A2603D5B6EEA51B0CB378BAECFF0E46390F
)

die() {
    [[ -n $1 ]] && echo "ERROR: $*" >&2
    exit 1
}

# install debian package tools
sudo dnf install apt dpkg keyrings-filesystem

# configure dpkg (it tries to run the non-existant `pager` command by default)
cat <<'EOF' >~/.profile.d/dpkg.sh
# Options for dpkg
#
DPKG_PAGER="less -FRSXMQ"
export DPKG_PAGER
EOF
source ~/.profile.d/dpkg.sh

# add signal keyring and repo
tempdir=$(mktemp -t -d signal-keys.XXXXXX)
[[ -d $tempdir ]] || die "key temp dir ($tempdir) does not exist"
curl --output-dir $tempdir -sSO https://updates.signal.org/desktop/apt/keys.asc
keys=$tempdir/keys.asc
[[ -f $keys ]] || die "key file ($keys) does not exist or is not a file"
fprs=( $(gpg --with-colons --fingerprint --show-keys $keys | awk -F: '/^fpr:/ 
{print $10}') )
if [[ $fprs != $expected_fprs ]]; then
    die "fingerprint mismatch; exptected='${expected_fprs[@]}' 
received='${fprs[@]}'"
fi
keyring_dir=/usr/share/keyrings
if ! [[ -d $keyring_dir ]]; then
    sudo mkdir -p $keyring_dir || die "unable to create $keyring_dir"
fi
keyring=$keyring_dir/signal-desktop-keyring.gpg
gpg --dearmor <$keys | sudo tee -a $keyring >/dev/null
url="https://updates.signal.org/desktop/apt";
dist="xenial"
sources="deb [arch=amd64 signed-by=$keyring] $url $dist main"
sources_list="/etc/apt/sources.list.d/signal-$dist.list"
if ! grep -Fqx "$sources" "$sources_list"; then
    echo "$sources" | sudo tee -a "$sources_list" >/dev/null
fi

# download and install signal package
shopt -s nullglob
pushd /tmp >/dev/null
sudo apt update && sudo apt-get download signal-desktop
deb=$(echo signal-desktop_*_amd64.deb)
if ! [[ -f $deb ]]; then
    exit 'No updated signal-desktop package found.'
fi
sudo setenforce 0
sudo dpkg --force-depends -i "$deb"
sudo setenforce 1
sudo desktop-file-install /usr/share/applications/signal-desktop.desktop
sudo update-mime-database /usr/share/mime
sudo update-desktop-database /usr/share/applications
sudo gtk-update-icon-cache /usr/share/icons/hicolor
sudo rm -f "$deb"
#!/bin/bash

shopt -s nullglob
pushd /tmp >/dev/null
sudo apt-get -qq update
if dpkg -l signal-desktop &>/dev/null; then
    sudo apt list --upgradable |& grep -q signal-desktop || exit
fi
sudo apt-get download signal-desktop
deb=$(echo signal-desktop_*_amd64.deb)
if ! [[ -f $deb ]]; then
    exit 'No updated signal-desktop package found.'
fi
# neuter update-alternatives from postrm; it fails and blocks the upgrade
postrm=/var/lib/dpkg/info/signal-desktop.postrm
sudo sed -E -i.dist~ 's/^if (type update-alt)/if false \&\& \1/' $postrm
sudo setenforce 0
sudo dpkg --force-depends -i "$deb"
sudo setenforce 1
sudo desktop-file-install /usr/share/applications/signal-desktop.desktop
sudo update-mime-database /usr/share/mime
sudo update-desktop-database /usr/share/applications
sudo gtk-update-icon-cache /usr/share/icons/hicolor
sudo rm -f "$deb"

Attachment: signature.asc
Description: PGP signature

-- 
_______________________________________________
users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to