Github messages for voidlinux
 help / color / mirror / Atom feed
From: lane-brain <lane-brain@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] Signal-Desktop: update to 5.0.0.
Date: Wed, 05 May 2021 19:52:46 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30696@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]

There is a new pull request by lane-brain against master on the void-packages repository

https://github.com/lane-brain/void-packages Signal-Desktop
https://github.com/void-linux/void-packages/pull/30696

Signal-Desktop: update to 5.0.0.
<!-- Mark items with [x] where applicable -->

#### General
- [ ] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [x] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [ ] I generally don't use the affected packages but briefly tested this PR

<!--
If GitHub CI cannot be used to validate the build result (for example, if the
build is likely to take several hours), make sure to
[skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration).
When skipping CI, uncomment and fill out the following section.
Note: for builds that are likely to complete in less than 2 hours, it is not
acceptable to skip CI.
-->
<!-- 
#### Does it build and run successfully? 
(Please choose at least one native build and, if supported, at least one cross build. More are better.)
- [x] I built this PR locally for my native architecture, (ARCH-LIBC)
- [ ] I built this PR locally for these architectures (if supported. mark crossbuilds):
  - [ ] aarch64-musl
  - [ ] armv7l
  - [ ] armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/30696.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-Signal-Desktop-30696.patch --]
[-- Type: text/x-diff, Size: 5975 bytes --]

From 7817360cf2190594434ffe1be5f96652d3617254 Mon Sep 17 00:00:00 2001
From: lane-brain <lane@mailbox.org>
Date: Wed, 5 May 2021 13:50:08 -0400
Subject: [PATCH] Signal-Desktop: update to 5.0.0.

---
 .../files/expire-from-source-date-epoch.patch | 13 +++++++++
 .../files/openssl-linking.patch               | 19 ++++++++++++
 .../patches/update-dep-versions.patch         | 29 +++++++++++++++++++
 srcpkgs/Signal-Desktop/template               | 28 +++++++++++++-----
 4 files changed, 82 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/Signal-Desktop/files/expire-from-source-date-epoch.patch
 create mode 100644 srcpkgs/Signal-Desktop/files/openssl-linking.patch
 create mode 100644 srcpkgs/Signal-Desktop/patches/update-dep-versions.patch

