tools.func: NodeJS install also requires gpg_key_url
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled
This commit is contained in:
parent
e11254b185
commit
c96f4e9696
@ -258,8 +258,8 @@ EOF
|
||||
;;
|
||||
|
||||
nodejs)
|
||||
if [[ -z "$repo_url" ]]; then
|
||||
msg_error "Node.js repository requires repo_url"
|
||||
if [[ -z "$repo_url" || -z "$gpg_key_url" ]]; then
|
||||
msg_error "Node.js repository requires repo_url and gpg_key_url"
|
||||
return 1
|
||||
fi
|
||||
|
||||
@ -273,7 +273,7 @@ EOF
|
||||
mkdir -p /etc/apt/keyrings
|
||||
|
||||
# Download GPG key from NodeSource
|
||||
curl -fsSL "$repo_url/gpg.key" | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg || {
|
||||
curl -fsSL "$gpg_key_url" | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg || {
|
||||
msg_error "Failed to import NodeSource GPG key"
|
||||
return 1
|
||||
}
|
||||
@ -3017,13 +3017,13 @@ EOF
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
local mysql_install_success=false
|
||||
|
||||
if apt-cache search "^mysql-server$" 2>/dev/null | grep -q . && \
|
||||
if apt-cache search "^mysql-server$" 2>/dev/null | grep -q . &&
|
||||
$STD apt install -y mysql-server mysql-client 2>/dev/null; then
|
||||
mysql_install_success=true
|
||||
elif apt-cache search "^mysql-community-server$" 2>/dev/null | grep -q . && \
|
||||
elif apt-cache search "^mysql-community-server$" 2>/dev/null | grep -q . &&
|
||||
$STD apt install -y mysql-community-server mysql-community-client 2>/dev/null; then
|
||||
mysql_install_success=true
|
||||
elif apt-cache search "^mysql$" 2>/dev/null | grep -q . && \
|
||||
elif apt-cache search "^mysql$" 2>/dev/null | grep -q . &&
|
||||
$STD apt install -y mysql 2>/dev/null; then
|
||||
mysql_install_success=true
|
||||
fi
|
||||
@ -3098,7 +3098,7 @@ function setup_nodejs() {
|
||||
ensure_dependencies curl ca-certificates gnupg
|
||||
|
||||
# Setup repository
|
||||
manage_tool_repository "nodejs" "$NODE_VERSION" "https://deb.nodesource.com/node_${NODE_VERSION}.x" "" || {
|
||||
manage_tool_repository "nodejs" "$NODE_VERSION" "https://deb.nodesource.com/node_${NODE_VERSION}.x" "https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key" || {
|
||||
msg_error "Failed to setup Node.js repository"
|
||||
return 1
|
||||
}
|
||||
@ -3448,19 +3448,19 @@ function setup_postgresql() {
|
||||
# Try multiple PostgreSQL package patterns
|
||||
local pg_install_success=false
|
||||
|
||||
if apt-cache search "^postgresql-${PG_VERSION}$" 2>/dev/null | grep -q . && \
|
||||
if apt-cache search "^postgresql-${PG_VERSION}$" 2>/dev/null | grep -q . &&
|
||||
$STD apt install -y "postgresql-${PG_VERSION}" "postgresql-client-${PG_VERSION}" 2>/dev/null; then
|
||||
pg_install_success=true
|
||||
fi
|
||||
|
||||
if [[ "$pg_install_success" == false ]] && \
|
||||
apt-cache search "^postgresql-server-${PG_VERSION}$" 2>/dev/null | grep -q . && \
|
||||
if [[ "$pg_install_success" == false ]] &&
|
||||
apt-cache search "^postgresql-server-${PG_VERSION}$" 2>/dev/null | grep -q . &&
|
||||
$STD apt install -y "postgresql-server-${PG_VERSION}" "postgresql-client-${PG_VERSION}" 2>/dev/null; then
|
||||
pg_install_success=true
|
||||
fi
|
||||
|
||||
if [[ "$pg_install_success" == false ]] && \
|
||||
apt-cache search "^postgresql$" 2>/dev/null | grep -q . && \
|
||||
if [[ "$pg_install_success" == false ]] &&
|
||||
apt-cache search "^postgresql$" 2>/dev/null | grep -q . &&
|
||||
$STD apt install -y postgresql postgresql-client 2>/dev/null; then
|
||||
pg_install_success=true
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user