backports/signal-desktop: upgrade to 6.39.1

This commit is contained in:
Antoine Martin 2023-11-24 13:32:21 -05:00
parent 48301f5d48
commit f46361d11d
Signed by: forge
GPG key ID: D62A472A4AA7D541
4 changed files with 73 additions and 62 deletions

View file

@ -1,8 +1,8 @@
# Contributor: Lauren N. Liberda <lauren@selfisekai.rocks>
# Maintainer: Lauren N. Liberda <lauren@selfisekai.rocks>
# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
pkgname=signal-desktop
pkgver=6.18.1
pkgrel=1
pkgver=6.39.1
pkgrel=0
pkgdesc="A messaging app for simple private communication with friends"
url="https://github.com/signalapp/Signal-Desktop/"
# same as electron
@ -18,21 +18,29 @@ depends="
"
makedepends="
alsa-lib-dev
aom-dev
brotli-dev
bsd-compat-headers
cargo
cargo-auditable
cbindgen
clang-dev
cmake
crc32c-dev
dav1d-dev
electron-dev
electron-tasje
ffmpeg-dev
git-lfs
glib-dev
gn
jsoncpp-dev
libavif-dev
libjpeg-turbo-dev
libepoxy-dev
libevent-dev
libvpx-dev
libwebp-dev
lld
llvm-dev
mesa-dev
@ -40,7 +48,6 @@ makedepends="
npm
openh264-dev
openssl-dev
opus-dev
pipewire-dev
protoc
pulseaudio-dev
@ -54,36 +61,35 @@ makedepends="
options="net !check"
# follow signal-desktop package.json -> @signalapp/libsignal-client
_libsignalver=0.22.0
_libsignalver=0.32.1
# follow signal-desktop package.json -> @signalapp/ringrtc
_ringrtcver=2.26.4
_ringrtcver=2.34.1
# follow ringrtc (on version above) -> config/version.properties -> webrtc.version
# downloading tarball generated with abuild snapshot (with gclient dependencies fetched)
_webrtcver=5481c
_webrtcver=5845i
# follow @signalapp/better-sqlite3 (on version in package.json) -> deps/download.js -> TOKENIZER_VERSION
# last bsqlite version: 8.4.3
# last bsqlite version: 8.5.2
_stokenizerver=0.2.1
source="
https://github.com/signalapp/Signal-Desktop/archive/refs/tags/v$pkgver/Signal-Desktop-$pkgver.tar.gz
https://github.com/signalapp/libsignal/archive/refs/tags/v$_libsignalver/libsignal-$_libsignalver.tar.gz
https://github.com/signalapp/ringrtc/archive/refs/tags/v$_ringrtcver/ringrtc-$_ringrtcver.tar.gz
https://s3.sakamoto.pl/lnl-aports-snapshots/webrtc-$_webrtcver.tar.xz
https://s3.sakamoto.pl/lnl-aports-snapshots/webrtc-$_webrtcver.tar.zst
https://github.com/signalapp/Signal-FTS5-Extension/archive/refs/tags/v$_stokenizerver/stokenizer-$_stokenizerver.tar.gz
bettersqlite-use-system-sqlcipher.patch
libsignal-too-new-clang.patch
libsignal-fix-build-rust-1.69.patch
libsignal-auditable.patch
signal-disable-updates.patch
signal-update-links.patch
signal-tasje-whatever-the-fuck-is-ignore-doing-here.patch
signal-show-window-please.patch
ringrtc-webrtc-renamed.patch
webrtc-shared-like-my-wife.patch
webrtc-use-alpine-target.patch
webrtc-clang-debug-info.patch
webrtc-gcc13.patch
signal-desktop
@ -105,7 +111,7 @@ export CPPFLAGS="$CPPFLAGS -D__DATE__= -D__TIME__= -D__TIMESTAMP__="
export CARGO_PROFILE_RELEASE_OPT_LEVEL=2
export CARGO_PROFILE_RELEASE_STRIP="symbols"
export RUSTFLAGS="$RUSTFLAGS -C linker=clang -C link-arg=-fuse-ld=lld"
export RUSTFLAGS="$RUSTFLAGS -C linker=clang"
export YARN_CACHE_FOLDER="$srcdir/.yarn"
@ -118,7 +124,7 @@ snapshot() {
rm -rf src
rm -rf webrtc-$_webrtcver
rm -f webrtc-$_webrtcver.tar
rm -f webrtc-$_webrtcver.tar.xz
rm -f webrtc-$_webrtcver.tar.zst
echo "
solutions = [{
@ -153,10 +159,14 @@ target_cpu_only = True
--exclude-vcs \
webrtc-$_webrtcver
xz -T0 -e -9 -vv -k webrtc-$_webrtcver.tar
zstd --ultra --long -22 -T4 -vv webrtc-$_webrtcver.tar
}
# manual patches
default_prepare() { :; }
prepare() {
default_prepare
msg "Applying patches"
for x in $source; do
case "$x" in
@ -186,27 +196,36 @@ prepare() {
(
cd "$srcdir"/webrtc-$_webrtcver
# opus - https://github.com/signalapp/opus/commit/593419e833acab4d15b4901fe156177fb7315468
local use_system="
brotli
crc32c
dav1d
ffmpeg
fontconfig
freetype
harfbuzz-ng
icu
jsoncpp
libaom
libavif
libdrm
libevent
libjpeg
libpng
libvpx
libwebp
libxml
libxslt
openh264
opus
re2
snappy
woff2
zlib
"
for _lib in $use_system; do
for _lib in $use_system libjpeg_turbo; do
msg "Removing buildscripts for system provided $_lib"
find . -type f -path "*third_party/$_lib/*" \
find . -type f -path "*{third_party,ringrtc}/$_lib/*" \
\! -path "*third_party/$_lib/chromium/*" \
\! -path "*third_party/$_lib/google/*" \
\! -path './base/third_party/icu/*' \
@ -316,15 +335,15 @@ build() {
)
(
cd "$srcdir"/ringrtc-$_ringrtcver/src/rust
cd "$srcdir"/ringrtc-$_ringrtcver
msg "Building libringrtc"
OUTPUT_DIR="$srcdir"/ringrtc-$_ringrtcver/out \
cargo auditable build --features electron --release
cargo auditable build --features electron --release -p ringrtc
mkdir -p ../node/build/linux
cp -fv ../../out/release/libsignaldeswebrtc.so ../node/build/linux/libsignaldeswebrtc.so
cp -fv target/release/libringrtc.so ../node/build/linux/libringrtc-$chromium_arch.node
mkdir -p src/node/build/linux
cp -fv out/release/libsignaldeswebrtc.so src/node/build/linux/libsignaldeswebrtc.so
cp -fv target/release/libringrtc.so src/node/build/linux/libringrtc-$chromium_arch.node
)
(
@ -416,15 +435,6 @@ build() {
utf-8-validate bufferutil fs-xattr \
--nodedir=/usr/include/electron/node_headers --build-from-source
# unnecessary/unused native modules, blobs
find node_modules -type d -path '**/prebuilds' \
\! -path 'node_modules/@signalapp/libsignal-client/prebuilds' -exec rm -r {} \+
find node_modules -type d -path '**/build/*/obj.target' -exec rm -r {} \+
rm -r 'node_modules/@signalapp/libsignal-client/build/'
find node_modules/@signalapp/better-sqlite3 -type f -path 'build/**/*' \
\! -path 'build/Release/better_sqlite3.node' -delete
rm -r 'node_modules/@signalapp/better-sqlite3/tokenizer'
SIGNAL_ENV=production \
tasje pack
}
@ -439,7 +449,7 @@ package() {
install -Dm644 resources/app.asar "$pkgdir"/usr/lib/$pkgname/app.asar
cp -r resources/app.asar.unpacked "$pkgdir"/usr/lib/$pkgname/app.asar.unpacked
install -Dm644 $pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
install -Dm644 signal.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
# this should be in /usr/lib/signal-desktop. however, it does not simply work and I stopped to care
install -Dm755 "$srcdir"/ringrtc-$_ringrtcver/out/release/libsignaldeswebrtc.so "$pkgdir"/usr/lib/libsignaldeswebrtc.so
@ -452,21 +462,20 @@ package() {
}
sha512sums="
e9adc32f15f0f62bfd23adf0de46dea12433e93a585b9ba9fbdbd4000c17b88ddcbf9b65038f2ae232d1b591c9fe3b04e6ced3598a449bffe3b0123ce0c8d3af Signal-Desktop-6.18.1.tar.gz
9483c8d302728d6caa123f1fb9a977c7cb3aea09ecd1d2cfb3b19f2f2c66f884c41e37642c89db4eeeb0d607fddf281ba27ba4bd0a90e43b972d0cbc607e1483 libsignal-0.22.0.tar.gz
684405e325a5c9cc0446b4e8ab949e888bf699f20f8a7bd64cb741c712b6d42b79d87a518720f6393ab667c9bef442dbb85404128302a41c8caf4d33711bb41e ringrtc-2.26.4.tar.gz
ef35942c377a2681ebdea2b68c6d3af0712cd866d143b50479b1e03de274c324b57059ea9f88b5c20d08c3b5b2b0aad8aed52e713aa2eb3da45b642d1aaae418 webrtc-5481c.tar.xz
dc15b9693f22c0e71a1ceebe2bb967b6034dc2e3e1ced1e9be7eeca30e9253ed4c4baa49c6f87536c55118cabf2bc16d6f65f7f1bfcb73640eeb9a9942406dad Signal-Desktop-6.39.1.tar.gz
855f053a1329d12e20f254f607db0c0db9f6e1a3eb10061996da75805bf462a5dee0f4f841ec679980c77da87d600f92a21cd643c36d44e017cb3cbf57003b09 libsignal-0.32.1.tar.gz
ba6cdfeeadab0bec9a10a0ce9bc19a58a060e8dc5b0007e59c38011454bebf112fda0bdc291cc3e995b3e1d468b96a1a85c840b058ed0f57f5cccb3050600dbc ringrtc-2.34.1.tar.gz
1d61be0ff5358251760d7916aced3e4a957c183f9f5313ebff266987d99ada4adec8d4d95a9a94a14539e4f182c3fb6fb574937494afb7a3ae1e9ad9c11871de webrtc-5845i.tar.zst
84a1f2fc29262a12842e94698d124a85b823128e72a493b0be8ea92fbb72c5c268499f4a6827cdedaae06ec73cce4039a39fe5c5d536cbef330e59ba0183da28 stokenizer-0.2.1.tar.gz
be5b4e823543b79175a12314f10c6326d9f0d59f470136962daed4665887006acc05b48b40dc1b67747396d8f6f7d23be298c1e110ccdd35ff9b09d5e6b80bab bettersqlite-use-system-sqlcipher.patch
78be44ef201d9e6e127979a496f7244c8d93e936f85ad8753fea1646e6142f8a0dbff705ba612c8c724d19e6a9e89ccae254719326021818e04cccef452fc308 libsignal-too-new-clang.patch
f2b39498192744fadb7e2b969979653a5bd84af0befcc0a9b2ac60f63a487cc2d0d90a0345c7e884c84b3759c62f07d97c576ef1e2b271bdd993893e26a45c5c libsignal-fix-build-rust-1.69.patch
90d47914e30f095515c47c9ef7c763a7a2583a281228d6ea7e2a3444be670b3ae506c82b4fcea8a228f88f688a43c23c8dcef52b65805d2105287234550718a5 libsignal-auditable.patch
60a45285d885922f5c21f64b761a10efbee9081baf3efa4c8c13abc6a43dc4d27662ed10e239b0fa2071ab9e3a0dbbb4b11d6e3d26fe2b74a19f39e72b74a5bd signal-disable-updates.patch
d50eb5724502df9ea4d795db8cfc27af767c25168d7db2af512e615be7cc2ca290210a9ae78e1abb153c0198677e858ad3d74926c958099d0319295e7d9e7f1d signal-update-links.patch
ae91177b9df6bd5ac5cdbe28e6b591138d2c4b057dde84596ac89fc46e94bf713da18f652346486ebb1c88e7035d595b757b099b160aafa2c7cf103dfb2db8ab signal-tasje-whatever-the-fuck-is-ignore-doing-here.patch
646d303fe58cae3f0896ae0275a66695b902fae6ddde7c568cc9798157dee9f45ceff907bc951fadc4c511d512a73d114b4e4f7c8914e2311c63929d29e1621a signal-show-window-please.patch
ab51b8fdcda1d8811213d2c5d8cb5d8457b478a02e23ce40f36b38ec56d45a3bd7a2d184720c27046f98a27771551cfad93c1290fe93856cc02695d318b33e47 ringrtc-webrtc-renamed.patch
9d92389637cdda83a0a7039fa6c52516d7bc491d0b1e42d5374b9d1f4fa7b9c930642f2dca896da17a2dc3344fa1bb97434c8dddd0539a4fedfd0dec809fc875 webrtc-shared-like-my-wife.patch
354f516a74c5491727afe084ef7688b3e1359d230daa720ffc30b33d3ea7579c9f37a50fbdc5fe2e8dc5322e42a0a39e4ae3449d4cf5b77daed2229bd743028c webrtc-use-alpine-target.patch
209a606c0fa5ee517df4b8492932f20761dced3324e05a669fdf47c06a175aa5d5900e54e822ccd39fd57edfa4e689537e34a3b26918cc5da7a41633f5a1f162 webrtc-gcc13.patch
679b286d8f9f682d4de41402ffa6834d3085981ca5458cf0e02d3faa0c3c05b17f61b49b07b7fa42d9f91e737dc2f4e6086978332bb4111f8e9d3107736147ef webrtc-clang-debug-info.patch
83fe8a7d8514018f8b5c217d3513345842f6037e6877cd5129479f03d91729b32621e814b4bdb0906df1fe825146bc7f1f72664434985e5e93f6df641a019420 webrtc-gcc13.patch
87534e7b5ad7365509eab75629e6bd1a9ed61ee92f7e358405a0abaf0df57de14623fb3894eb082f8785422e5c087e1c50f9e2e5cafbb2529591fd7bf447f7f5 signal-desktop
"

View file

@ -0,0 +1,11 @@
--- ./node/build_node_bridge.py.orig
+++ ./node/build_node_bridge.py
@@ -63,7 +63,7 @@
out_dir = options.out_dir.strip('"') or os.path.join('build', configuration_name)
- cmdline = ['cargo', 'build', '--target', cargo_target, '-p', 'libsignal-node']
+ cmdline = ['cargo', 'auditable', 'build', '--target', cargo_target, '-p', 'libsignal-node']
if configuration_name == 'Release':
cmdline.append('--release')
print("Running '%s'" % (' '.join(cmdline)))

View file

@ -0,0 +1,11 @@
--- ./build/config/compiler/BUILD.gn.orig
+++ ./build/config/compiler/BUILD.gn
@@ -765,7 +765,7 @@
# toolchain has this flag.
# We only use one version of LLVM within a build so there's no need to
# upgrade debug info, which can be expensive since it runs the verifier.
- ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
+ #ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
}
}

View file

@ -8,23 +8,3 @@
#include <string>
--- ./rtc_base/third_party/base64/base64.h.orig
+++ ./rtc_base/third_party/base64/base64.h
@@ -12,6 +12,7 @@
#ifndef RTC_BASE_THIRD_PARTY_BASE64_BASE64_H_
#define RTC_BASE_THIRD_PARTY_BASE64_BASE64_H_
+#include <stdint.h>
#include <string>
#include <vector>
--- ./third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.h.orig
+++ ./third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.h
@@ -16,6 +16,7 @@
#define ABSL_STRINGS_INTERNAL_DAMERAU_LEVENSHTEIN_DISTANCE_H_
#include <numeric>
+#include <stdint.h>
#include <vector>
#include "absl/strings/string_view.h"