diff --git a/srcpkgs/Signal-Desktop/files/expire-from-source-date-epoch.patch b/srcpkgs/Signal-Desktop/files/expire-from-source-date-epoch.patch
new file mode 100644
index 000000000000..d29c79835179
--- /dev/null
+++ b/srcpkgs/Signal-Desktop/files/expire-from-source-date-epoch.patch
@@ -0,0 +1,13 @@
+--- a/Gruntfile.js
++++ b/Gruntfile.js
+@@ -203,9 +203,7 @@ module.exports = grunt => {
+   });
+ 
+   grunt.registerTask('getExpireTime', () => {
+-    grunt.task.requires('gitinfo');
+-    const gitinfo = grunt.config.get('gitinfo');
+-    const committed = gitinfo.local.branch.current.lastCommitTime;
++    const committed = parseInt(process.env.SOURCE_DATE_EPOCH, 10) * 1000;
+     const time = Date.parse(committed) + 1000 * 60 * 60 * 24 * 90;
+     grunt.file.write(
+       'config/local-production.json',
diff --git a/srcpkgs/Signal-Desktop/files/openssl-linking.patch b/srcpkgs/Signal-Desktop/files/openssl-linking.patch
new file mode 100644
index 000000000000..7745f4f2b20e
--- /dev/null
+++ b/srcpkgs/Signal-Desktop/files/openssl-linking.patch
@@ -0,0 +1,19 @@
+--- a/node_modules/@journeyapps/sqlcipher/deps/sqlite3.gyp	2019-10-27 01:53:29.860275405 -0400
++++ b/node_modules/@journeyapps/sqlcipher/deps/sqlite3.gyp	2019-10-27 01:51:32.001730882 -0400
+@@ -73,7 +73,7 @@
+         'link_settings': {
+           'libraries': [
+             # This statically links libcrypto, whereas -lcrypto would dynamically link it
+-            '<(SHARED_INTERMEDIATE_DIR)/sqlcipher-amalgamation-<@(sqlite_version)/OpenSSL-Linux/libcrypto.a'
++            '-lcrypto'
+           ]
+         }
+       }]
+@@ -141,7 +141,6 @@
+         { # linux
+           'include_dirs': [
+             '<(SHARED_INTERMEDIATE_DIR)/sqlcipher-amalgamation-<@(sqlite_version)/',
+-            '<(SHARED_INTERMEDIATE_DIR)/sqlcipher-amalgamation-<@(sqlite_version)/openssl-include/'
+           ]
+         }]
+       ],
diff --git a/srcpkgs/Signal-Desktop/patches/update-dep-versions.patch b/srcpkgs/Signal-Desktop/patches/update-dep-versions.patch
new file mode 100644
index 000000000000..de9c5cd52de0
--- /dev/null
+++ b/srcpkgs/Signal-Desktop/patches/update-dep-versions.patch
@@ -0,0 +1,29 @@
+# * Set node to accept newer versions to fulfill dep
+# * Select node-gyp versions with python3 support
+#     - https://github.com/sass/node-sass/pull/2841
+#     - https://github.com/sass/node-sass/issues/2716
+--- package.json.orig	2021-04-15 21:50:37.757593564 -0400
++++ package.json	2021-04-15 21:51:37.819672207 -0400
+@@ -251,7 +251,7 @@
+     "jsdoc": "3.6.2",
+     "mocha": "4.1.0",
+     "mocha-testcheck": "1.0.0-rc.0",
+-    "node-gyp": "5.0.3",
++    "node-gyp": "6.1.0",
+     "node-sass": "4.14.1",
+     "node-sass-import-once": "1.2.0",
+     "npm-run-all": "4.1.5",
+@@ -273,11 +273,11 @@
+     "webpack-cli": "3.3.7",
+     "webpack-dev-server": "3.8.0"
+   },
+-  "resolutions": {
++  "resolutions": {"node-sass/node-gyp": "^6.0.0",
+     "@storybook/react/@storybook/core/node-fetch": "2.6.1"
+   },
+   "engines": {
+-    "node": "12.18.3"
++    "node": ">=12.18.3"
+   },
+   "build": {
+     "appId": "org.whispersystems.signal-desktop",
diff --git a/srcpkgs/Signal-Desktop/template b/srcpkgs/Signal-Desktop/template
index 8999b6e483ff..ca66f97f6b21 100644
--- a/srcpkgs/Signal-Desktop/template
+++ b/srcpkgs/Signal-Desktop/template
@@ -1,26 +1,40 @@
 # Template file for 'Signal-Desktop'
 pkgname=Signal-Desktop
-version=1.39.5
+version=5.0.0
 revision=1
 # Due to electron
 # 32-bit is not supported https://github.com/signalapp/Signal-Desktop/issues/1661
 archs="x86_64"
-hostmakedepends="git nodejs python tar yarn"
-depends="libnotify libappindicator"
+hostmakedepends="git git-lfs nodejs python3 tar yarn openssl"
+depends="gtk+3 libnotify libappindicator libvips"
 short_desc="Signal Private Messenger for Linux"
 maintainer="Julio Galvan <juliogalvan@protonmail.com>"
-license="GPL-3.0-only"
+license="AGPL-3.0-only"
 homepage="https://github.com/signalapp/Signal-Desktop"
 distfiles="https://github.com/signalapp/Signal-Desktop/archive/v${version}.tar.gz"
-checksum=f9f55c0195579b43712bf370b753337432eda4bcf89809d1c8f3deb0b4ee4400
+checksum=4ff58f5ab5f4de6477dd92069d8c2e9a830513acca527b51e0ee1c7cbe7d8627
 nostrip_files="signal-desktop"
 
 pre_build() {
-	vsed -e 's/"node": "/&>=/' -i package.json
+	# git-lfs hook needs to be installed for sqlcipher dependency 
+	git-lfs install
+
+	# `yarn cache clean` needed for sqlcipher dependency to install.
+	# Unfortunately, because we build from tarball we can't do this
+	# step at the beginning but only after we generate node_modules
+	# See: https://github.com/signalapp/Signal-Desktop/issues/5032
+	yarn install --ignore-engines || rm -r node_modules; yarn cache clean
+	yarn install --frozen-lockfile
+
+	# Have SQLCipher dynamically link from OpenSSL
+	# See https://github.com/signalapp/Signal-Desktop/issues/2634
+	patch --forward --strip=1 --input="${FILESDIR}/openssl-linking.patch"
+
+	# We can't read the release date from git so we use SOURCE_DATE_EPOCH instead
+	patch --forward --strip=1 --input="${FILESDIR}/expire-from-source-date-epoch.patch"
 }
 
 do_build() {
-	yarn install --ignore-engines
 	yarn grunt
 	yarn build-release --dir
 }

             reply	other threads:[~2021-05-05 17:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05 17:52 lane-brain [this message]
2021-05-05 17:54 ` lane-brain
2021-05-05 17:55 ` ericonr
2021-05-05 18:03 ` ericonr
2021-05-05 18:45 ` lane-brain
2021-05-05 19:13 ` [PR REVIEW] " ericonr
2021-05-05 19:14 ` ericonr
2021-05-05 19:27 ` [PR REVIEW] " lane-brain
2021-05-05 19:46 ` lane-brain
2021-05-05 19:58 ` lane-brain
2021-05-05 20:14 ` lane-brain
2021-05-05 22:43 ` [PR PATCH] [Updated] " lane-brain
2021-08-01 13:03 ` notthewave
2021-08-27 17:33 ` [PR PATCH] [Closed]: " ericonr
2021-08-27 17:33 ` ericonr
  -- strict thread matches above, loose matches on Subject: below --
2021-04-26  3:21 [PR PATCH] " ScrelliCopter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-30696@inbox.vuxu.org \
    --to=lane-brain@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).