Package Details: signal-desktop-beta 7.37.0beta1-3

Git Clone URL: https://aur.archlinux.org/signal-desktop-beta.git (read-only, click to copy)
Package Base: signal-desktop-beta
Description: Signal Private Messenger for Linux - Beta version.
Upstream URL: https://signal.org
Keywords: secure-messenger signal signal-desktop
Licenses: GPL3
Conflicts: signal-desktop-beta-bin
Submitter: Edu4rdSHL
Maintainer: Edu4rdSHL
Last Packager: Edu4rdSHL
Votes: 16
Popularity: 0.34
First Submitted: 2020-08-17 19:09 (UTC)
Last Updated: 2024-12-12 17:09 (UTC)

Dependencies (33)

Required by (0)

Sources (2)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 8 9 10 11 .. 14 Next › Last »

Edu4rdSHL commented on 2023-01-21 19:34 (UTC) (edited on 2023-01-21 19:42 (UTC) by Edu4rdSHL)

If it builds with makepkg and in a clean chroot environment, then there's nothing to fix on my side but in the program that fails to do that. I'm not going to modify things to fix builds on broken AUR helpers.

Edit: it seems to be a common issue across AUR helpers, I tried building it with paru, and it fails as well. I will apply the fix to avoid these issues.

mkurz commented on 2023-01-21 19:31 (UTC) (edited on 2023-01-21 19:34 (UTC) by mkurz)

@Edu4rdSHL this package is broken when installing it with yay. I didn't realize that because I always build it myself using makepkg. However now that you fixed the aarch64 stuff and I wanted to upgrade it using yay it will fail with the error described by jnnk: https://aur.archlinux.org/packages/signal-desktop-beta?O=20#comment-893530 It will not just fail for aarch64, but for everyone using yay no matter which architecture.

Before I go into details, the fix is to move the

export NODE_OPTIONS=--openssl-legacy-provider

from the prepare() to the build() function.

Now the details. Let's start how you can reproduce the problem.

  1. Start a fresh shell (bash)
  2. IMPORTANT: Make sure you don't have the NODE_OPTIONS env variable set: unset NODE_OPTIONS
  3. Now run yay -S signal-desktop-beta. It will fail.

But: If you clone the git repo of this aur and run makepkg -sic it will work. But why does it work when running makepkg directly, but fail when using yay -S? That is because yay runs the prepare() and the build() function each in their own, new subshell process. So if you export a variable in the first subshell (running the prepare()) function, the subshell will exit after the function ran and the env variable will not propagate to the next subshell. So in build() the NODE_OPTIONS variable (which you set in prepare()) will be empty, which leads to the error of the referenced comment. You can easily test this by putting echo "NODE OPTIONS: $NODE_OPTIONS" at the top of the build() function, you will see that when running yay -S it will be empty, but it will be set correctly when using makepkg. You could also echo "PID of this script: $$" at the top of the prepare() and the same echo at the top of the build() function. You will see that when using yay there will be different pid's for each function, however when using makepkg the same pid shows up because there the whole script runs in the same subshell/process.

Here is the full patch, would be nice if you could apply that! Thanks! Also let me mention the signal-desktop-arm package suffers from the same problem, see it's comments: https://aur.archlinux.org/packages/signal-desktop-arm

