distributions icon indicating copy to clipboard operation
distributions copied to clipboard

Set useful repository origin

Open cs278 opened this issue 2 years ago • 4 comments

Would it be possible to set a useful repository origin so that we can ensure your packages override distro provided packages, the old configuration used to have a reasonable origin of Node Source but the new configuration is just . nodistro.

Old

Origin: Node Source
Label: Node Source
Codename: jammy
Date: Wed, 09 Aug 2023 19:24:50 UTC
Architectures: i386 amd64 armhf arm64
Components: main
Description: Apt Repository for the Node.JS 16.x Branch

New

Origin: . nodistro
Label: . nodistro
Suite: nodistro
Codename: nodistro
Date: Wed, 30 Aug 2023 10:59:29 UTC
Architectures: amd64 arm64 armhf x86_64
Components: main
Description: Generated by aptly

cs278 avatar Aug 30 '23 13:08 cs278

is one of the things we have to improve, we will add it to the list and let you know when we have an update.

JesusPaz avatar Aug 30 '23 15:08 JesusPaz

I think because of this issue, the current (as of 2023-09-4) installation instructions for Node.js 18 (which is currently the LTS version) on Debian 11 bullseye fail to install the nodejs apt package during noninteractive installations if apt-listbugs is installed:

# as root
apt install -y ca-certificates curl gnupg
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg

NODE_MAJOR=18
# 18 has the latest Node LTS as of this writing

echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" >/etc/apt/sources.list.d/nodesource.list

apt update
apt install -y nodejs

Output:

# ...
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 29.4 MB of archives.
After this operation, 188 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_18.x nodistro/main amd64 nodejs amd64 18.17.1-1nodesource1 [29.4 MB]
serious bugs of nodejs (→ 18.17.1-1nodesource1) <Forwarded>
 b1 - #1030284 - nodejs: [arm64] RangeError: Maximum call stack size exceeded
Summary:
 nodejs(1 bug)
nodejs will be pinned. Restart APT session to enable
**********************************************************************
****** Exiting with an error in order to stop the installation. ******
**********************************************************************
Fetched 29.4 MB in 2s (16.5 MB/s)
E: Sub-process /usr/bin/apt-listbugs apt returned an error code (10)
E: Failure running script /usr/bin/apt-listbugs apt

# (exit=100)

Notice this one:

# ...
serious bugs of nodejs (→ 18.17.1-1nodesource1) <Forwarded>
 b1 - #1030284 - nodejs: [arm64] RangeError: Maximum call stack size exceeded
# ...

This is odd for my particular case because my system is amd64, not arm64.

Workaround

My current workaround is to explicitly ignore nodejs for apt-listchanges.

echo "nodejs" >>/etc/apt/listbugs/ignore_bugs

Full script for Node.js installation including the apt-listbugs workaround:

# as root
apt install -y ca-certificates curl gnupg
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg

NODE_MAJOR=18
# 18 has the latest Node LTS as of this writing

echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" >/etc/apt/sources.list.d/nodesource.list

echo "nodejs" >>/etc/apt/listbugs/ignore_bugs

apt update
apt install -y nodejs

Abdull avatar Sep 04 '23 16:09 Abdull

Workaround for unattended-upgrade: "site=deb.nodesource.com"

(Verifiable with unattended-upgrade -d | grep '^Marking not allowed ' as soon as you write to an apt.conf file.)

dieulot avatar Oct 22 '23 14:10 dieulot