Skip to content

Commit

Permalink
chore: support for AL2023
Browse files Browse the repository at this point in the history
chore: support for AL2023
  • Loading branch information
Jefferson authored and riosje committed May 9, 2023
1 parent 90f6932 commit c7b471a
Show file tree
Hide file tree
Showing 30 changed files with 739 additions and 114 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ NodeSource will continue to maintain the following architectures and may add add

* ~~**Amazon Linux** (64-bit)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Amazon Linux 2** (64-bit)~~ *WARNING: BUILD SYSTEM CURRENTLY BROKEN FOR NODEJS 18+*
* ~~**Amazon Linux 2023** (64-bit)

<a name="rpminstall"></a>
### Installation instructions
Expand Down
9 changes: 4 additions & 5 deletions deb/setup_20.x
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
# Discussion, issues and change requests at:
# https://github.com/nodesource/distributions
#
# Script to install the NodeSource Node.js 19.x repo onto a
# Script to install the NodeSource Node.js 20.x repo onto a
# Debian or Ubuntu system.
#
# Run as root or insert `sudo -E` before `bash`:
#
# curl -sL https://deb.nodesource.com/setup_19.x | bash -
# curl -sL https://deb.nodesource.com/setup_20.x | bash -
# or
# wget -qO- https://deb.nodesource.com/setup_19.x | bash -
# wget -qO- https://deb.nodesource.com/setup_20.x | bash -
#
# CONTRIBUTIONS TO THIS SCRIPT
#
Expand Down Expand Up @@ -97,6 +97,7 @@ node_deprecation_warning() {
"X${NODENAME}" == "XNode.js 11.x" ||
"X${NODENAME}" == "XNode.js 12.x" ||
"X${NODENAME}" == "XNode.js 13.x" ||
"X${NODENAME}" == "XNode.js 14.x" ||
"X${NODENAME}" == "XNode.js 15.x" ||
"X${NODENAME}" == "XNode.js 17.x" ]]; then

Expand All @@ -110,7 +111,6 @@ ${bold}${NODENAME} is no longer actively supported!${normal}
Use the installation script that corresponds to the version of Node.js you
wish to install. e.g.
* ${green}https://deb.nodesource.com/setup_14.x — Node.js 14 \"Fermium\"${normal}
* ${green}https://deb.nodesource.com/setup_16.x — Node.js 16 \"Gallium\"${normal}
* ${green}https://deb.nodesource.com/setup_18.x — Node.js 18 LTS \"Hydrogen\"${normal} (recommended)
* ${green}https://deb.nodesource.com/setup_19.x — Node.js 19 \"Nineteen\"${normal}
Expand Down Expand Up @@ -141,7 +141,6 @@ This script, located at ${bold}https://deb.nodesource.com/setup${normal}, used t
You should use the script that corresponds to the version of Node.js you
wish to install. e.g.
* ${green}https://deb.nodesource.com/setup_14.x — Node.js 14 \"Fermium\"${normal}
* ${green}https://deb.nodesource.com/setup_16.x — Node.js 16 \"Gallium\"${normal}
* ${green}https://deb.nodesource.com/setup_18.x — Node.js 18 LTS \"Hydrogen\"${normal} (recommended)
* ${green}https://deb.nodesource.com/setup_19.x — Node.js 19 \"Nineteen\"${normal}
Expand Down
1 change: 1 addition & 0 deletions deb/src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ RELEASES=( "node_0.10::nodejs:Node.js 0.10"
"node_18.x:_18.x:nodejs:Node.js 18.x"
"node_19.x:_19.x:nodejs:Node.js 19.x"
"node_18.x:_lts.x:nodejs:Node.js 18.x"
"node_20.x:_20.x:nodejs:Node.js 20.x"
"node_20.x:_current.x:nodejs:Node.js 20.x"
)
SOURCE=_setup.sh
Expand Down
32 changes: 28 additions & 4 deletions rpm/setup
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,30 @@ fi
#-check-distro-#

## Check distro and arch
echo "+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release"
DISTRO_PKG=$(rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release)
##echo "+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release"
##DISTRO_PKG=$(rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release)
echo "+ uname -m"
UNAME_ARCH=$(uname -m)

