backports/signal-desktop: upgrade to 6.12.0
This commit is contained in:
parent
e0984e2bc4
commit
79d4c329a0
10 changed files with 294 additions and 119 deletions
|
@ -1,8 +1,8 @@
|
|||
# Contributor: Lauren N. Liberda <lauren@selfisekai.rocks>
|
||||
# Maintainer: Lauren N. Liberda <lauren@selfisekai.rocks>
|
||||
pkgname=signal-desktop
|
||||
pkgver=6.1.0
|
||||
pkgrel=0
|
||||
pkgver=6.12.0
|
||||
pkgrel=1
|
||||
pkgdesc="A messaging app for simple private communication with friends"
|
||||
url="https://github.com/signalapp/Signal-Desktop/"
|
||||
# same as electron
|
||||
|
@ -12,7 +12,9 @@ license="AGPL-3.0-only"
|
|||
# this build system sucks massive ass and does not add needed to anything
|
||||
depends="
|
||||
electron
|
||||
ffmpeg-libs
|
||||
ffmpeg-libavcodec
|
||||
ffmpeg-libavformat
|
||||
ffmpeg-libavutil
|
||||
font-barlow
|
||||
font-eb-garamond
|
||||
font-inter
|
||||
|
@ -24,9 +26,11 @@ makedepends="
|
|||
alsa-lib-dev
|
||||
bsd-compat-headers
|
||||
cargo
|
||||
cbindgen
|
||||
clang-dev
|
||||
cmake
|
||||
electron-dev
|
||||
electron-tasje
|
||||
ffmpeg-dev
|
||||
git-lfs
|
||||
glib-dev
|
||||
|
@ -53,31 +57,35 @@ makedepends="
|
|||
options="net !check"
|
||||
|
||||
# follow signal-desktop package.json -> @signalapp/libsignal-client
|
||||
_libsignalver=0.21.1
|
||||
_libsignalver=0.22.0
|
||||
|
||||
# follow signal-desktop package.json -> ringrtc -> commit title
|
||||
_ringrtcver=2.22.0
|
||||
# follow signal-desktop package.json -> @signalapp/ringrtc
|
||||
_ringrtcver=2.25.2
|
||||
|
||||
# follow ringrtc (on version above) -> config/version.sh -> WEBRTC_VERSION
|
||||
# follow ringrtc (on version above) -> config/version.properties -> webrtc.version
|
||||
# downloading tarball generated with abuild snapshot (with gclient dependencies fetched)
|
||||
_webrtcver=5005b
|
||||
_webrtcver=5481
|
||||
|
||||
# follow @signalapp/better-sqlite3 (on version in package.json) -> deps/download.js -> TOKENIZER_VERSION
|
||||
# last bsqlite version: 8.4.3
|
||||
_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://github.com/signalapp/Signal-FTS5-Extension/archive/refs/tags/v$_stokenizerver/stokenizer-$_stokenizerver.tar.gz
|
||||
|
||||
bettersqlite-use-system-sqlcipher.patch
|
||||
signal-build-expire-time.patch
|
||||
libsignal-too-new-clang.patch
|
||||
signal-disable-updates.patch
|
||||
signal-update-links.patch
|
||||
webrtc-canonicalize-file-name.patch
|
||||
signal-tasje-whatever-the-fuck-is-ignore-doing-here.patch
|
||||
webrtc-use-alpine-target.patch
|
||||
webrtc-no-shared-deps-in-static-lib.patch
|
||||
|
||||
signal-desktop
|
||||
signal-desktop.desktop
|
||||
"
|
||||
builddir="$srcdir/Signal-Desktop-$pkgver"
|
||||
|
||||
|
@ -90,12 +98,13 @@ export NM=llvm-nm
|
|||
export LD=clang++
|
||||
|
||||
# less log spam, reproducible, allow lto with rust
|
||||
export CFLAGS="${CFLAGS/-g/} -O2 -Wno-deprecated-builtins -Wno-unknown-warning-option -Wno-builtin-macro-redefined"
|
||||
export CXXFLAGS="${CXXFLAGS/-g/} -O2 -Wno-deprecated-builtins -Wno-unknown-warning-option -Wno-builtin-macro-redefined"
|
||||
export CFLAGS="${CFLAGS/-g/} -O2 -Wno-error -Wno-deprecated-builtins -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations"
|
||||
export CXXFLAGS="${CXXFLAGS/-g/} -O2 -Wno-error -Wno-deprecated-builtins -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations"
|
||||
export CPPFLAGS="$CPPFLAGS -D__DATE__= -D__TIME__= -D__TIMESTAMP__="
|
||||
|
||||
export CARGO_PROFILE_RELEASE_OPT_LEVEL=2
|
||||
export CARGO_PROFILE_RELEASE_STRIP="symbols"
|
||||
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
|
||||
export RUSTFLAGS="$RUSTFLAGS -C linker=clang -C link-arg=-fuse-ld=lld"
|
||||
|
||||
export YARN_CACHE_FOLDER="$srcdir/.yarn"
|
||||
|
@ -105,12 +114,18 @@ snapshot() {
|
|||
mkdir -p "$srcdir"
|
||||
cd "$srcdir"
|
||||
|
||||
# cleanup if retrying
|
||||
rm -rf src
|
||||
rm -rf webrtc-$_webrtcver
|
||||
rm -f webrtc-$_webrtcver.tar
|
||||
rm -f webrtc-$_webrtcver.tar.xz
|
||||
|
||||
echo "
|
||||
solutions = [{
|
||||
'name': 'src',
|
||||
'url': 'https://github.com/signalapp/webrtc.git@$_webrtcver',
|
||||
}]
|
||||
target_cpu = ['x64']
|
||||
target_cpu = ['x64', 'arm64']
|
||||
target_cpu_only = True
|
||||
" > .gclient
|
||||
|
||||
|
@ -132,6 +147,7 @@ target_cpu_only = True
|
|||
--exclude="testdata/" \
|
||||
--exclude="test_data/" \
|
||||
--exclude="android_rust_toolchain/toolchain/" \
|
||||
--exclude="base/" \
|
||||
--exclude-backups \
|
||||
--exclude-caches-all \
|
||||
--exclude-vcs \
|
||||
|
@ -141,9 +157,6 @@ target_cpu_only = True
|
|||
}
|
||||
|
||||
prepare() {
|
||||
ln -s "$srcdir"/webrtc-$_webrtcver "$srcdir"/ringrtc-$_ringrtcver/src/webrtc
|
||||
ln -sf "$srcdir"/ringrtc-$_ringrtcver/src "$srcdir"/webrtc-$_webrtcver/ringrtc
|
||||
|
||||
msg "Applying patches"
|
||||
for x in $source; do
|
||||
case "$x" in
|
||||
|
@ -151,6 +164,10 @@ prepare() {
|
|||
msg "$x"
|
||||
patch -p1 -i "$srcdir"/$x -d "$srcdir"/Signal-Desktop-$pkgver
|
||||
;;
|
||||
libsignal-*.patch)
|
||||
msg "$x"
|
||||
patch -p1 -i "$srcdir"/$x -d "$srcdir"/libsignal-$_libsignalver
|
||||
;;
|
||||
ringrtc-*.patch)
|
||||
msg "$x"
|
||||
patch -p1 -i "$srcdir"/$x -d "$srcdir"/ringrtc-$_ringrtcver
|
||||
|
@ -208,6 +225,30 @@ prepare() {
|
|||
# allow system dependencies in "official builds"
|
||||
sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
|
||||
tools/generate_shim_headers/generate_shim_headers.py
|
||||
|
||||
mkdir path
|
||||
ln -s /usr/bin/python3 path/vpython3
|
||||
)
|
||||
|
||||
(
|
||||
cd "$srcdir"/ringrtc-$_ringrtcver/src/rust
|
||||
|
||||
msg "Installing ringrtc rust dependencies"
|
||||
cargo fetch --target="$CTARGET" --locked
|
||||
)
|
||||
|
||||
(
|
||||
cd "$srcdir"/libsignal-$_libsignalver
|
||||
|
||||
msg "Installing libsignal rust dependencies"
|
||||
cargo fetch --target="$CTARGET" --locked
|
||||
)
|
||||
|
||||
(
|
||||
cd "$srcdir"/Signal-FTS5-Extension-$_stokenizerver
|
||||
|
||||
msg "Installing signal tokenizer rust dependencies"
|
||||
cargo fetch --target="$CTARGET" --locked
|
||||
)
|
||||
|
||||
(
|
||||
|
@ -237,7 +278,9 @@ build() {
|
|||
# required dependency of ringrtc
|
||||
(
|
||||
cd "$srcdir"/webrtc-$_webrtcver
|
||||
export PATH="$PWD/path:$PATH"
|
||||
|
||||
# shellcheck disable=2089
|
||||
local webrtc_args="
|
||||
rtc_build_examples=false
|
||||
rtc_build_tools=false
|
||||
|
@ -251,6 +294,7 @@ build() {
|
|||
build_with_mozilla=false
|
||||
chrome_pgo_phase=0
|
||||
clang_use_chrome_plugins=false
|
||||
clang_base_path=\"/usr\"
|
||||
custom_toolchain=\"//build/toolchain/linux/unbundle:default\"
|
||||
is_cfi=false
|
||||
is_clang=true
|
||||
|
@ -269,15 +313,11 @@ build() {
|
|||
"
|
||||
mkdir -p "$srcdir"/ringrtc-$_ringrtcver/out/release
|
||||
msg "Building signal's webrtc"
|
||||
# shellcheck disable=2090,2116
|
||||
gn gen "$srcdir"/ringrtc-$_ringrtcver/out/release --args="$(echo $webrtc_args)"
|
||||
ninja -C "$srcdir"/ringrtc-$_ringrtcver/out/release webrtc
|
||||
)
|
||||
|
||||
# add lto for the remaining c steps (sqlite)
|
||||
export CFLAGS="$CFLAGS -flto"
|
||||
export CXXFLAGS="$CXXFLAGS -flto"
|
||||
export LDFLAGS="$LDFLAGS -flto -fuse-ld=lld"
|
||||
|
||||
(
|
||||
cd "$srcdir"/ringrtc-$_ringrtcver/src/rust
|
||||
|
||||
|
@ -292,6 +332,9 @@ build() {
|
|||
cd "$srcdir"/ringrtc-$_ringrtcver/src/node
|
||||
msg "Building ringrtc JS glue code"
|
||||
yarn build
|
||||
|
||||
msg "Cleaning dev dependencies for ringrtc"
|
||||
yarn --ignore-scripts --frozen-lockfile --production
|
||||
)
|
||||
|
||||
# module on npm intentionally unbuildable: https://github.com/signalapp/libsignal/issues/464#issuecomment-1160665052
|
||||
|
@ -307,6 +350,17 @@ build() {
|
|||
|
||||
msg "Building libsignal glue code"
|
||||
yarn tsc
|
||||
|
||||
msg "Cleaning dev dependencies for libsignal"
|
||||
yarn --ignore-scripts --frozen-lockfile --production
|
||||
)
|
||||
|
||||
(
|
||||
cd "$srcdir"/Signal-FTS5-Extension-$_stokenizerver
|
||||
|
||||
msg "Building signal tokenizer"
|
||||
cargo build --features extension --release --frozen
|
||||
cbindgen --profile release . -o target/release/signal-tokenizer.h
|
||||
)
|
||||
|
||||
# from package.json postinstall
|
||||
|
@ -314,41 +368,66 @@ build() {
|
|||
yarn patch-package
|
||||
rm -rf node_modules/dtrace-provider
|
||||
|
||||
# get esbuild installed (needed for next step)
|
||||
npm rebuild esbuild
|
||||
|
||||
# build front
|
||||
NODE_ENV=production \
|
||||
SIGNAL_ENV=production \
|
||||
NODE_OPTIONS=--openssl-legacy-provider \
|
||||
yarn build:dev
|
||||
|
||||
# purge non-production deps
|
||||
yarn install --ignore-scripts --frozen-lockfile --production
|
||||
|
||||
# XXX: the previous step undoes the patches. and removes the patch applier.
|
||||
# please force me to just implement packaging without dev modules in tasje. -lnl
|
||||
for x in patches/*.patch; do
|
||||
# some of these patches are made for devDependencies
|
||||
if [ -d "$(grep -Eo 'node_modules/(@[a-z\d_-]+/)?[a-z\d_-]+/' "$x" | head -n1)" ]; then
|
||||
msg "$x"
|
||||
patch -Np1 -i ./"$x"
|
||||
fi
|
||||
done
|
||||
|
||||
# use our libsignal
|
||||
rm -rf node_modules/@signalapp/libsignal-client/
|
||||
ln -s "$srcdir"/libsignal-$_libsignalver/node/ node_modules/@signalapp/libsignal-client
|
||||
mv "$srcdir"/libsignal-$_libsignalver/node/ node_modules/@signalapp/libsignal-client
|
||||
|
||||
# use our libringrtc
|
||||
rm -rf node_modules/ringrtc/
|
||||
ln -s "$srcdir"/ringrtc-$_ringrtcver/src/node/ node_modules/ringrtc
|
||||
rm -rf node_modules/@signalapp/ringrtc/
|
||||
mv "$srcdir"/ringrtc-$_ringrtcver/src/node/ node_modules/@signalapp/ringrtc
|
||||
|
||||
# patch the sqlcipher module
|
||||
for x in $source; do
|
||||
case "$x" in
|
||||
bettersqlite-*.patch)
|
||||
msg "$x"
|
||||
patch -Np1 -i "$srcdir"/$x -d "$srcdir"/Signal-Desktop-$pkgver/node_modules/better-sqlite3/
|
||||
patch -Np1 -i "$srcdir"/$x -d "$srcdir"/Signal-Desktop-$pkgver/node_modules/@signalapp/better-sqlite3/
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# use system-provided font
|
||||
echo '' > node_modules/typeface-inter/inter.css
|
||||
rm -rf 'node_modules/typeface-inter/Inter '*
|
||||
mkdir node_modules/@signalapp/better-sqlite3/tokenizer
|
||||
mv "$srcdir"/Signal-FTS5-Extension-$_stokenizerver/target/release/libsignal_tokenizer.a node_modules/@signalapp/better-sqlite3/tokenizer/
|
||||
mv "$srcdir"/Signal-FTS5-Extension-$_stokenizerver/target/release/signal-tokenizer.h node_modules/@signalapp/better-sqlite3/tokenizer/
|
||||
|
||||
npm rebuild sharp better-sqlite3 --nodedir=/usr/include/electron/node_headers --build-from-source
|
||||
npm rebuild \
|
||||
sharp @signalapp/better-sqlite3 spellchecker websocket \
|
||||
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'
|
||||
|
||||
NODE_ENV=production \
|
||||
SIGNAL_ENV=production \
|
||||
NODE_OPTIONS=--openssl-legacy-provider \
|
||||
yarn build:dev
|
||||
|
||||
NODE_ENV=production \
|
||||
SIGNAL_ENV=production \
|
||||
yarn build:electron \
|
||||
--config.extraMetadata.environment=production \
|
||||
--config.directories.output=release \
|
||||
--linux=dir
|
||||
tasje pack
|
||||
}
|
||||
|
||||
check() {
|
||||
|
@ -357,31 +436,31 @@ check() {
|
|||
}
|
||||
|
||||
package() {
|
||||
cd "$builddir"/release/linux-unpacked
|
||||
cd "$builddir"/tasje_out
|
||||
|
||||
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 -Dm755 "$srcdir"/$pkgname "$pkgdir"/usr/bin/$pkgname
|
||||
install -Dm644 "$srcdir"/$pkgname.desktop "$pkgdir"/usr/share/applications/$pkgname.desktop
|
||||
|
||||
for i in 16 32 48 128 250 256 1024; do
|
||||
install -Dm644 "$builddir"/images/icon_$i.png "$pkgdir"/usr/share/icons/hicolor/${i}x$i/apps/$pkgname.png
|
||||
done
|
||||
while read -r size; do
|
||||
install -Dm644 icons/$size.png "$pkgdir"/usr/share/icons/hicolor/$size/apps/$pkgname.png
|
||||
done < icons/size-list
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
8f5234fa018e0590b3cad934ab46797bef16ff489a36a05364df7f43be80022143e8034665d2f24a171401bfac3315a16918d702a249c9ef8acd1de78e30f52e Signal-Desktop-6.1.0.tar.gz
|
||||
d2c13bf0d96eb706afe018c0ef9b377f3f50d2a82690f6ccb7260efa7cc620fb5c52ae775d598d6ebcaa581acfaab244dfe6f7f1738755604bf860cd548a62b6 libsignal-0.21.1.tar.gz
|
||||
e263390ea2ae877edb39e9973a8c8a03e2f396f255ca48487311031c69493a93da0dedbce5f10adfef4859cb8e51579bf285fbd9b94f98fabd538acaee18c413 ringrtc-2.22.0.tar.gz
|
||||
748f870d35b9a9789311c3d7cee9c0bc150aed8094838406e0a1969f2f824900ffec40d0b4fe2702f2f93d4a78d7987b0f91668cff859a8a34517663b138f8b5 webrtc-5005b.tar.xz
|
||||
1aaf59c2d401ae127ed73981be330cd999794a217b455cb8033652063eb7b549c7070c63f54e4e60bf4338b475e162b6eae98683c3ce058e8f1a407588b3b2e1 bettersqlite-use-system-sqlcipher.patch
|
||||
3ecfbd1b0cd03d1a697f3e53c057fa8bc2118de48ff0c3f07f8bb731f128f9478862a388efb36dd4dbc1dc5ad9977165a935fe65664aea915b8b80c38e801070 signal-build-expire-time.patch
|
||||
84e1e9f40aed65dbe48a98b8f7c863956e8e4922c6a6d7340db19f949e5077067100568ecab8005ee9ffe272b9f3efaf72f40dbb16aab30952aa1df10844904d Signal-Desktop-6.12.0.tar.gz
|
||||
9483c8d302728d6caa123f1fb9a977c7cb3aea09ecd1d2cfb3b19f2f2c66f884c41e37642c89db4eeeb0d607fddf281ba27ba4bd0a90e43b972d0cbc607e1483 libsignal-0.22.0.tar.gz
|
||||
148a6ab28e1115612144d74e2bdc70712674db19f1735343626605269eb97047feba7981dbb1269527d7779a8c2059be32adbfd65823f3fa601305f303e45b7c ringrtc-2.25.2.tar.gz
|
||||
7b6c03da2c6fd33a60b56c29d35b56919aa3f0b7b02ba172010eaff29513d2f33dc434538d15caf9c39cbbd961f979bcda9de06edd98dcd794cc2c3c835ffcab webrtc-5481.tar.xz
|
||||
84a1f2fc29262a12842e94698d124a85b823128e72a493b0be8ea92fbb72c5c268499f4a6827cdedaae06ec73cce4039a39fe5c5d536cbef330e59ba0183da28 stokenizer-0.2.1.tar.gz
|
||||
be5b4e823543b79175a12314f10c6326d9f0d59f470136962daed4665887006acc05b48b40dc1b67747396d8f6f7d23be298c1e110ccdd35ff9b09d5e6b80bab bettersqlite-use-system-sqlcipher.patch
|
||||
78be44ef201d9e6e127979a496f7244c8d93e936f85ad8753fea1646e6142f8a0dbff705ba612c8c724d19e6a9e89ccae254719326021818e04cccef452fc308 libsignal-too-new-clang.patch
|
||||
60a45285d885922f5c21f64b761a10efbee9081baf3efa4c8c13abc6a43dc4d27662ed10e239b0fa2071ab9e3a0dbbb4b11d6e3d26fe2b74a19f39e72b74a5bd signal-disable-updates.patch
|
||||
c68a2a6a37c1cdea227f29c0922b9bf15259f044e9b3240b120bba14809d04d66cf0b619f52bb91abd596ad93e51e972be132b5951d0e8f6ea238fcb7bb613eb signal-update-links.patch
|
||||
252b37a2ecc5e7a25385943045f426dc2e30991b28d206ceaff1be7fd8ffeeb024310a8fca6b3e69a4b1c57db535d51c570935351053525f393682d5ecd0f9a9 webrtc-canonicalize-file-name.patch
|
||||
6add8b4c293f5392748a2eec9486cb4a6534e161977c6a98de71617b9abcdd1e8ad94b44014256a4b52e33eb9dd4aca380279d4161629a1bb2d7b15f8eb5b459 webrtc-use-alpine-target.patch
|
||||
e50edde5a3a5b691eea4a595bd79672c207542ece710e53c26c70d7d2807335a418cfb9dc1aef6ce61ee41ee771a07534345ef4daaee8f0fdb4bab98a4034f0f signal-update-links.patch
|
||||
536bca17e9ae774cd4c26e9012f628bee1273587e5b5db866de577025b0b9a36c68ec970d61605cdc3d470032adcdf53b948368b6cb4fe7f1bffe69d87371daf signal-tasje-whatever-the-fuck-is-ignore-doing-here.patch
|
||||
354f516a74c5491727afe084ef7688b3e1359d230daa720ffc30b33d3ea7579c9f37a50fbdc5fe2e8dc5322e42a0a39e4ae3449d4cf5b77daed2229bd743028c webrtc-use-alpine-target.patch
|
||||
bab56a33265b5b094f161af1462166e371913a5269fe8e7d12e9f65ec4f5b908157406b3bcbcf73db15d03470445127d27c64fd731b6ea57c631aba3f4d302cb webrtc-no-shared-deps-in-static-lib.patch
|
||||
87534e7b5ad7365509eab75629e6bd1a9ed61ee92f7e358405a0abaf0df57de14623fb3894eb082f8785422e5c087e1c50f9e2e5cafbb2529591fd7bf447f7f5 signal-desktop
|
||||
87ef5f3ffcf64e3cae308aa0f6bc208fb05dd8568f6a288217cdf8498ae1523f276987a7be8d6f5208f13394bab350e08734d806a8e7c08849dd8ba0dda49d66 signal-desktop.desktop
|
||||
"
|
||||
|
|
|
@ -5,20 +5,20 @@
|
|||
{
|
||||
'target_name': 'better_sqlite3',
|
||||
- 'dependencies': ['deps/sqlite3.gyp:sqlite3'],
|
||||
+ 'include_dirs': ['/usr/include/sqlcipher'],
|
||||
+ 'direct_dependent_settings': {
|
||||
+ 'include_dirs': ['/usr/include/sqlcipher'],
|
||||
+ },
|
||||
+ 'include_dirs': [
|
||||
+ '/usr/include/sqlcipher',
|
||||
+ 'tokenizer',
|
||||
+ ],
|
||||
+ 'link_settings': {
|
||||
+ 'libraries': [
|
||||
+ '-L/usr/lib/sqlcipher',
|
||||
+ '-lsqlcipher',
|
||||
+ '<!(pwd)/tokenizer/libsignal_tokenizer.a',
|
||||
+ ]
|
||||
+ },
|
||||
'sources': ['src/better_sqlite3.cpp'],
|
||||
'cflags_cc': ['-std=c++17'],
|
||||
'xcode_settings': {
|
||||
@@ -17,14 +26,22 @@
|
||||
@@ -24,14 +33,22 @@
|
||||
['OS=="linux"', {
|
||||
'ldflags': [
|
||||
'-Wl,-Bsymbolic',
|
||||
|
@ -30,16 +30,27 @@
|
|||
{
|
||||
'target_name': 'test_extension',
|
||||
- 'dependencies': ['deps/sqlite3.gyp:sqlite3'],
|
||||
+ 'include_dirs': ['/usr/include/sqlcipher'],
|
||||
+ 'direct_dependent_settings': {
|
||||
+ 'include_dirs': ['/usr/include/sqlcipher'],
|
||||
+ },
|
||||
+ 'include_dirs': [
|
||||
+ '/usr/include/sqlcipher',
|
||||
+ 'tokenizer',
|
||||
+ ],
|
||||
+ 'link_settings': {
|
||||
+ 'libraries': [
|
||||
+ '-L/usr/lib/sqlcipher',
|
||||
+ '-lsqlcipher',
|
||||
+ '<!(pwd)/tokenizer/libsignal_tokenizer.a',
|
||||
+ ]
|
||||
+ },
|
||||
'conditions': [['sqlite3 == ""', { 'sources': ['deps/test_extension.c'] }]],
|
||||
},
|
||||
],
|
||||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -34,7 +34,7 @@
|
||||
"sqlite3": "^5.0.2"
|
||||
},
|
||||
"scripts": {
|
||||
- "install": "npm run download && npm run build-release",
|
||||
+ "install": "npm run build-release",
|
||||
"build-release": "node-gyp rebuild --release",
|
||||
"build-debug": "node-gyp rebuild --debug",
|
||||
"rebuild-release": "npm run lzz && npm run build-release",
|
||||
|
|
89
backports/signal-desktop/libsignal-too-new-clang.patch
Normal file
89
backports/signal-desktop/libsignal-too-new-clang.patch
Normal file
|
@ -0,0 +1,89 @@
|
|||
core issue: https://github.com/rust-lang/rust-bindgen/issues/2312
|
||||
upstream: https://github.com/signalapp/boring/pull/19
|
||||
upstream's upstream: https://github.com/cloudflare/boring/pull/110
|
||||
|
||||
--- ./Cargo.toml.orig
|
||||
+++ ./Cargo.toml
|
||||
@@ -25,3 +25,6 @@
|
||||
# Use our fork of curve25519-dalek for eventual zkgroup support.
|
||||
curve25519-dalek = { git = 'https://github.com/signalapp/curve25519-dalek', branch = 'lizard2' }
|
||||
boring = { git = 'https://github.com/signalapp/boring', branch = 'libsignal'}
|
||||
+
|
||||
+[patch.'https://github.com/signalapp/boring']
|
||||
+boring-sys = { git = 'https://github.com/selfisekai/boring-cf', branch = 'i109-signal', package = 'boring-sys' }
|
||||
--- ./Cargo.lock.orig
|
||||
+++ ./Cargo.lock
|
||||
@@ -206,9 +206,9 @@
|
||||
|
||||
[[package]]
|
||||
name = "bindgen"
|
||||
-version = "0.60.1"
|
||||
+version = "0.62.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6"
|
||||
+checksum = "c6720a8b7b2d39dd533285ed438d458f65b31b5c257e6ac7bb3d7e82844dd722"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cexpr",
|
||||
@@ -221,6 +221,7 @@
|
||||
"regex",
|
||||
"rustc-hash",
|
||||
"shlex",
|
||||
+ "syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -295,7 +296,7 @@
|
||||
[[package]]
|
||||
name = "boring-sys"
|
||||
version = "2.1.0"
|
||||
-source = "git+https://github.com/signalapp/boring?branch=libsignal#25e1dd8fa519ae90772008fbd4a284582096fece"
|
||||
+source = "git+https://github.com/selfisekai/boring-cf?branch=i109-signal#5c13f5c357c8b33c9978f2e447de2d6caf825d13"
|
||||
dependencies = [
|
||||
"bindgen",
|
||||
"cmake",
|
||||
@@ -1398,11 +1399,11 @@
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
-version = "1.0.29"
|
||||
+version = "1.0.54"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d"
|
||||
+checksum = "e472a104799c74b514a57226160104aa483546de37e839ec50e3c2e41dd87534"
|
||||
dependencies = [
|
||||
- "unicode-xid",
|
||||
+ "unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1868,13 +1869,13 @@
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
-version = "1.0.80"
|
||||
+version = "1.0.109"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "d010a1623fbd906d51d650a9916aaefc05ffa0e4053ff7fe601167f3e715d194"
|
||||
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
- "unicode-xid",
|
||||
+ "unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1981,6 +1982,12 @@
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "unicode-ident"
|
||||
+version = "1.0.8"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-segmentation"
|
|
@ -1,15 +0,0 @@
|
|||
--- a/ts/scripts/get-expire-time.ts
|
||||
+++ b/ts/scripts/get-expire-time.ts
|
||||
@@ -7,11 +7,7 @@
|
||||
|
||||
import { DAY } from '../util/durations';
|
||||
|
||||
-const unixTimestamp = parseInt(
|
||||
- execSync('git show -s --format=%ct').toString('utf8'),
|
||||
- 10
|
||||
-);
|
||||
-const buildCreation = unixTimestamp * 1000;
|
||||
+const buildCreation = new Date().getTime();
|
||||
|
||||
const buildExpiration = buildCreation + DAY * 90;
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Name=Signal
|
||||
Exec=/usr/bin/signal-desktop %U
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Icon=signal-desktop
|
||||
StartupWMClass=Signal
|
||||
Comment=Private messaging from your desktop
|
||||
MimeType=x-scheme-handler/sgnl;x-scheme-handler/signalcaptcha;
|
||||
Categories=Network;InstantMessaging;Chat;
|
|
@ -0,0 +1,12 @@
|
|||
--- a/package.json
|
||||
+++ b/package.json
|
||||
@@ -465,9 +465,7 @@
|
||||
"!node_modules/spellchecker/vendor/hunspell/**/*",
|
||||
"!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme,test,__tests__,tests,powered-test,example,examples,*.d.ts,.snyk-*.flag,benchmark}",
|
||||
"!**/node_modules/.bin",
|
||||
- "!**/node_modules/**/build/**",
|
||||
"node_modules/intl-tel-input/build/**",
|
||||
- "!**/node_modules/**/prebuilds/**",
|
||||
"!**/*.{o,hprof,orig,pyc,pyo,rbc,c,h,m}",
|
||||
"!**/._*",
|
||||
"!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,__pycache__,thumbs.db,.gitignore,.gitattributes,.flowconfig,.yarn-metadata.json,.idea,appveyor.yml,.travis.yml,circle.yml,npm-debug.log,.nyc_output,yarn.lock,.yarn-integrity}",
|
|
@ -12,14 +12,14 @@
|
|||
hasAction
|
||||
>
|
||||
{i18n('expiredWarning')}{' '}
|
||||
--- a/ts/components/DialogUpdate.tsx
|
||||
+++ b/ts/components/DialogUpdate.tsx
|
||||
@@ -27,7 +27,7 @@
|
||||
currentVersion: string;
|
||||
};
|
||||
--- ./ts/types/support.ts.orig
|
||||
+++ ./ts/types/support.ts
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2023 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
-const PRODUCTION_DOWNLOAD_URL = 'https://signal.org/download/';
|
||||
+const PRODUCTION_DOWNLOAD_URL = 'https://pkgs.alpinelinux.org/packages?name=signal-desktop';
|
||||
const BETA_DOWNLOAD_URL = 'https://support.signal.org/beta';
|
||||
|
||||
export const DialogUpdate = ({
|
||||
-export const PRODUCTION_DOWNLOAD_URL = 'https://signal.org/download/';
|
||||
+export const PRODUCTION_DOWNLOAD_URL = 'https://pkgs.alpinelinux.org/packages?name=signal-desktop';
|
||||
export const BETA_DOWNLOAD_URL = 'https://support.signal.org/beta';
|
||||
export const UNSUPPORTED_OS_URL =
|
||||
'https://support.signal.org/hc/articles/5109141421850';
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
no canonicalize_file_name on musl. funnily, the file using this says this is
|
||||
not portable, but avoids the nonportability of realpath(path, NULL);
|
||||
--- a/third_party/nasm/config/config-linux.h
|
||||
+++ b/third_party/nasm/config/config-linux.h
|
||||
@@ -139,7 +139,7 @@
|
||||
#define HAVE_ACCESS 1
|
||||
|
||||
/* Define to 1 if you have the `canonicalize_file_name' function. */
|
||||
-#define HAVE_CANONICALIZE_FILE_NAME 1
|
||||
+/* #define HAVE_CANONICALIZE_FILE_NAME 1 */
|
||||
|
||||
/* Define to 1 if you have the `cpu_to_le16' intrinsic function. */
|
||||
/* #undef HAVE_CPU_TO_LE16 */
|
22
backports/signal-desktop/webrtc-toolhack.patch
Normal file
22
backports/signal-desktop/webrtc-toolhack.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
this breaks the clang include path
|
||||
--
|
||||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ a/build/config/compiler/BUILD.gn
|
||||
@@ -1310,7 +1310,7 @@
|
||||
# paths to the tools it invokes. We don't want this because we don't
|
||||
# really need it and it can mess up the goma cache entries.
|
||||
if (is_clang && (!is_nacl || is_nacl_saigo)) {
|
||||
- cflags += [ "-no-canonical-prefixes" ]
|
||||
+ #cflags += [ "-no-canonical-prefixes" ]
|
||||
|
||||
# Same for links: Let the compiler driver invoke the linker
|
||||
# with a relative path and pass relative paths to built-in
|
||||
@@ -1319,7 +1319,7 @@
|
||||
# We don't link on goma, so this change is just for cleaner
|
||||
# internal linker invocations, for people who work on the build.
|
||||
if (!is_win) {
|
||||
- ldflags += [ "-no-canonical-prefixes" ]
|
||||
+ #ldflags += [ "-no-canonical-prefixes" ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,13 +1,13 @@
|
|||
--- ./build/config/compiler/BUILD.gn
|
||||
+++ ./build/config/compiler/BUILD.gn
|
||||
@@ -766,8 +766,8 @@
|
||||
}
|
||||
@@ -937,8 +937,8 @@
|
||||
} else if (current_cpu == "arm64") {
|
||||
if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
|
||||
if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
|
||||
!(is_chromeos_lacros && is_chromeos_device)) {
|
||||
- cflags += [ "--target=aarch64-linux-gnu" ]
|
||||
- ldflags += [ "--target=aarch64-linux-gnu" ]
|
||||
+ cflags += [ "--target=aarch64-alpine-linux-musl" ]
|
||||
+ ldflags += [ "--target=aarch64-alpine-linux-musl" ]
|
||||
}
|
||||
} else if (current_cpu == "mipsel" && !is_nacl) {
|
||||
ldflags += [ "-Wl,--hash-style=sysv" ]
|
||||
if (is_android) {
|
||||
# Outline atomics crash on Exynos 9810. http://crbug.com/1272795
|
||||
|
|
Loading…
Reference in a new issue