Skip to content

Commit be20e1f

Browse files
authored
switch to new Debian keysigning method (#252)
`apt-key` is deprecated, so we'll switch to the new recommended way of adding repo signing keys also very minor, but move then creation of the `/etc/apt/keyrings` directory into its own section, as it's not really part of just Node now.
1 parent 17bc7ba commit be20e1f

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

scripts/amd64.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ ca-certificates
3232
# Install Some PPAs
3333
apt-add-repository ppa:ondrej/php -y
3434

35-
# NodeJS
35+
# Prepare keyrings directory
3636
sudo mkdir -p /etc/apt/keyrings
37+
38+
# NodeJS
3739
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
3840
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_21.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
3941

4042
# PostgreSQL
41-
sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
42-
# Import the repository signing key:
43-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ACCC4CF8
44-
wget -qO- https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/pgdg.asc &>/dev/null
43+
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /etc/apt/keyrings/postgresql.gpg
44+
sudo sh -c 'echo "deb [signed-by=/etc/apt/keyrings/postgresql.gpg] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
4545

4646
## Update Package Lists
4747
apt-get update -y

scripts/arm.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ ca-certificates
3232
# Install Some PPAs
3333
apt-add-repository ppa:ondrej/php -y
3434

35-
# NodeJS
35+
# Prepare keyrings directory
3636
sudo mkdir -p /etc/apt/keyrings
37+
38+
# NodeJS
3739
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
3840
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_21.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
3941

4042
# PostgreSQL
41-
sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
42-
# Import the repository signing key:
43-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ACCC4CF8
44-
wget -qO- https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/pgdg.asc &>/dev/null
43+
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /etc/apt/keyrings/postgresql.gpg
44+
sudo sh -c 'echo "deb [signed-by=/etc/apt/keyrings/postgresql.gpg] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
4545

4646
## Update Package Lists
4747
apt-get update -y

0 commit comments

Comments
 (0)