Bug 265646 - net-im/signal-desktop: Requires wrong node version, pulls packages from network during build
Summary: net-im/signal-desktop: Requires wrong node version, pulls packages from netwo...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Mikael Urankar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-05 12:52 UTC by Eirik Oeverby
Modified: 2022-08-15 12:10 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (mikael)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eirik Oeverby 2022-08-05 12:52:39 UTC
Hi,

thanks for creating this port.

I am unable to build it without modifications; there are two main issues:
- It requires specific versions of node (and perhaps other things), when it should only require that nodeXX is installed.
- It requires network access during build, which breaks building with Poudriere

First error:
  error signal-desktop@5.52.0: The engine "node" is incompatible with
  this module. Expected version "16.15.1". Got "16.16.0"

I notice there is a patch file for package.json - would it not be better to remove node entirely from there, along with whatever else the port itself pulls in as dependencies?

Second error - requires network access during build:

[5/6] Building fresh packages...
error /wrkdirs/usr/ports/net-im/signal-desktop/work/Signal-Desktop-
5.52.0/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-
install) || (node install/can-compile && node-gyp rebuild && node
install/dll-copy)
Arguments: 
Directory: /wrkdirs/usr/ports/net-im/signal-desktop/work/Signal-
Desktop-5.52.0/node_modules/sharp
Output:
sharp: Detected globally-installed libvips v8.12.2
sharp: Building from source via node-gyp
gyp info it worked if it ends with ok
gyp info using node-gyp@9.0.0
gyp info using node@16.16.0 | freebsd | x64
gyp info find Python using Python version 3.9.13 found at
"/usr/local/bin/python3.9"
gyp http GET
https://nodejs.org/download/release/v16.16.0/node-v16.16.0-headers.tar.gz
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack FetchError: request to
https://nodejs.org/download/release/v16.16.0/node-v16.16.0-headers.tar.gz
failed, reason: getaddrinfo EAI_FAIL nodejs.org
..........

Thanks for your efforts,
/Eirik
Comment 1 Mikael Urankar freebsd_committer freebsd_triage 2022-08-05 14:53:21 UTC
The cache files have to be regenerated when a new node version is committed, I have no better solution for that, this is how node works.
The network access is required in this particular case because node was updated from 
16.15.1 to 16.16.0, the node headers doesn't match and have to be downloaded.
I've committed signal-desktop 5.53.0 with the correct node headers and should fix your problem.

This port (and others) will break when a new node version is committed.