diff --git a/PKGBUILD b/PKGBUILD
index 34840f5..81444f3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -30,9 +30,6 @@ sha512sums=('40dc86257be73eaa156180d2c725c58a6c16dabd6588cbce492ce30296e5db9307f
 prepare() {
   cd "${_pkgname}-${pkgver//beta*}-beta.${pkgver##*beta}"

-  # temporary fix for openssl3
-  export NODE_OPTIONS=--openssl-legacy-provider
-
   git lfs install

   # Allow higher Node versions
@@ -44,6 +41,9 @@ prepare() {
 build() {
   cd "${_pkgname}-${pkgver//beta*}-beta.${pkgver##*beta}"

+  # temporary fix for openssl3
+  export NODE_OPTIONS=--openssl-legacy-provider
+
   yarn generate
   yarn prepare-beta-build
   USE_SYSTEM_FPM=$([ $(uname -m) == "aarch64" ] && echo true || echo false) bash -c 'yarn build'

mkurz commented on 2023-01-16 12:31 (UTC)

Thanks @Edu4rdSHL!

Edu4rdSHL commented on 2023-01-16 03:15 (UTC)

Done on -4

mkurz commented on 2023-01-15 20:50 (UTC)

@Edu4rdSHL please apply following diff, bash -c ... is needed!

diff --git a/PKGBUILD b/PKGBUILD
index dcb3b9f..8b40e47 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -46,7 +46,7 @@ build() {

   yarn generate
   yarn prepare-beta-build
-  USE_SYSTEM_FPM=$([ $(uname -m) == "aarch64" ] && echo true || echo false) yarn build
+  USE_SYSTEM_FPM=$([ $(uname -m) == "aarch64" ] && echo true || echo false) bash -c 'yarn build'
 }

 package() {

mkurz commented on 2023-01-13 21:54 (UTC)

@Edu4rdSHL Yes, just checked, because you removed bash -c it's not working correctly on aarch64 anymore, because it will NOT return "true". (You probably didn't realize the error because it still will correctly on your machine)

mkurz commented on 2023-01-13 21:51 (UTC) (edited on 2023-01-13 21:51 (UTC) by mkurz)

@Edu4rdSHL In your latest commit you removed ... bash -c '...' - but without using bash -c it is not working correctly. You need bash -c, I am pretty sure, otherwise it's always empty. Can you check! And THANK YOU! Makes life a bit more easiert now :)

Edu4rdSHL commented on 2023-01-13 19:50 (UTC)

Support for aarch64 has been added with some additional tweaks, please let me know if everything is working as expected.

Thanks a lot @mkurz for the help on it.

hotschi commented on 2023-01-11 19:46 (UTC)

@mkurz Thanks a lot for your help! With your patch I was finally able to build and run this package on Asahi-Linux!

mkurz commented on 2023-01-11 17:16 (UTC) (edited on 2023-01-11 17:21 (UTC) by mkurz)

@Edu4rdSHL No problem, we can install the fpm dependency when running on aarch64 only, using makedepends_aarch64. Also it's possible to set the USE_SYSTEM_FPM env variable to true only when running on aarch64 also. So for x86_64 absolutely nothing changes. Please give the updated patch below a shot, like run it on your x86_64 system, you will see nothing changes.

@bradpitcher you can also try this patch. Before remove fpm from you system (with sudo pacman -Rn fpm) and you will see when running the new PKGBUILD file that it will complain and after installing it you again will be able to build signal.

diff --git a/.SRCINFO b/.SRCINFO
index 9730d03..0d4c5dc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -4,6 +4,7 @@ pkgbase = signal-desktop-beta
    pkgrel = 2
    url = https://signal.org
    arch = x86_64
+   arch = aarch64
    license = GPL3
    makedepends = yarn
    makedepends = git
@@ -13,6 +14,7 @@ pkgbase = signal-desktop-beta
    makedepends = git-lfs
    makedepends = libxcrypt-compat
    makedepends = openjpeg2
+   makedepends_aarch64 = fpm
    depends = gtk3
    depends = libvips
    depends = libxss
diff --git a/PKGBUILD b/PKGBUILD
index 9070a31..2810031 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,11 +12,12 @@ pkgrel=2
 pkgdesc='Signal Private Messenger for Linux - Beta version.'
 license=('GPL3')
 conflicts=('signal-desktop-beta-bin')
-arch=('x86_64')
+arch=('x86_64' 'aarch64')
 url="https://signal.org"
 depends=('gtk3' 'libvips' 'libxss' 'hicolor-icon-theme')
 # We need libxcrypt-compat for it to build: https://github.com/electron-userland/electron-builder-binaries/issues/47
 makedepends=('yarn' 'git' 'nodejs' 'npm' 'python' 'git-lfs' 'libxcrypt-compat' 'openjpeg2')
+makedepends_aarch64=('fpm')
 source=(
   "${pkgname}-${pkgver}.tar.gz::https://github.com/signalapp/${_pkgname}/archive/v${pkgver//beta*}-beta.${pkgver##*beta}.tar.gz"
   "${pkgname}.desktop"
@@ -45,14 +46,14 @@ build() {

   yarn generate
   yarn prepare-beta-build
-  yarn build
+  USE_SYSTEM_FPM=$([ $(uname -m) == "aarch64" ] && echo true) bash -c 'yarn build'
 }

 package() {
   cd "${_pkgname}-${pkgver//beta*}-beta.${pkgver##*beta}"

   install -d "${pkgdir}/usr/"{lib,bin}
-  cp -a release/linux-unpacked "${pkgdir}/usr/lib/${pkgname}"
+  cp -a release/linux-*unpacked "${pkgdir}/usr/lib/${pkgname}"
   ln -s "/usr/lib/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/"

   chmod u+s "${pkgdir}/usr/lib/${pkgname}/chrome-sandbox"