PKG_LIST=(
"redhat-release"
"centos-release"
"cloudlinux-release"
"sl-release"
"fedora-release"
"system-release"
)

for PKG in "${PKG_LIST[@]}"; do
rpm -q --whatprovides ${PKG}
if [ $? -eq 0 ]; then
echo "exec ${PKG}"
DISTRO_PKG=$(rpm -q --whatprovides ${PKG})
echo "Release package: ""${DISTRO_PKG}"
break
fi
done


if [ "X${UNAME_ARCH}" == "Xi686" ]; then
DIST_ARCH=i386
Expand All @@ -209,6 +228,8 @@ fi

if [[ $DISTRO_PKG =~ ^(redhat|centos|almalinux|rocky|cloudlinux|mageia|sl)- ]]; then
DIST_TYPE=el
elif [[ $DISTRO_PKG =~ ^system-release-(2023) ]]; then # Amazon Linux 2023 and possibly 2025
DIST_TYPE=al
elif [[ $DISTRO_PKG =~ ^(enterprise|system)-release- ]]; then # Oracle Linux & Amazon Linux
DIST_TYPE=el
elif [[ $DISTRO_PKG =~ ^(fedora|korora)- ]]; then
Expand All @@ -222,17 +243,20 @@ You don't appear to be running a supported version of Enterprise Linux. \
Please contact NodeSource at \
https://github.com/nodesource/distributions/issues if you think this is \
incorrect or would like your architecture to be considered for support. \
Include your 'distribution package' name: ${DISTRO_PKG}. \
Include your 'distribution package' name in the list: ${PKG_LIST[*]}. \
"
exit 1

fi

if [[ $DISTRO_PKG =~ ^system-release ]]; then
if [[ $DISTRO_PKG =~ ^system-release-2-14 ]]; then

# Amazon Linux, for 2014.* use el7, older versions are unknown, perhaps el6
DIST_VERSION=7
elif [[ $DISTRO_PKG =~ ^system-release-2023 ]]; then

# Amazon Linux 2023
DIST_VERSION=2023
else

## Using the redhat-release-server-X, centos-release-X, centos-stream-release-X, etc. pattern
Expand Down
32 changes: 28 additions & 4 deletions rpm/setup_0.10
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,30 @@ fi
#-check-distro-#

## Check distro and arch
echo "+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release"
DISTRO_PKG=$(rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release)
##echo "+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release"
##DISTRO_PKG=$(rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release)
echo "+ uname -m"
UNAME_ARCH=$(uname -m)

PKG_LIST=(
"redhat-release"
"centos-release"
"cloudlinux-release"
"sl-release"
"fedora-release"
"system-release"
)

for PKG in "${PKG_LIST[@]}"; do
rpm -q --whatprovides ${PKG}
if [ $? -eq 0 ]; then
echo "exec ${PKG}"
DISTRO_PKG=$(rpm -q --whatprovides ${PKG})
echo "Release package: ""${DISTRO_PKG}"
break
fi
done


if [ "X${UNAME_ARCH}" == "Xi686" ]; then
DIST_ARCH=i386
Expand All @@ -209,6 +228,8 @@ fi

if [[ $DISTRO_PKG =~ ^(redhat|centos|almalinux|rocky|cloudlinux|mageia|sl)- ]]; then
DIST_TYPE=el
elif [[ $DISTRO_PKG =~ ^system-release-(2023) ]]; then # Amazon Linux 2023 and possibly 2025
DIST_TYPE=al
elif [[ $DISTRO_PKG =~ ^(enterprise|system)-release- ]]; then # Oracle Linux & Amazon Linux
DIST_TYPE=el
elif [[ $DISTRO_PKG =~ ^(fedora|korora)- ]]; then
Expand All @@ -222,17 +243,20 @@ You don't appear to be running a supported version of Enterprise Linux. \
Please contact NodeSource at \
https://github.com/nodesource/distributions/issues if you think this is \
incorrect or would like your architecture to be considered for support. \
Include your 'distribution package' name: ${DISTRO_PKG}. \
Include your 'distribution package' name in the list: ${PKG_LIST[*]}. \
"
exit 1

