Merge pull request #1080 from vutny/ubuntu12lts-eol

Declare End-Of-Life for Ubuntu 12.04 LTS
This commit is contained in:
Nicole Thomas 2017-05-26 09:21:47 -06:00 committed by GitHub
commit ae7b954c6e
2 changed files with 197 additions and 207 deletions

View file

@ -256,12 +256,10 @@ SUSE family
Ubuntu and derivatives Ubuntu and derivatives
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
- Elementary OS 0.2 (based on Ubuntu 12.04)
- KDE neon (based on Ubuntu 16.04) - KDE neon (based on Ubuntu 16.04)
- Linaro 12.04 - Linux Mint 17/18
- Linux Mint 13/17/18 - Ubuntu 14.04/16.04 and subsequent non-TLS releases (see below)
- Trisquel GNU/Linux 6 (based on Ubuntu 12.04)
- Ubuntu 12.04/14.04/16.04 and subsequent non-TLS releases (see below)
Ubuntu Best Effort Support: Non-LTS Releases Ubuntu Best Effort Support: Non-LTS Releases
******************************************** ********************************************

View file

@ -1402,6 +1402,149 @@ __debian_derivatives_translation() {
} }
#--- FUNCTION -------------------------------------------------------------------------------------------------------
# NAME: __check_end_of_life_versions
# DESCRIPTION: Check for end of life distribution versions
#----------------------------------------------------------------------------------------------------------------------
__check_end_of_life_versions() {
case "${DISTRO_NAME_L}" in
debian)
# Debian versions bellow 6 are not supported
if [ "$DISTRO_MAJOR_VERSION" -lt 7 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " https://wiki.debian.org/DebianReleases"
exit 1
fi
;;
ubuntu)
# Ubuntu versions not supported
#
# < 14.04
# = 14.10
# = 15.04, 15.10
if [ "$DISTRO_MAJOR_VERSION" -lt 14 ] || \
[ "$DISTRO_MAJOR_VERSION" -eq 15 ] || \
([ "$DISTRO_MAJOR_VERSION" -lt 16 ] && [ "$DISTRO_MINOR_VERSION" -eq 10 ]); then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " https://wiki.ubuntu.com/Releases"
exit 1
fi
;;
opensuse)
# openSUSE versions not supported
#
# <= 12.1
if ([ "$DISTRO_MAJOR_VERSION" -eq 12 ] && [ "$DISTRO_MINOR_VERSION" -eq 1 ]) || [ "$DISTRO_MAJOR_VERSION" -lt 12 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " http://en.opensuse.org/Lifetime"
exit 1
fi
;;
suse)
# SuSE versions not supported
#
# < 11 SP2
SUSE_PATCHLEVEL=$(awk '/PATCHLEVEL/ {print $3}' /etc/SuSE-release )
if [ "${SUSE_PATCHLEVEL}" = "" ]; then
SUSE_PATCHLEVEL="00"
fi
if ([ "$DISTRO_MAJOR_VERSION" -eq 11 ] && [ "$SUSE_PATCHLEVEL" -lt 02 ]) || [ "$DISTRO_MAJOR_VERSION" -lt 11 ]; then
echoerror "Versions lower than SuSE 11 SP2 are not supported."
echoerror "Please consider upgrading to the next stable"
exit 1
fi
;;
fedora)
# Fedora lower than 23 are no longer supported
if [ "$DISTRO_MAJOR_VERSION" -lt 23 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " https://fedoraproject.org/wiki/Releases"
exit 1
fi
;;
centos)
# CentOS versions lower than 6 are no longer supported
if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " http://wiki.centos.org/Download"
exit 1
fi
;;
red_hat*linux)
# Red Hat (Enterprise) Linux versions lower than 6 are no longer supported
if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " https://access.redhat.com/support/policy/updates/errata/"
exit 1
fi
;;
oracle*linux)
# Oracle Linux versions lower than 6 are no longer supported
if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " http://www.oracle.com/us/support/library/elsp-lifetime-069338.pdf"
exit 1
fi
;;
scientific*linux)
# Scientific Linux versions lower than 6 are no longer supported
if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " https://www.scientificlinux.org/downloads/sl-versions/"
exit 1
fi
;;
cloud*linux)
# Cloud Linux versions lower than 6 are no longer supported
if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " https://docs.cloudlinux.com/index.html?cloudlinux_life-cycle.html"
exit 1
fi
;;
amazon*linux*ami)
# Amazon Linux versions lower than 2012.0X no longer supported
if [ "$DISTRO_MAJOR_VERSION" -lt 2012 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " https://aws.amazon.com/amazon-linux-ami/"
exit 1
fi
;;
freebsd)
# FreeBSD versions lower than 9.1 are not supported.
if ([ "$DISTRO_MAJOR_VERSION" -eq 9 ] && [ "$DISTRO_MINOR_VERSION" -lt 01 ]) || [ "$DISTRO_MAJOR_VERSION" -lt 9 ]; then
echoerror "Versions lower than FreeBSD 9.1 are not supported."
exit 1
fi
;;
*)
;;
esac
}
#--- FUNCTION ------------------------------------------------------------------------------------------------------- #--- FUNCTION -------------------------------------------------------------------------------------------------------
# NAME: __check_and_refresh_suse_pkg_repo # NAME: __check_and_refresh_suse_pkg_repo
# DESCRIPTION: Check if zypper knows about systemsmanagement_saltstack repo yet. # DESCRIPTION: Check if zypper knows about systemsmanagement_saltstack repo yet.
@ -1429,6 +1572,37 @@ echoinfo " OS Version: ${OS_VERSION}"
echoinfo " Distribution: ${DISTRO_NAME} ${DISTRO_VERSION}" echoinfo " Distribution: ${DISTRO_NAME} ${DISTRO_VERSION}"
echo echo
# Simplify distro name naming on functions
DISTRO_NAME_L=$(echo "$DISTRO_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-zA-Z0-9_ ]//g' | sed -re 's/([[:space:]])+/_/g')
# Simplify version naming on functions
if [ "$DISTRO_VERSION" = "" ] || [ ${_SIMPLIFY_VERSION} -eq $BS_FALSE ]; then
DISTRO_MAJOR_VERSION=""
DISTRO_MINOR_VERSION=""
PREFIXED_DISTRO_MAJOR_VERSION=""
PREFIXED_DISTRO_MINOR_VERSION=""
else
DISTRO_MAJOR_VERSION=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g')
DISTRO_MINOR_VERSION=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).\([0-9]*\).*/\2/g')
PREFIXED_DISTRO_MAJOR_VERSION="_${DISTRO_MAJOR_VERSION}"
if [ "${PREFIXED_DISTRO_MAJOR_VERSION}" = "_" ]; then
PREFIXED_DISTRO_MAJOR_VERSION=""
fi
PREFIXED_DISTRO_MINOR_VERSION="_${DISTRO_MINOR_VERSION}"
if [ "${PREFIXED_DISTRO_MINOR_VERSION}" = "_" ]; then
PREFIXED_DISTRO_MINOR_VERSION=""
fi
fi
# For Ubuntu derivatives, pretend to be their Ubuntu base version
__ubuntu_derivatives_translation
# For Debian derivates, pretend to be their Debian base version
__debian_derivatives_translation
# Fail soon for end of life versions
__check_end_of_life_versions
echodebug "Binaries will be searched using the following \$PATH: ${PATH}" echodebug "Binaries will be searched using the following \$PATH: ${PATH}"
# Let users know that we'll use a proxy # Let users know that we'll use a proxy
@ -1469,34 +1643,6 @@ if [ $_START_DAEMONS -eq $BS_FALSE ]; then
echoinfo "Daemons will not be started" echoinfo "Daemons will not be started"
fi fi
# Simplify distro name naming on functions
DISTRO_NAME_L=$(echo "$DISTRO_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-zA-Z0-9_ ]//g' | sed -re 's/([[:space:]])+/_/g')
# For Ubuntu derivatives, pretend to be their Ubuntu base version
__ubuntu_derivatives_translation
# For Debian derivates, pretend to be their Debian base version
__debian_derivatives_translation
# Simplify version naming on functions
if [ "$DISTRO_VERSION" = "" ] || [ ${_SIMPLIFY_VERSION} -eq $BS_FALSE ]; then
DISTRO_MAJOR_VERSION=""
DISTRO_MINOR_VERSION=""
PREFIXED_DISTRO_MAJOR_VERSION=""
PREFIXED_DISTRO_MINOR_VERSION=""
else
DISTRO_MAJOR_VERSION=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g')
DISTRO_MINOR_VERSION=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).\([0-9]*\).*/\2/g')
PREFIXED_DISTRO_MAJOR_VERSION="_${DISTRO_MAJOR_VERSION}"
if [ "${PREFIXED_DISTRO_MAJOR_VERSION}" = "_" ]; then
PREFIXED_DISTRO_MAJOR_VERSION=""
fi
PREFIXED_DISTRO_MINOR_VERSION="_${DISTRO_MINOR_VERSION}"
if [ "${PREFIXED_DISTRO_MINOR_VERSION}" = "_" ]; then
PREFIXED_DISTRO_MINOR_VERSION=""
fi
fi
# For ubuntu versions, obtain the codename from the release version # For ubuntu versions, obtain the codename from the release version
__ubuntu_codename_translation __ubuntu_codename_translation
@ -1768,152 +1914,6 @@ __git_clone_and_checkout() {
} }
#--- FUNCTION -------------------------------------------------------------------------------------------------------
# NAME: __check_end_of_life_versions
# DESCRIPTION: Check for end of life distribution versions
#----------------------------------------------------------------------------------------------------------------------
__check_end_of_life_versions() {
case "${DISTRO_NAME_L}" in
debian)
# Debian versions bellow 6 are not supported
if [ "$DISTRO_MAJOR_VERSION" -lt 7 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " https://wiki.debian.org/DebianReleases"
exit 1
fi
;;
ubuntu)
# Ubuntu versions not supported
#
# < 12.04
# 13.x, 15.x
# 12.10, 14.10
if [ "$DISTRO_MAJOR_VERSION" -lt 12 ] || \
[ "$DISTRO_MAJOR_VERSION" -eq 13 ] || \
[ "$DISTRO_MAJOR_VERSION" -eq 15 ] || \
([ "$DISTRO_MAJOR_VERSION" -lt 16 ] && [ "$DISTRO_MINOR_VERSION" -eq 10 ]); then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " https://wiki.ubuntu.com/Releases"
exit 1
fi
;;
opensuse)
# openSUSE versions not supported
#
# <= 12.1
if ([ "$DISTRO_MAJOR_VERSION" -eq 12 ] && [ "$DISTRO_MINOR_VERSION" -eq 1 ]) || [ "$DISTRO_MAJOR_VERSION" -lt 12 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " http://en.opensuse.org/Lifetime"
exit 1
fi
;;
suse)
# SuSE versions not supported
#
# < 11 SP2
SUSE_PATCHLEVEL=$(awk '/PATCHLEVEL/ {print $3}' /etc/SuSE-release )
if [ "${SUSE_PATCHLEVEL}" = "" ]; then
SUSE_PATCHLEVEL="00"
fi
if ([ "$DISTRO_MAJOR_VERSION" -eq 11 ] && [ "$SUSE_PATCHLEVEL" -lt 02 ]) || [ "$DISTRO_MAJOR_VERSION" -lt 11 ]; then
echoerror "Versions lower than SuSE 11 SP2 are not supported."
echoerror "Please consider upgrading to the next stable"
exit 1
fi
;;
fedora)
# Fedora lower than 18 are no longer supported
if [ "$DISTRO_MAJOR_VERSION" -lt 23 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " https://fedoraproject.org/wiki/Releases"
exit 1
fi
;;
centos)
# CentOS versions lower than 5 are no longer supported
if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " http://wiki.centos.org/Download"
exit 1
fi
;;
red_hat*linux)
# Red Hat (Enterprise) Linux versions lower than 5 are no longer supported
if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " https://access.redhat.com/support/policy/updates/errata/"
exit 1
fi
;;
oracle*linux)
# Oracle Linux versions lower than 5 are no longer supported
if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " http://www.oracle.com/us/support/library/elsp-lifetime-069338.pdf"
exit 1
fi
;;
scientific*linux)
# Scientific Linux versions lower than 5 are no longer supported
if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " https://www.scientificlinux.org/downloads/sl-versions/"
exit 1
fi
;;
cloud*linux)
# Cloud Linux versions lower than 5 are no longer supported
if [ "$DISTRO_MAJOR_VERSION" -lt 6 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " https://docs.cloudlinux.com/index.html?cloudlinux_life-cycle.html"
exit 1
fi
;;
amazon*linux*ami)
# Amazon Linux versions lower than 2012.0X no longer supported
if [ "$DISTRO_MAJOR_VERSION" -lt 2012 ]; then
echoerror "End of life distributions are not supported."
echoerror "Please consider upgrading to the next stable. See:"
echoerror " https://aws.amazon.com/amazon-linux-ami/"
exit 1
fi
;;
freebsd)
# FreeBSD versions lower than 9.1 are not supported.
if ([ "$DISTRO_MAJOR_VERSION" -eq 9 ] && [ "$DISTRO_MINOR_VERSION" -lt 01 ]) || [ "$DISTRO_MAJOR_VERSION" -lt 9 ]; then
echoerror "Versions lower than FreeBSD 9.1 are not supported."
exit 1
fi
;;
*)
;;
esac
}
# Fail soon for end of life versions
__check_end_of_life_versions
#--- FUNCTION ------------------------------------------------------------------------------------------------------- #--- FUNCTION -------------------------------------------------------------------------------------------------------
# NAME: __copyfile # NAME: __copyfile
# DESCRIPTION: Simple function to copy files. Overrides if asked. # DESCRIPTION: Simple function to copy files. Overrides if asked.
@ -2480,37 +2480,28 @@ __enable_universe_repository() {
} }
install_ubuntu_deps() { install_ubuntu_deps() {
if [ "$DISTRO_MAJOR_VERSION" -gt 12 ]; then
# Above Ubuntu 12.04 add-apt-repository is in a different package
__apt_get_install_noinput software-properties-common || return 1
else
__apt_get_install_noinput python-software-properties || return 1
fi
if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then
__enable_universe_repository || return 1 # Install add-apt-repository
if ! __check_command_exists add-apt-repository; then
# Versions starting with 2015.5.6 and 2015.8.1 are hosted at repo.saltstack.com __apt_get_install_noinput software-properties-common || return 1
if [ "$(echo "$STABLE_REV" | egrep '^(2015\.5|2015\.8|2016\.3|2016\.11|latest|archive\/)')" = "" ]; then
if [ "$DISTRO_MAJOR_VERSION" -lt 14 ]; then
echoinfo "Installing Python Requests/Chardet from Chris Lea's PPA repository"
add-apt-repository -y "ppa:chris-lea/python-requests" || return 1
add-apt-repository -y "ppa:chris-lea/python-chardet" || return 1
add-apt-repository -y "ppa:chris-lea/python-urllib3" || return 1
add-apt-repository -y "ppa:chris-lea/python-crypto" || return 1
fi
fi fi
__enable_universe_repository || return 1
apt-get update apt-get update
fi fi
# Minimal systems might not have upstart installed, install it __PACKAGES=''
__PACKAGES="upstart"
if [ "$DISTRO_MAJOR_VERSION" -lt 16 ]; then
# Minimal systems might not have upstart installed, install it
__PACKAGES="upstart"
fi
if [ "$DISTRO_MAJOR_VERSION" -ge 16 ]; then if [ "$DISTRO_MAJOR_VERSION" -ge 16 ]; then
__PACKAGES="${__PACKAGES} python2.7" __PACKAGES="${__PACKAGES} python2.7"
fi fi
if [ "$_VIRTUALENV_DIR" != "null" ]; then if [ "$_VIRTUALENV_DIR" != "null" ]; then
__PACKAGES="${__PACKAGES} python-virtualenv" __PACKAGES="${__PACKAGES} python-virtualenv"
fi fi
@ -2625,13 +2616,6 @@ install_ubuntu_stable_deps() {
install_ubuntu_daily_deps() { install_ubuntu_daily_deps() {
install_ubuntu_stable_deps || return 1 install_ubuntu_stable_deps || return 1
if [ "$DISTRO_MAJOR_VERSION" -gt 12 ]; then
__apt_get_install_noinput software-properties-common || return 1
else
# Ubuntu 12.04 needs python-software-properties to get add-apt-repository binary
__apt_get_install_noinput python-software-properties || return 1
fi
if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then if [ $_DISABLE_REPOS -eq $BS_FALSE ]; then
__enable_universe_repository || return 1 __enable_universe_repository || return 1
@ -2716,11 +2700,13 @@ install_ubuntu_stable() {
# shellcheck disable=SC2086 # shellcheck disable=SC2086
__apt_get_install_noinput ${__PACKAGES} || return 1 __apt_get_install_noinput ${__PACKAGES} || return 1
return 0 return 0
} }
install_ubuntu_daily() { install_ubuntu_daily() {
install_ubuntu_stable || return 1 install_ubuntu_stable || return 1
return 0 return 0
} }
@ -2735,6 +2721,7 @@ install_ubuntu_git() {
else else
python setup.py ${SETUP_PY_INSTALL_ARGS} install --install-layout=deb || return 1 python setup.py ${SETUP_PY_INSTALL_ARGS} install --install-layout=deb || return 1
fi fi
return 0 return 0
} }
@ -2760,6 +2747,8 @@ install_ubuntu_stable_post() {
update-rc.d salt-$fname defaults update-rc.d salt-$fname defaults
fi fi
done done
return 0
} }
install_ubuntu_git_post() { install_ubuntu_git_post() {
@ -2810,6 +2799,8 @@ install_ubuntu_git_post() {
echoerror "Neither upstart nor init.d was setup for salt-$fname" echoerror "Neither upstart nor init.d was setup for salt-$fname"
fi fi
done done
return 0
} }
install_ubuntu_restart_daemons() { install_ubuntu_restart_daemons() {
@ -2862,6 +2853,7 @@ install_ubuntu_restart_daemons() {
/etc/init.d/salt-$fname stop > /dev/null 2>&1 /etc/init.d/salt-$fname stop > /dev/null 2>&1
/etc/init.d/salt-$fname start /etc/init.d/salt-$fname start
done done
return 0 return 0
} }