Bug#1025220: passenger: Passenger startup fails with nodejs applications using node versions later than 14.x

2022-12-13 Thread Cool Fire

Hi,

On Tue, 13 Dec 2022 20:23:11 -0300 Antonio Terceiro 
 wrote:

> These binaries have the attached patch applied, please try them (I'm
> assuming you are on amd64) and let me know.
>
> https://people.debian.org/~terceiro/tmp/passenger-bullseye/

Thank you for building the new packages. I've tested them with the 
debian nodejs package and the nodesource 14.x, 16.x, 18.x and 19.x 
repos, they all run the example nodejs application without any issues now.




Bug#1025220: passenger: Passenger startup fails with nodejs applications using node versions later than 14.x

2022-12-13 Thread Cool Fire

Hello,

On Tue, 13 Dec 2022 09:54:05 -0300 Antonio Terceiro 
 wrote:

> Please note that supporting nodejs from outside of the debian archive is
> not a priority.

That's entirely understandable.


On Tue, 13 Dec 2022 09:54:05 -0300 Antonio Terceiro 
 wrote:

> I'm not making any promises, but if you can identify the fix yourself
> and check whether it applies to the passenger version in stable (or do
> the necessary backporting) in a way that doesn't break usage with nodejs
> from stable, I could provide a stable update with that fix.

I've made some quick and dirty docker containers to validate that 
replacing the "GLOBAL" with "global" is really all that is needed to fix 
the issue, and that it does not break for deployments using the nodejs 
version from the debian repos: 
https://git.insomnia247.nl/coolfire/passenger-tests


As for actually writing the patch file needed for the package and how I 
would go about submitting that, a few pointers would be greatly 
appreciated if you can find the time.




Bug#1025220: passenger: Passenger startup fails with nodejs applications using node versions later than 14.x

2022-12-13 Thread Antonio Terceiro
Hi,

On Thu, Dec 01, 2022 at 06:59:05AM +, Cool Fire wrote:
> Some additional digging findings;
> 
> - Testing and Unstable packages are not affected as they are built from the
> upstream passenger 6.x branch, which already includes this fix.
> - Stable package is not affected when using the nodejs package from debian
> stable repo as this is still on the nodejs 12.x branch.
> - Stable package is affected when using newer stable release from upstream
> vendor repo (deb.nodesource.com).
> 
> It would be superb if we could get the fix from passenger 6.x backported to
> the debian stable passenger package so we can deploy on modern nodejs
> versions.

Please note that supporting nodejs from outside of the debian archive is
not a priority.

I'm not making any promises, but if you can identify the fix yourself
and check whether it applies to the passenger version in stable (or do
the necessary backporting) in a way that doesn't break usage with nodejs
from stable, I could provide a stable update with that fix.


signature.asc
Description: PGP signature


Bug#1025220: passenger: Passenger startup fails with nodejs applications using node versions later than 14.x

2022-11-30 Thread Cool Fire

Some additional digging findings;

- Testing and Unstable packages are not affected as they are built from 
the upstream passenger 6.x branch, which already includes this fix.
- Stable package is not affected when using the nodejs package from 
debian stable repo as this is still on the nodejs 12.x branch.
- Stable package is affected when using newer stable release from 
upstream vendor repo (deb.nodesource.com).


It would be superb if we could get the fix from passenger 6.x backported 
to the debian stable passenger package so we can deploy on modern nodejs 
versions.




Bug#1025220: passenger: Passenger startup fails with nodejs applications using node versions later than 14.x

2022-11-30 Thread Cool Fire
Package: passenger
Version: 5.0.30-1.2
Severity: important

Dear Maintainer,

Passenger errors out when starting a nodejs application when using a
nodejs version later than 14.x. It throws the following error:

/usr/share/passenger/helper-scripts/node-loader.js:41
GLOBAL.PhusionPassenger = exports.PhusionPassenger = new EventEmitter();
^

ReferenceError: GLOBAL is not defined
at Object. 
(/usr/share/passenger/helper-scripts/node-loader.js:41:1)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] 
(node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47

(Nodejs version: v18.12.1)

It seems that after 14.x the "GLOBAL" alias to the "global" object was
removed. Replacing the usage of "GLOBAL" with its lowercase variant in
the node-loader.js file seems to be the way to fix this.


-- System Information:
Debian Release: 11.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-17-amd64 (SMP w/24 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages passenger depends on:
ii  libc6   2.31-13+deb11u5
ii  libcurl47.74.0-1.3+deb11u3
ii  libgcc-s1   10.2.1-6
ii  libruby2.7  2.7.4-1+deb11u1
ii  libstdc++6  10.2.1-6
ii  libuv1  1.40.0-2
ii  ruby1:2.7+2
ii  ruby-rack   2.1.4-3
ii  zlib1g  1:1.2.11.dfsg-2+deb11u2

passenger recommends no packages.

Versions of packages passenger suggests:
ii  nodejs 18.12.1-deb-1nodesource1
pn  passenger-doc  
ii  python33.9.2-3
pn  rails  

-- no debconf information