fi

if [[ $DISTRO_PKG =~ ^system-release ]]; then
if [[ $DISTRO_PKG =~ ^system-release-2-14 ]]; then

# Amazon Linux, for 2014.* use el7, older versions are unknown, perhaps el6
DIST_VERSION=7
elif [[ $DISTRO_PKG =~ ^system-release-2023 ]]; then

# Amazon Linux 2023
DIST_VERSION=2023
else

## Using the redhat-release-server-X, centos-release-X, centos-stream-release-X, etc. pattern
Expand Down
32 changes: 28 additions & 4 deletions rpm/setup_0.12
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,30 @@ fi
#-check-distro-#

## Check distro and arch
echo "+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release"
DISTRO_PKG=$(rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release)
##echo "+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release"
##DISTRO_PKG=$(rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release)
echo "+ uname -m"
UNAME_ARCH=$(uname -m)

PKG_LIST=(
"redhat-release"
"centos-release"
"cloudlinux-release"
"sl-release"
"fedora-release"
"system-release"
)

for PKG in "${PKG_LIST[@]}"; do
rpm -q --whatprovides ${PKG}
if [ $? -eq 0 ]; then
echo "exec ${PKG}"
DISTRO_PKG=$(rpm -q --whatprovides ${PKG})
echo "Release package: ""${DISTRO_PKG}"
break
fi
done


if [ "X${UNAME_ARCH}" == "Xi686" ]; then
DIST_ARCH=i386
Expand All @@ -209,6 +228,8 @@ fi

if [[ $DISTRO_PKG =~ ^(redhat|centos|almalinux|rocky|cloudlinux|mageia|sl)- ]]; then
DIST_TYPE=el
elif [[ $DISTRO_PKG =~ ^system-release-(2023) ]]; then # Amazon Linux 2023 and possibly 2025
DIST_TYPE=al
elif [[ $DISTRO_PKG =~ ^(enterprise|system)-release- ]]; then # Oracle Linux & Amazon Linux
DIST_TYPE=el
elif [[ $DISTRO_PKG =~ ^(fedora|korora)- ]]; then
Expand All @@ -222,17 +243,20 @@ You don't appear to be running a supported version of Enterprise Linux. \
Please contact NodeSource at \
https://github.com/nodesource/distributions/issues if you think this is \
incorrect or would like your architecture to be considered for support. \
Include your 'distribution package' name: ${DISTRO_PKG}. \
Include your 'distribution package' name in the list: ${PKG_LIST[*]}. \
"
exit 1

fi

if [[ $DISTRO_PKG =~ ^system-release ]]; then
if [[ $DISTRO_PKG =~ ^system-release-2-14 ]]; then

# Amazon Linux, for 2014.* use el7, older versions are unknown, perhaps el6
DIST_VERSION=7
elif [[ $DISTRO_PKG =~ ^system-release-2023 ]]; then

# Amazon Linux 2023
DIST_VERSION=2023
else

## Using the redhat-release-server-X, centos-release-X, centos-stream-release-X, etc. pattern
Expand Down
32 changes: 28 additions & 4 deletions rpm/setup_10.x
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,30 @@ fi
#-check-distro-#

## Check distro and arch
echo "+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release"
DISTRO_PKG=$(rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release)
##echo "+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release"
##DISTRO_PKG=$(rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release)
echo "+ uname -m"
UNAME_ARCH=$(uname -m)

PKG_LIST=(
"redhat-release"
"centos-release"
"cloudlinux-release"
"sl-release"
"fedora-release"
"system-release"
)

for PKG in "${PKG_LIST[@]}"; do
rpm -q --whatprovides ${PKG}
if [ $? -eq 0 ]; then
echo "exec ${PKG}"
DISTRO_PKG=$(rpm -q --whatprovides ${PKG})
echo "Release package: ""${DISTRO_PKG}"
break
fi
done


if [ "X${UNAME_ARCH}" == "Xi686" ]; then
DIST_ARCH=i386
Expand All @@ -209,6 +228,8 @@ fi

if [[ $DISTRO_PKG =~ ^(redhat|centos|almalinux|rocky|cloudlinux|mageia|sl)- ]]; then
DIST_TYPE=el
elif [[ $DISTRO_PKG =~ ^system-release-(2023) ]]; then # Amazon Linux 2023 and possibly 2025
DIST_TYPE=al
elif [[ $DISTRO_PKG =~ ^(enterprise|system)-release- ]]; then # Oracle Linux & Amazon Linux
DIST_TYPE=el
elif [[ $DISTRO_PKG =~ ^(fedora|korora)- ]]; then
Expand All @@ -222,17 +243,20 @@ You don't appear to be running a supported version of Enterprise Linux. \
Please contact NodeSource at \
https://github.com/nodesource/distributions/issues if you think this is \
incorrect or would like your architecture to be considered for support. \
Include your 'distribution package' name: ${DISTRO_PKG}. \
Include your 'distribution package' name in the list: ${PKG_LIST[*]}. \
"
exit 1

fi

if [[ $DISTRO_PKG =~ ^system-release ]]; then
if [[ $DISTRO_PKG =~ ^system-release-2-14 ]]; then

# Amazon Linux, for 2014.* use el7, older versions are unknown, perhaps el6
DIST_VERSION=7
elif [[ $DISTRO_PKG =~ ^system-release-2023 ]]; then

# Amazon Linux 2023
DIST_VERSION=2023
else

## Using the redhat-release-server-X, centos-release-X, centos-stream-release-X, etc. pattern
Expand Down
32 changes: 28 additions & 4 deletions rpm/setup_11.x
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,30 @@ fi
#-check-distro-#

## Check distro and arch
echo "+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release"
DISTRO_PKG=$(rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release)
##echo "+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release"
##DISTRO_PKG=$(rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release)
echo "+ uname -m"
UNAME_ARCH=$(uname -m)

PKG_LIST=(
"redhat-release"
"centos-release"
"cloudlinux-release"
"sl-release"
"fedora-release"
"system-release"
)

for PKG in "${PKG_LIST[@]}"; do
rpm -q --whatprovides ${PKG}
if [ $? -eq 0 ]; then
echo "exec ${PKG}"
DISTRO_PKG=$(rpm -q --whatprovides ${PKG})
echo "Release package: ""${DISTRO_PKG}"
break
fi
done


if [ "X${UNAME_ARCH}" == "Xi686" ]; then
DIST_ARCH=i386
Expand All @@ -209,6 +228,8 @@ fi

if [[ $DISTRO_PKG =~ ^(redhat|centos|almalinux|rocky|cloudlinux|mageia|sl)- ]]; then
DIST_TYPE=el
elif [[ $DISTRO_PKG =~ ^system-release-(2023) ]]; then # Amazon Linux 2023 and possibly 2025
DIST_TYPE=al
elif [[ $DISTRO_PKG =~ ^(enterprise|system)-release- ]]; then # Oracle Linux & Amazon Linux
DIST_TYPE=el
elif [[ $DISTRO_PKG =~ ^(fedora|korora)- ]]; then
Expand All @@ -222,17 +243,20 @@ You don't appear to be running a supported version of Enterprise Linux. \
Please contact NodeSource at \
https://github.com/nodesource/distributions/issues if you think this is \
incorrect or would like your architecture to be considered for support. \
Include your 'distribution package' name: ${DISTRO_PKG}. \
Include your 'distribution package' name in the list: ${PKG_LIST[*]}. \
"
exit 1

fi

if [[ $DISTRO_PKG =~ ^system-release ]]; then
if [[ $DISTRO_PKG =~ ^system-release-2-14 ]]; then

# Amazon Linux, for 2014.* use el7, older versions are unknown, perhaps el6
DIST_VERSION=7
elif [[ $DISTRO_PKG =~ ^system-release-2023 ]]; then

# Amazon Linux 2023
DIST_VERSION=2023
else

## Using the redhat-release-server-X, centos-release-X, centos-stream-release-X, etc. pattern
Expand Down
Loading

0 comments on commit c7b471a

Please sign in to comment.