Compare commits
10 Commits
test-apach
...
no-duplica
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef01d49d9c | ||
|
|
fd91643a7f | ||
|
|
619b17753e | ||
|
|
60cd920bcb | ||
|
|
f512b5eaa2 | ||
|
|
9800e5d8fc | ||
|
|
e84ed49c56 | ||
|
|
ceea41c1e2 | ||
|
|
456122e342 | ||
|
|
84c1b912d9 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -26,6 +26,7 @@ tags
|
|||||||
\#*#
|
\#*#
|
||||||
.idea
|
.idea
|
||||||
.ropeproject
|
.ropeproject
|
||||||
|
.vscode
|
||||||
|
|
||||||
# auth --cert-path --chain-path
|
# auth --cert-path --chain-path
|
||||||
/*.pem
|
/*.pem
|
||||||
|
|||||||
13
.travis.yml
13
.travis.yml
@@ -62,9 +62,6 @@ matrix:
|
|||||||
- python: "3.4"
|
- python: "3.4"
|
||||||
env: TOXENV=py34
|
env: TOXENV=py34
|
||||||
<<: *not-on-master
|
<<: *not-on-master
|
||||||
- python: "3.7"
|
|
||||||
env: TOXENV=py37
|
|
||||||
<<: *not-on-master
|
|
||||||
- python: "3.8"
|
- python: "3.8"
|
||||||
env: TOXENV=py38
|
env: TOXENV=py38
|
||||||
<<: *not-on-master
|
<<: *not-on-master
|
||||||
@@ -163,9 +160,6 @@ matrix:
|
|||||||
sudo: required
|
sudo: required
|
||||||
services: docker
|
services: docker
|
||||||
<<: *extended-test-suite
|
<<: *extended-test-suite
|
||||||
- python: "3.4"
|
|
||||||
env: TOXENV=py34
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.5"
|
- python: "3.5"
|
||||||
env: TOXENV=py35
|
env: TOXENV=py35
|
||||||
<<: *extended-test-suite
|
<<: *extended-test-suite
|
||||||
@@ -175,9 +169,6 @@ matrix:
|
|||||||
- python: "3.7"
|
- python: "3.7"
|
||||||
env: TOXENV=py37
|
env: TOXENV=py37
|
||||||
<<: *extended-test-suite
|
<<: *extended-test-suite
|
||||||
- python: "3.8"
|
|
||||||
env: TOXENV=py38
|
|
||||||
<<: *extended-test-suite
|
|
||||||
- python: "3.4"
|
- python: "3.4"
|
||||||
env: ACME_SERVER=boulder-v1 TOXENV=integration
|
env: ACME_SERVER=boulder-v1 TOXENV=integration
|
||||||
sudo: required
|
sudo: required
|
||||||
@@ -232,6 +223,10 @@ matrix:
|
|||||||
env: TOXENV=le_auto_centos6
|
env: TOXENV=le_auto_centos6
|
||||||
services: docker
|
services: docker
|
||||||
<<: *extended-test-suite
|
<<: *extended-test-suite
|
||||||
|
- sudo: required
|
||||||
|
env: TOXENV=le_auto_oraclelinux6
|
||||||
|
services: docker
|
||||||
|
<<: *extended-test-suite
|
||||||
- sudo: required
|
- sudo: required
|
||||||
env: TOXENV=docker_dev
|
env: TOXENV=docker_dev
|
||||||
services: docker
|
services: docker
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ extensions = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Please update tox.ini when modifying dependency version requirements
|
# Please update tox.ini when modifying dependency version requirements
|
||||||
install_requires = [
|
install_requires = [
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.29.0
|
acme[dev]==0.29.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||||
# acme/certbot version.
|
# acme/certbot version.
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.29.0',
|
'acme>=0.29.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'mock',
|
'mock',
|
||||||
'python-augeas',
|
'python-augeas',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
|
|||||||
327
certbot-auto
327
certbot-auto
@@ -31,7 +31,7 @@ if [ -z "$VENV_PATH" ]; then
|
|||||||
fi
|
fi
|
||||||
VENV_BIN="$VENV_PATH/bin"
|
VENV_BIN="$VENV_PATH/bin"
|
||||||
BOOTSTRAP_VERSION_PATH="$VENV_PATH/certbot-auto-bootstrap-version.txt"
|
BOOTSTRAP_VERSION_PATH="$VENV_PATH/certbot-auto-bootstrap-version.txt"
|
||||||
LE_AUTO_VERSION="1.0.0"
|
LE_AUTO_VERSION="1.1.0"
|
||||||
BASENAME=$(basename $0)
|
BASENAME=$(basename $0)
|
||||||
USAGE="Usage: $BASENAME [OPTIONS]
|
USAGE="Usage: $BASENAME [OPTIONS]
|
||||||
A self-updating wrapper script for the Certbot ACME client. When run, updates
|
A self-updating wrapper script for the Certbot ACME client. When run, updates
|
||||||
@@ -256,20 +256,28 @@ DeprecationBootstrap() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
MIN_PYTHON_VERSION="2.7"
|
MIN_PYTHON_2_VERSION="2.7"
|
||||||
MIN_PYVER=$(echo "$MIN_PYTHON_VERSION" | sed 's/\.//')
|
MIN_PYVER2=$(echo "$MIN_PYTHON_2_VERSION" | sed 's/\.//')
|
||||||
|
MIN_PYTHON_3_VERSION="3.5"
|
||||||
|
MIN_PYVER3=$(echo "$MIN_PYTHON_3_VERSION" | sed 's/\.//')
|
||||||
# Sets LE_PYTHON to Python version string and PYVER to the first two
|
# Sets LE_PYTHON to Python version string and PYVER to the first two
|
||||||
# digits of the python version
|
# digits of the python version.
|
||||||
|
# MIN_PYVER and MIN_PYTHON_VERSION are also set by this function, and their
|
||||||
|
# values depend on if we try to use Python 3 or Python 2.
|
||||||
DeterminePythonVersion() {
|
DeterminePythonVersion() {
|
||||||
# Arguments: "NOCRASH" if we shouldn't crash if we don't find a good python
|
# Arguments: "NOCRASH" if we shouldn't crash if we don't find a good python
|
||||||
#
|
#
|
||||||
# If no Python is found, PYVER is set to 0.
|
# If no Python is found, PYVER is set to 0.
|
||||||
if [ "$USE_PYTHON_3" = 1 ]; then
|
if [ "$USE_PYTHON_3" = 1 ]; then
|
||||||
|
MIN_PYVER=$MIN_PYVER3
|
||||||
|
MIN_PYTHON_VERSION=$MIN_PYTHON_3_VERSION
|
||||||
for LE_PYTHON in "$LE_PYTHON" python3; do
|
for LE_PYTHON in "$LE_PYTHON" python3; do
|
||||||
# Break (while keeping the LE_PYTHON value) if found.
|
# Break (while keeping the LE_PYTHON value) if found.
|
||||||
$EXISTS "$LE_PYTHON" > /dev/null && break
|
$EXISTS "$LE_PYTHON" > /dev/null && break
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
MIN_PYVER=$MIN_PYVER2
|
||||||
|
MIN_PYTHON_VERSION=$MIN_PYTHON_2_VERSION
|
||||||
for LE_PYTHON in "$LE_PYTHON" python2.7 python27 python2 python; do
|
for LE_PYTHON in "$LE_PYTHON" python2.7 python27 python2 python; do
|
||||||
# Break (while keeping the LE_PYTHON value) if found.
|
# Break (while keeping the LE_PYTHON value) if found.
|
||||||
$EXISTS "$LE_PYTHON" > /dev/null && break
|
$EXISTS "$LE_PYTHON" > /dev/null && break
|
||||||
@@ -285,7 +293,7 @@ DeterminePythonVersion() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PYVER=`"$LE_PYTHON" -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//'`
|
PYVER=$("$LE_PYTHON" -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//')
|
||||||
if [ "$PYVER" -lt "$MIN_PYVER" ]; then
|
if [ "$PYVER" -lt "$MIN_PYVER" ]; then
|
||||||
if [ "$1" != "NOCRASH" ]; then
|
if [ "$1" != "NOCRASH" ]; then
|
||||||
error "You have an ancient version of Python entombed in your operating system..."
|
error "You have an ancient version of Python entombed in your operating system..."
|
||||||
@@ -368,7 +376,9 @@ BootstrapDebCommon() {
|
|||||||
|
|
||||||
# Sets TOOL to the name of the package manager
|
# Sets TOOL to the name of the package manager
|
||||||
# Sets appropriate values for YES_FLAG and QUIET_FLAG based on $ASSUME_YES and $QUIET_FLAG.
|
# Sets appropriate values for YES_FLAG and QUIET_FLAG based on $ASSUME_YES and $QUIET_FLAG.
|
||||||
# Enables EPEL if applicable and possible.
|
# Note: this function is called both while selecting the bootstrap scripts and
|
||||||
|
# during the actual bootstrap. Some things like prompting to user can be done in the latter
|
||||||
|
# case, but not in the former one.
|
||||||
InitializeRPMCommonBase() {
|
InitializeRPMCommonBase() {
|
||||||
if type dnf 2>/dev/null
|
if type dnf 2>/dev/null
|
||||||
then
|
then
|
||||||
@@ -388,26 +398,6 @@ InitializeRPMCommonBase() {
|
|||||||
if [ "$QUIET" = 1 ]; then
|
if [ "$QUIET" = 1 ]; then
|
||||||
QUIET_FLAG='--quiet'
|
QUIET_FLAG='--quiet'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! $TOOL list *virtualenv >/dev/null 2>&1; then
|
|
||||||
echo "To use Certbot, packages from the EPEL repository need to be installed."
|
|
||||||
if ! $TOOL list epel-release >/dev/null 2>&1; then
|
|
||||||
error "Enable the EPEL repository and try running Certbot again."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [ "$ASSUME_YES" = 1 ]; then
|
|
||||||
/bin/echo -n "Enabling the EPEL repository in 3 seconds..."
|
|
||||||
sleep 1s
|
|
||||||
/bin/echo -ne "\e[0K\rEnabling the EPEL repository in 2 seconds..."
|
|
||||||
sleep 1s
|
|
||||||
/bin/echo -e "\e[0K\rEnabling the EPEL repository in 1 second..."
|
|
||||||
sleep 1s
|
|
||||||
fi
|
|
||||||
if ! $TOOL install $YES_FLAG $QUIET_FLAG epel-release; then
|
|
||||||
error "Could not enable EPEL. Aborting bootstrap!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BootstrapRpmCommonBase() {
|
BootstrapRpmCommonBase() {
|
||||||
@@ -488,13 +478,91 @@ BootstrapRpmCommon() {
|
|||||||
BootstrapRpmCommonBase "$python_pkgs"
|
BootstrapRpmCommonBase "$python_pkgs"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If new packages are installed by BootstrapRpmPython3 below, this version
|
||||||
|
# number must be increased.
|
||||||
|
BOOTSTRAP_RPM_PYTHON3_LEGACY_VERSION=1
|
||||||
|
|
||||||
|
# Checks if rh-python36 can be installed.
|
||||||
|
Python36SclIsAvailable() {
|
||||||
|
InitializeRPMCommonBase >/dev/null 2>&1;
|
||||||
|
|
||||||
|
if "${TOOL}" list rh-python36 >/dev/null 2>&1; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if "${TOOL}" list centos-release-scl >/dev/null 2>&1; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Try to enable rh-python36 from SCL if it is necessary and possible.
|
||||||
|
EnablePython36SCL() {
|
||||||
|
if "$EXISTS" python3.6 > /dev/null 2> /dev/null; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [ ! -f /opt/rh/rh-python36/enable ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
set +e
|
||||||
|
if ! . /opt/rh/rh-python36/enable; then
|
||||||
|
error 'Unable to enable rh-python36!'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
}
|
||||||
|
|
||||||
|
# This bootstrap concerns old RedHat-based distributions that do not ship by default
|
||||||
|
# with Python 2.7, but only Python 2.6. We bootstrap them by enabling SCL and installing
|
||||||
|
# Python 3.6. Some of these distributions are: CentOS/RHEL/OL/SL 6.
|
||||||
|
BootstrapRpmPython3Legacy() {
|
||||||
|
# Tested with:
|
||||||
|
# - CentOS 6
|
||||||
|
|
||||||
|
InitializeRPMCommonBase
|
||||||
|
|
||||||
|
if ! "${TOOL}" list rh-python36 >/dev/null 2>&1; then
|
||||||
|
echo "To use Certbot on this operating system, packages from the SCL repository need to be installed."
|
||||||
|
if ! "${TOOL}" list centos-release-scl >/dev/null 2>&1; then
|
||||||
|
error "Enable the SCL repository and try running Certbot again."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ "${ASSUME_YES}" = 1 ]; then
|
||||||
|
/bin/echo -n "Enabling the SCL repository in 3 seconds... (Press Ctrl-C to cancel)"
|
||||||
|
sleep 1s
|
||||||
|
/bin/echo -ne "\e[0K\rEnabling the SCL repository in 2 seconds... (Press Ctrl-C to cancel)"
|
||||||
|
sleep 1s
|
||||||
|
/bin/echo -e "\e[0K\rEnabling the SCL repository in 1 second... (Press Ctrl-C to cancel)"
|
||||||
|
sleep 1s
|
||||||
|
fi
|
||||||
|
if ! "${TOOL}" install "${YES_FLAG}" "${QUIET_FLAG}" centos-release-scl; then
|
||||||
|
error "Could not enable SCL. Aborting bootstrap!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# CentOS 6 must use rh-python36 from SCL
|
||||||
|
if "${TOOL}" list rh-python36 >/dev/null 2>&1; then
|
||||||
|
python_pkgs="rh-python36-python
|
||||||
|
rh-python36-python-virtualenv
|
||||||
|
rh-python36-python-devel
|
||||||
|
"
|
||||||
|
else
|
||||||
|
error "No supported Python package available to install. Aborting bootstrap!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
BootstrapRpmCommonBase "${python_pkgs}"
|
||||||
|
|
||||||
|
# Enable SCL rh-python36 after bootstrapping.
|
||||||
|
EnablePython36SCL
|
||||||
|
}
|
||||||
|
|
||||||
# If new packages are installed by BootstrapRpmPython3 below, this version
|
# If new packages are installed by BootstrapRpmPython3 below, this version
|
||||||
# number must be increased.
|
# number must be increased.
|
||||||
BOOTSTRAP_RPM_PYTHON3_VERSION=1
|
BOOTSTRAP_RPM_PYTHON3_VERSION=1
|
||||||
|
|
||||||
BootstrapRpmPython3() {
|
BootstrapRpmPython3() {
|
||||||
# Tested with:
|
# Tested with:
|
||||||
# - CentOS 6
|
|
||||||
# - Fedora 29
|
# - Fedora 29
|
||||||
|
|
||||||
InitializeRPMCommonBase
|
InitializeRPMCommonBase
|
||||||
@@ -505,12 +573,6 @@ BootstrapRpmPython3() {
|
|||||||
python3-virtualenv
|
python3-virtualenv
|
||||||
python3-devel
|
python3-devel
|
||||||
"
|
"
|
||||||
# EPEL uses python34
|
|
||||||
elif $TOOL list python34 >/dev/null 2>&1; then
|
|
||||||
python_pkgs="python34
|
|
||||||
python34-devel
|
|
||||||
python34-tools
|
|
||||||
"
|
|
||||||
else
|
else
|
||||||
error "No supported Python package available to install. Aborting bootstrap!"
|
error "No supported Python package available to install. Aborting bootstrap!"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -758,6 +820,11 @@ elif [ -f /etc/redhat-release ]; then
|
|||||||
|
|
||||||
RPM_DIST_NAME=`(. /etc/os-release 2> /dev/null && echo $ID) || echo "unknown"`
|
RPM_DIST_NAME=`(. /etc/os-release 2> /dev/null && echo $ID) || echo "unknown"`
|
||||||
|
|
||||||
|
if [ "$PYVER" -eq 26 -a $(uname -m) != 'x86_64' ]; then
|
||||||
|
# 32 bits CentOS 6 and affiliates are not supported anymore by certbot-auto.
|
||||||
|
DEPRECATED_OS=1
|
||||||
|
fi
|
||||||
|
|
||||||
# Set RPM_DIST_VERSION to VERSION_ID from /etc/os-release after splitting on
|
# Set RPM_DIST_VERSION to VERSION_ID from /etc/os-release after splitting on
|
||||||
# '.' characters (e.g. "8.0" becomes "8"). If the command exits with an
|
# '.' characters (e.g. "8.0" becomes "8"). If the command exits with an
|
||||||
# error, RPM_DIST_VERSION is set to "unknown".
|
# error, RPM_DIST_VERSION is set to "unknown".
|
||||||
@@ -769,31 +836,50 @@ elif [ -f /etc/redhat-release ]; then
|
|||||||
RPM_DIST_VERSION=0
|
RPM_DIST_VERSION=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Starting to Fedora 29, python2 is on a deprecation path. Let's move to python3 then.
|
# Handle legacy RPM distributions
|
||||||
# RHEL 8 also uses python3 by default.
|
if [ "$PYVER" -eq 26 ]; then
|
||||||
if [ "$RPM_DIST_NAME" = "fedora" -a "$RPM_DIST_VERSION" -ge 29 -o "$PYVER" -eq 26 ]; then
|
# Check if an automated bootstrap can be achieved on this system.
|
||||||
RPM_USE_PYTHON_3=1
|
if ! Python36SclIsAvailable; then
|
||||||
elif [ "$RPM_DIST_NAME" = "rhel" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
INTERACTIVE_BOOTSTRAP=1
|
||||||
RPM_USE_PYTHON_3=1
|
fi
|
||||||
elif [ "$RPM_DIST_NAME" = "centos" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
|
||||||
RPM_USE_PYTHON_3=1
|
|
||||||
else
|
|
||||||
RPM_USE_PYTHON_3=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$RPM_USE_PYTHON_3" = 1 ]; then
|
|
||||||
Bootstrap() {
|
Bootstrap() {
|
||||||
BootstrapMessage "RedHat-based OSes that will use Python3"
|
BootstrapMessage "Legacy RedHat-based OSes that will use Python3"
|
||||||
BootstrapRpmPython3
|
BootstrapRpmPython3Legacy
|
||||||
}
|
}
|
||||||
USE_PYTHON_3=1
|
USE_PYTHON_3=1
|
||||||
BOOTSTRAP_VERSION="BootstrapRpmPython3 $BOOTSTRAP_RPM_PYTHON3_VERSION"
|
BOOTSTRAP_VERSION="BootstrapRpmPython3Legacy $BOOTSTRAP_RPM_PYTHON3_LEGACY_VERSION"
|
||||||
|
|
||||||
|
# Try now to enable SCL rh-python36 for systems already bootstrapped
|
||||||
|
# NB: EnablePython36SCL has been defined along with BootstrapRpmPython3Legacy in certbot-auto
|
||||||
|
EnablePython36SCL
|
||||||
else
|
else
|
||||||
Bootstrap() {
|
# Starting to Fedora 29, python2 is on a deprecation path. Let's move to python3 then.
|
||||||
BootstrapMessage "RedHat-based OSes"
|
# RHEL 8 also uses python3 by default.
|
||||||
BootstrapRpmCommon
|
if [ "$RPM_DIST_NAME" = "fedora" -a "$RPM_DIST_VERSION" -ge 29 ]; then
|
||||||
}
|
RPM_USE_PYTHON_3=1
|
||||||
BOOTSTRAP_VERSION="BootstrapRpmCommon $BOOTSTRAP_RPM_COMMON_VERSION"
|
elif [ "$RPM_DIST_NAME" = "rhel" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
||||||
|
RPM_USE_PYTHON_3=1
|
||||||
|
elif [ "$RPM_DIST_NAME" = "centos" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
||||||
|
RPM_USE_PYTHON_3=1
|
||||||
|
else
|
||||||
|
RPM_USE_PYTHON_3=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$RPM_USE_PYTHON_3" = 1 ]; then
|
||||||
|
Bootstrap() {
|
||||||
|
BootstrapMessage "RedHat-based OSes that will use Python3"
|
||||||
|
BootstrapRpmPython3
|
||||||
|
}
|
||||||
|
USE_PYTHON_3=1
|
||||||
|
BOOTSTRAP_VERSION="BootstrapRpmPython3 $BOOTSTRAP_RPM_PYTHON3_VERSION"
|
||||||
|
else
|
||||||
|
Bootstrap() {
|
||||||
|
BootstrapMessage "RedHat-based OSes"
|
||||||
|
BootstrapRpmCommon
|
||||||
|
}
|
||||||
|
BOOTSTRAP_VERSION="BootstrapRpmCommon $BOOTSTRAP_RPM_COMMON_VERSION"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LE_PYTHON="$prev_le_python"
|
LE_PYTHON="$prev_le_python"
|
||||||
@@ -870,6 +956,13 @@ if [ "$NO_BOOTSTRAP" = 1 ]; then
|
|||||||
unset BOOTSTRAP_VERSION
|
unset BOOTSTRAP_VERSION
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$DEPRECATED_OS" = 1 ]; then
|
||||||
|
Bootstrap() {
|
||||||
|
error "Skipping bootstrap because certbot-auto is deprecated on this system."
|
||||||
|
}
|
||||||
|
unset BOOTSTRAP_VERSION
|
||||||
|
fi
|
||||||
|
|
||||||
# Sets PREV_BOOTSTRAP_VERSION to the identifier for the bootstrap script used
|
# Sets PREV_BOOTSTRAP_VERSION to the identifier for the bootstrap script used
|
||||||
# to install OS dependencies on this system. PREV_BOOTSTRAP_VERSION isn't set
|
# to install OS dependencies on this system. PREV_BOOTSTRAP_VERSION isn't set
|
||||||
# if it is unknown how OS dependencies were installed on this system.
|
# if it is unknown how OS dependencies were installed on this system.
|
||||||
@@ -1067,6 +1160,28 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
# Phase 2: Create venv, install LE, and run.
|
# Phase 2: Create venv, install LE, and run.
|
||||||
|
|
||||||
shift 1 # the --le-auto-phase2 arg
|
shift 1 # the --le-auto-phase2 arg
|
||||||
|
|
||||||
|
if [ "$DEPRECATED_OS" = 1 ]; then
|
||||||
|
# Phase 2 damage control mode for deprecated OSes.
|
||||||
|
# In this situation, we bypass any bootstrap or certbot venv setup.
|
||||||
|
error "Your system is not supported by certbot-auto anymore."
|
||||||
|
|
||||||
|
if [ ! -d "$VENV_PATH" ] && OldVenvExists; then
|
||||||
|
VENV_BIN="$OLD_VENV_PATH/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$VENV_BIN/letsencrypt" -a "$INSTALL_ONLY" != 1 ]; then
|
||||||
|
error "Certbot will no longer receive updates."
|
||||||
|
error "Please visit https://certbot.eff.org/ to check for other alternatives."
|
||||||
|
"$VENV_BIN/letsencrypt" "$@"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
error "Certbot cannot be installed."
|
||||||
|
error "Please visit https://certbot.eff.org/ to check for other alternatives."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
SetPrevBootstrapVersion
|
SetPrevBootstrapVersion
|
||||||
|
|
||||||
if [ -z "$PHASE_1_VERSION" -a "$USE_PYTHON_3" = 1 ]; then
|
if [ -z "$PHASE_1_VERSION" -a "$USE_PYTHON_3" = 1 ]; then
|
||||||
@@ -1078,8 +1193,15 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
# If the selected Bootstrap function isn't a noop and it differs from the
|
# If the selected Bootstrap function isn't a noop and it differs from the
|
||||||
# previously used version
|
# previously used version
|
||||||
if [ -n "$BOOTSTRAP_VERSION" -a "$BOOTSTRAP_VERSION" != "$PREV_BOOTSTRAP_VERSION" ]; then
|
if [ -n "$BOOTSTRAP_VERSION" -a "$BOOTSTRAP_VERSION" != "$PREV_BOOTSTRAP_VERSION" ]; then
|
||||||
# if non-interactive mode or stdin and stdout are connected to a terminal
|
# Check if we can rebootstrap without manual user intervention: this requires that
|
||||||
if [ \( "$NONINTERACTIVE" = 1 \) -o \( \( -t 0 \) -a \( -t 1 \) \) ]; then
|
# certbot-auto is in non-interactive mode AND selected bootstrap does not claim to
|
||||||
|
# require a manual user intervention.
|
||||||
|
if [ "$NONINTERACTIVE" = 1 -a "$INTERACTIVE_BOOTSTRAP" != 1 ]; then
|
||||||
|
CAN_REBOOTSTRAP=1
|
||||||
|
fi
|
||||||
|
# Check if rebootstrap can be done non-interactively and current shell is non-interactive
|
||||||
|
# (true if stdin and stdout are not attached to a terminal).
|
||||||
|
if [ \( "$CAN_REBOOTSTRAP" = 1 \) -o \( \( -t 0 \) -a \( -t 1 \) \) ]; then
|
||||||
if [ -d "$VENV_PATH" ]; then
|
if [ -d "$VENV_PATH" ]; then
|
||||||
rm -rf "$VENV_PATH"
|
rm -rf "$VENV_PATH"
|
||||||
fi
|
fi
|
||||||
@@ -1090,12 +1212,21 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
ln -s "$VENV_PATH" "$OLD_VENV_PATH"
|
ln -s "$VENV_PATH" "$OLD_VENV_PATH"
|
||||||
fi
|
fi
|
||||||
RerunWithArgs "$@"
|
RerunWithArgs "$@"
|
||||||
|
# Otherwise bootstrap needs to be done manually by the user.
|
||||||
else
|
else
|
||||||
error "Skipping upgrade because new OS dependencies may need to be installed."
|
# If it is because bootstrapping is interactive, --non-interactive will be of no use.
|
||||||
error
|
if [ "$INTERACTIVE_BOOTSTRAP" = 1 ]; then
|
||||||
error "To upgrade to a newer version, please run this script again manually so you can"
|
error "Skipping upgrade because new OS dependencies may need to be installed."
|
||||||
error "approve changes or with --non-interactive on the command line to automatically"
|
error "This requires manual user intervention: please run this script again manually."
|
||||||
error "install any required packages."
|
# If this is because of the environment (eg. non interactive shell without
|
||||||
|
# --non-interactive flag set), help the user in that direction.
|
||||||
|
else
|
||||||
|
error "Skipping upgrade because new OS dependencies may need to be installed."
|
||||||
|
error
|
||||||
|
error "To upgrade to a newer version, please run this script again manually so you can"
|
||||||
|
error "approve changes or with --non-interactive on the command line to automatically"
|
||||||
|
error "install any required packages."
|
||||||
|
fi
|
||||||
# Set INSTALLED_VERSION to be the same so we don't update the venv
|
# Set INSTALLED_VERSION to be the same so we don't update the venv
|
||||||
INSTALLED_VERSION="$LE_AUTO_VERSION"
|
INSTALLED_VERSION="$LE_AUTO_VERSION"
|
||||||
# Continue to use OLD_VENV_PATH if the new venv doesn't exist
|
# Continue to use OLD_VENV_PATH if the new venv doesn't exist
|
||||||
@@ -1372,18 +1503,18 @@ letsencrypt==0.7.0 \
|
|||||||
--hash=sha256:105a5fb107e45bcd0722eb89696986dcf5f08a86a321d6aef25a0c7c63375ade \
|
--hash=sha256:105a5fb107e45bcd0722eb89696986dcf5f08a86a321d6aef25a0c7c63375ade \
|
||||||
--hash=sha256:c36e532c486a7e92155ee09da54b436a3c420813ec1c590b98f635d924720de9
|
--hash=sha256:c36e532c486a7e92155ee09da54b436a3c420813ec1c590b98f635d924720de9
|
||||||
|
|
||||||
certbot==1.0.0 \
|
certbot==1.1.0 \
|
||||||
--hash=sha256:8d074cff89dee002dec1c47cb0da04ea8e0ede8d68838b6d54aa41580d9262df \
|
--hash=sha256:66a5cab9267349941604c2c98082bfef85877653c023fc324b1c3869fb16add6 \
|
||||||
--hash=sha256:86b82d31db19fffffb0d6b218951e2121ef514e3ff659aa042deaf92a33e302a
|
--hash=sha256:46e93661a0db53f416c0f5476d8d2e62bc7259b7660dd983453b85df9ef6e8b8
|
||||||
acme==1.0.0 \
|
acme==1.1.0 \
|
||||||
--hash=sha256:f6972e436e76f7f1e395e81e149f8713ca8462d465b14993bddc53fb18a40644 \
|
--hash=sha256:11b9beba706fb8f652c8910d46dd1939d670cac8169f3c66c18c080ed3353e71 \
|
||||||
--hash=sha256:6a08f12f848ce563b50bca421ba9db653df9f82cfefeaf8aba517f046d1386c2
|
--hash=sha256:c305a20eeb9cb02240347703d497891c13d43a47c794fa100d4dbb479a5370d9
|
||||||
certbot-apache==1.0.0 \
|
certbot-apache==1.1.0 \
|
||||||
--hash=sha256:e591d0cf773ad33ee978f7adb1b69288eac2c8847c643b06e70260e707626f8e \
|
--hash=sha256:9c847ff223c2e465e241c78d22f97cee77d5e551df608bed06c55f8627f4cbd2 \
|
||||||
--hash=sha256:7335ab5687a0a47d9041d9e13f3a2d67d0e8372da97ab639edb31c14b787cd68
|
--hash=sha256:05e84dfe96b72582cde97c490977d8e2d33d440c927a320debb4cf287f6fadcc
|
||||||
certbot-nginx==1.0.0 \
|
certbot-nginx==1.1.0 \
|
||||||
--hash=sha256:ce8a2e51165da7c15bfdc059cd6572d0f368c078f1e1a77633a2773310b2f231 \
|
--hash=sha256:bf06fa2f5059f0fdb7d352c8739e1ed0830db4f0d89e812dab4f081bda6ec7d6 \
|
||||||
--hash=sha256:63b4ae09d4f1c9ef0a1a2a49c3f651d8a7cb30303ec6f954239e987c5da45dc4
|
--hash=sha256:0a80ecbd2a30f3757c7652cabfff854ca07873b1cf02ebbe1892786c3b3a5874
|
||||||
|
|
||||||
UNLIKELY_EOF
|
UNLIKELY_EOF
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
@@ -1617,6 +1748,9 @@ UNLIKELY_EOF
|
|||||||
say "Installation succeeded."
|
say "Installation succeeded."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If you're modifying any of the code after this point in this current `if` block, you
|
||||||
|
# may need to update the "$DEPRECATED_OS" = 1 case at the beginning of phase 2 as well.
|
||||||
|
|
||||||
if [ "$INSTALL_ONLY" = 1 ]; then
|
if [ "$INSTALL_ONLY" = 1 ]; then
|
||||||
say "Certbot is installed."
|
say "Certbot is installed."
|
||||||
exit 0
|
exit 0
|
||||||
@@ -1828,30 +1962,35 @@ UNLIKELY_EOF
|
|||||||
error "WARNING: unable to check for updates."
|
error "WARNING: unable to check for updates."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LE_VERSION_STATE=`CompareVersions "$LE_PYTHON" "$LE_AUTO_VERSION" "$REMOTE_VERSION"`
|
# If for any reason REMOTE_VERSION is not set, let's assume certbot-auto is up-to-date,
|
||||||
if [ "$LE_VERSION_STATE" = "UNOFFICIAL" ]; then
|
# and do not go into the self-upgrading process.
|
||||||
say "Unofficial certbot-auto version detected, self-upgrade is disabled: $LE_AUTO_VERSION"
|
if [ -n "$REMOTE_VERSION" ]; then
|
||||||
elif [ "$LE_VERSION_STATE" = "OUTDATED" ]; then
|
LE_VERSION_STATE=`CompareVersions "$LE_PYTHON" "$LE_AUTO_VERSION" "$REMOTE_VERSION"`
|
||||||
say "Upgrading certbot-auto $LE_AUTO_VERSION to $REMOTE_VERSION..."
|
|
||||||
|
|
||||||
# Now we drop into Python so we don't have to install even more
|
if [ "$LE_VERSION_STATE" = "UNOFFICIAL" ]; then
|
||||||
# dependencies (curl, etc.), for better flow control, and for the option of
|
say "Unofficial certbot-auto version detected, self-upgrade is disabled: $LE_AUTO_VERSION"
|
||||||
# future Windows compatibility.
|
elif [ "$LE_VERSION_STATE" = "OUTDATED" ]; then
|
||||||
"$LE_PYTHON" "$TEMP_DIR/fetch.py" --le-auto-script "v$REMOTE_VERSION"
|
say "Upgrading certbot-auto $LE_AUTO_VERSION to $REMOTE_VERSION..."
|
||||||
|
|
||||||
# Install new copy of certbot-auto.
|
# Now we drop into Python so we don't have to install even more
|
||||||
# TODO: Deal with quotes in pathnames.
|
# dependencies (curl, etc.), for better flow control, and for the option of
|
||||||
say "Replacing certbot-auto..."
|
# future Windows compatibility.
|
||||||
# Clone permissions with cp. chmod and chown don't have a --reference
|
"$LE_PYTHON" "$TEMP_DIR/fetch.py" --le-auto-script "v$REMOTE_VERSION"
|
||||||
# option on macOS or BSD, and stat -c on Linux is stat -f on macOS and BSD:
|
|
||||||
cp -p "$0" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
# Install new copy of certbot-auto.
|
||||||
cp "$TEMP_DIR/letsencrypt-auto" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
# TODO: Deal with quotes in pathnames.
|
||||||
# Using mv rather than cp leaves the old file descriptor pointing to the
|
say "Replacing certbot-auto..."
|
||||||
# original copy so the shell can continue to read it unmolested. mv across
|
# Clone permissions with cp. chmod and chown don't have a --reference
|
||||||
# filesystems is non-atomic, doing `rm dest, cp src dest, rm src`, but the
|
# option on macOS or BSD, and stat -c on Linux is stat -f on macOS and BSD:
|
||||||
# cp is unlikely to fail if the rm doesn't.
|
cp -p "$0" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
||||||
mv -f "$TEMP_DIR/letsencrypt-auto.permission-clone" "$0"
|
cp "$TEMP_DIR/letsencrypt-auto" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
||||||
fi # A newer version is available.
|
# Using mv rather than cp leaves the old file descriptor pointing to the
|
||||||
|
# original copy so the shell can continue to read it unmolested. mv across
|
||||||
|
# filesystems is non-atomic, doing `rm dest, cp src dest, rm src`, but the
|
||||||
|
# cp is unlikely to fail if the rm doesn't.
|
||||||
|
mv -f "$TEMP_DIR/letsencrypt-auto.permission-clone" "$0"
|
||||||
|
fi # A newer version is available.
|
||||||
|
fi
|
||||||
fi # Self-upgrading is allowed.
|
fi # Self-upgrading is allowed.
|
||||||
|
|
||||||
RerunWithArgs --le-auto-phase2 "$@"
|
RerunWithArgs --le-auto-phase2 "$@"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import sys
|
|||||||
from setuptools import find_packages
|
from setuptools import find_packages
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'certbot',
|
'certbot',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'sphinx.ext.viewcode']
|
'sphinx.ext.viewcode']
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.29.0
|
acme[dev]==0.29.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||||
# acme/certbot version.
|
# acme/certbot version.
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.29.0',
|
'acme>=0.29.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'cloudflare>=1.5.1',
|
'cloudflare>=1.5.1',
|
||||||
'mock',
|
'mock',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'sphinx.ext.viewcode']
|
'sphinx.ext.viewcode']
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.31.0
|
acme[dev]==0.31.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||||
# acme/certbot version.
|
# acme/certbot version.
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.31.0',
|
'acme>=0.31.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'dns-lexicon>=2.2.1', # Support for >1 TXT record per name
|
'dns-lexicon>=2.2.1', # Support for >1 TXT record per name
|
||||||
'mock',
|
'mock',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'sphinx.ext.viewcode']
|
'sphinx.ext.viewcode']
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.29.0
|
acme[dev]==0.29.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||||
# acme/certbot version.
|
# acme/certbot version.
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.29.0',
|
'acme>=0.29.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'mock',
|
'mock',
|
||||||
'python-digitalocean>=1.11',
|
'python-digitalocean>=1.11',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'sphinx.ext.viewcode']
|
'sphinx.ext.viewcode']
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.31.0
|
acme[dev]==0.31.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||||
# acme/certbot version.
|
# acme/certbot version.
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.31.0',
|
'acme>=0.31.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'mock',
|
'mock',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
'zope.interface',
|
'zope.interface',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'sphinx.ext.viewcode']
|
'sphinx.ext.viewcode']
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.31.0
|
acme[dev]==0.31.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||||
# acme/certbot version.
|
# acme/certbot version.
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.31.0',
|
'acme>=0.31.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'dns-lexicon>=2.2.1', # Support for >1 TXT record per name
|
'dns-lexicon>=2.2.1', # Support for >1 TXT record per name
|
||||||
'mock',
|
'mock',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'sphinx.ext.viewcode']
|
'sphinx.ext.viewcode']
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.31.0
|
acme[dev]==0.31.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Please update tox.ini when modifying dependency version requirements
|
# Please update tox.ini when modifying dependency version requirements
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.31.0',
|
'acme>=0.31.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'dns-lexicon>=2.1.22',
|
'dns-lexicon>=2.1.22',
|
||||||
'mock',
|
'mock',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'jsonlexer']
|
'jsonlexer']
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.29.0
|
acme[dev]==0.29.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||||
# acme/certbot version.
|
# acme/certbot version.
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.29.0',
|
'acme>=0.29.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'google-api-python-client>=1.5.5',
|
'google-api-python-client>=1.5.5',
|
||||||
'mock',
|
'mock',
|
||||||
'oauth2client>=4.0',
|
'oauth2client>=4.0',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'sphinx.ext.viewcode']
|
'sphinx.ext.viewcode']
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.31.0
|
acme[dev]==0.31.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
dns-lexicon==2.2.3
|
dns-lexicon==2.2.3
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Please update tox.ini when modifying dependency version requirements
|
# Please update tox.ini when modifying dependency version requirements
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.31.0',
|
'acme>=0.31.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'dns-lexicon>=2.2.3',
|
'dns-lexicon>=2.2.3',
|
||||||
'mock',
|
'mock',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'sphinx.ext.viewcode']
|
'sphinx.ext.viewcode']
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.31.0
|
acme[dev]==0.31.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||||
# acme/certbot version.
|
# acme/certbot version.
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.31.0',
|
'acme>=0.31.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'dns-lexicon>=2.2.1', # Support for >1 TXT record per name
|
'dns-lexicon>=2.2.1', # Support for >1 TXT record per name
|
||||||
'mock',
|
'mock',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'sphinx.ext.viewcode']
|
'sphinx.ext.viewcode']
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.31.0
|
acme[dev]==0.31.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||||
# acme/certbot version.
|
# acme/certbot version.
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.31.0',
|
'acme>=0.31.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'dns-lexicon>=2.2.1', # Support for >1 TXT record per name
|
'dns-lexicon>=2.2.1', # Support for >1 TXT record per name
|
||||||
'mock',
|
'mock',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'sphinx.ext.viewcode']
|
'sphinx.ext.viewcode']
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.31.0
|
acme[dev]==0.31.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
dns-lexicon==2.7.14
|
dns-lexicon==2.7.14
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||||
# acme/certbot version.
|
# acme/certbot version.
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.31.0',
|
'acme>=0.31.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'dns-lexicon>=2.7.14', # Correct proxy use on OVH provider
|
'dns-lexicon>=2.7.14', # Correct proxy use on OVH provider
|
||||||
'mock',
|
'mock',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'sphinx.ext.viewcode']
|
'sphinx.ext.viewcode']
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.29.0
|
acme[dev]==0.29.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||||
# acme/certbot version.
|
# acme/certbot version.
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.29.0',
|
'acme>=0.29.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'dnspython',
|
'dnspython',
|
||||||
'mock',
|
'mock',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'sphinx.ext.viewcode']
|
'sphinx.ext.viewcode']
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.29.0
|
acme[dev]==0.29.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||||
# acme/certbot version.
|
# acme/certbot version.
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.29.0',
|
'acme>=0.29.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'boto3',
|
'boto3',
|
||||||
'mock',
|
'mock',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'sphinx.ext.viewcode']
|
'sphinx.ext.viewcode']
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==0.31.0
|
acme[dev]==0.31.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Please update tox.ini when modifying dependency version requirements
|
# Please update tox.ini when modifying dependency version requirements
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=0.31.0',
|
'acme>=0.31.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'dns-lexicon>=2.1.23',
|
'dns-lexicon>=2.1.23',
|
||||||
'mock',
|
'mock',
|
||||||
'setuptools',
|
'setuptools',
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Remember to update setup.py to match the package versions below.
|
# Remember to update setup.py to match the package versions below.
|
||||||
acme[dev]==1.0.0
|
acme[dev]==1.0.0
|
||||||
-e certbot[dev]
|
certbot[dev]==1.1.0
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ from setuptools import find_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from setuptools.command.test import test as TestCommand
|
from setuptools.command.test import test as TestCommand
|
||||||
|
|
||||||
version = '1.1.0.dev0'
|
version = '1.2.0.dev0'
|
||||||
|
|
||||||
# Remember to update local-oldest-requirements.txt when changing the minimum
|
# Remember to update local-oldest-requirements.txt when changing the minimum
|
||||||
# acme/certbot version.
|
# acme/certbot version.
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'acme>=1.0.0',
|
'acme>=1.0.0',
|
||||||
'certbot>=1.0.0.dev0',
|
'certbot>=1.0.0',
|
||||||
'mock',
|
'mock',
|
||||||
'PyOpenSSL',
|
'PyOpenSSL',
|
||||||
'pyparsing>=1.5.5', # Python3 support; perhaps unnecessary?
|
'pyparsing>=1.5.5', # Python3 support; perhaps unnecessary?
|
||||||
|
|||||||
@@ -2,7 +2,23 @@
|
|||||||
|
|
||||||
Certbot adheres to [Semantic Versioning](https://semver.org/).
|
Certbot adheres to [Semantic Versioning](https://semver.org/).
|
||||||
|
|
||||||
## 1.1.0 - master
|
## 1.2.0 - master
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
*
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
*
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
*
|
||||||
|
|
||||||
|
More details about these changes can be found on our GitHub repo.
|
||||||
|
|
||||||
|
## 1.1.0 - 2020-01-14
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
@@ -13,6 +29,15 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
|
|||||||
* Removed the fallback introduced with 0.34.0 in `acme` to retry a POST-as-GET
|
* Removed the fallback introduced with 0.34.0 in `acme` to retry a POST-as-GET
|
||||||
request as a GET request when the targeted ACME CA server seems to not support
|
request as a GET request when the targeted ACME CA server seems to not support
|
||||||
POST-as-GET requests.
|
POST-as-GET requests.
|
||||||
|
* certbot-auto no longer supports architectures other than x86_64 on RHEL 6
|
||||||
|
based systems. Existing certbot-auto installations affected by this will
|
||||||
|
continue to work, but they will no longer receive updates. To install a
|
||||||
|
newer version of Certbot on these systems, you should update your OS.
|
||||||
|
* Support for Python 3.4 in Certbot and its ACME library is deprecated and will be
|
||||||
|
removed in the next release of Certbot. certbot-auto users on x86_64 systems running
|
||||||
|
RHEL 6 or derivatives will be asked to enable Software Collections (SCL) repository
|
||||||
|
so Python 3.6 can be installed. certbot-auto can enable the SCL repo for you on CentOS 6
|
||||||
|
while users on other RHEL 6 based systems will be asked to do this manually.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
"""Certbot client."""
|
"""Certbot client."""
|
||||||
|
|
||||||
# version number like 1.2.3a0, must have at least 2 parts, like 1.2
|
# version number like 1.2.3a0, must have at least 2 parts, like 1.2
|
||||||
__version__ = '1.1.0.dev0'
|
__version__ = '1.2.0.dev0'
|
||||||
|
|||||||
@@ -92,8 +92,8 @@ obtain, install, and renew certificates:
|
|||||||
|
|
||||||
manage certificates:
|
manage certificates:
|
||||||
certificates Display information about certificates you have from Certbot
|
certificates Display information about certificates you have from Certbot
|
||||||
revoke Revoke a certificate (supply --cert-path or --cert-name)
|
revoke Revoke a certificate (supply --cert-name or --cert-path)
|
||||||
delete Delete a certificate
|
delete Delete a certificate (supply --cert-name)
|
||||||
|
|
||||||
manage your account:
|
manage your account:
|
||||||
register Create an ACME account
|
register Create an ACME account
|
||||||
|
|||||||
@@ -1337,6 +1337,10 @@ def main(cli_args=None):
|
|||||||
if config.func != plugins_cmd: # pylint: disable=comparison-with-callable
|
if config.func != plugins_cmd: # pylint: disable=comparison-with-callable
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
if sys.version_info[:2] == (3, 4):
|
||||||
|
logger.warning("Python 3.4 support will be dropped in the next release "
|
||||||
|
"of Certbot - please upgrade your Python version to 3.5+.")
|
||||||
|
|
||||||
set_displayer(config)
|
set_displayer(config)
|
||||||
|
|
||||||
# Reporter
|
# Reporter
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ obtain, install, and renew certificates:
|
|||||||
|
|
||||||
manage certificates:
|
manage certificates:
|
||||||
certificates Display information about certificates you have from Certbot
|
certificates Display information about certificates you have from Certbot
|
||||||
revoke Revoke a certificate (supply --cert-path or --cert-name)
|
revoke Revoke a certificate (supply --cert-name or --cert-path)
|
||||||
delete Delete a certificate
|
delete Delete a certificate (supply --cert-name)
|
||||||
|
|
||||||
manage your account:
|
manage your account:
|
||||||
register Create an ACME account
|
register Create an ACME account
|
||||||
@@ -113,7 +113,7 @@ optional arguments:
|
|||||||
case, and to know when to deprecate support for past
|
case, and to know when to deprecate support for past
|
||||||
Python versions and flags. If you wish to hide this
|
Python versions and flags. If you wish to hide this
|
||||||
information from the Let's Encrypt server, set this to
|
information from the Let's Encrypt server, set this to
|
||||||
"". (default: CertbotACMEClient/1.0.0 (certbot(-auto);
|
"". (default: CertbotACMEClient/1.1.0 (certbot(-auto);
|
||||||
OS_NAME OS_VERSION) Authenticator/XXX Installer/YYY
|
OS_NAME OS_VERSION) Authenticator/XXX Installer/YYY
|
||||||
(SUBCOMMAND; flags: FLAGS) Py/major.minor.patchlevel).
|
(SUBCOMMAND; flags: FLAGS) Py/major.minor.patchlevel).
|
||||||
The flags encoded in the user agent are: --duplicate,
|
The flags encoded in the user agent are: --duplicate,
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ if sphinx.version_info >= (1, 6):
|
|||||||
extensions.append('sphinx.ext.imgconverter')
|
extensions.append('sphinx.ext.imgconverter')
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
327
letsencrypt-auto
327
letsencrypt-auto
@@ -31,7 +31,7 @@ if [ -z "$VENV_PATH" ]; then
|
|||||||
fi
|
fi
|
||||||
VENV_BIN="$VENV_PATH/bin"
|
VENV_BIN="$VENV_PATH/bin"
|
||||||
BOOTSTRAP_VERSION_PATH="$VENV_PATH/certbot-auto-bootstrap-version.txt"
|
BOOTSTRAP_VERSION_PATH="$VENV_PATH/certbot-auto-bootstrap-version.txt"
|
||||||
LE_AUTO_VERSION="1.0.0"
|
LE_AUTO_VERSION="1.1.0"
|
||||||
BASENAME=$(basename $0)
|
BASENAME=$(basename $0)
|
||||||
USAGE="Usage: $BASENAME [OPTIONS]
|
USAGE="Usage: $BASENAME [OPTIONS]
|
||||||
A self-updating wrapper script for the Certbot ACME client. When run, updates
|
A self-updating wrapper script for the Certbot ACME client. When run, updates
|
||||||
@@ -256,20 +256,28 @@ DeprecationBootstrap() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
MIN_PYTHON_VERSION="2.7"
|
MIN_PYTHON_2_VERSION="2.7"
|
||||||
MIN_PYVER=$(echo "$MIN_PYTHON_VERSION" | sed 's/\.//')
|
MIN_PYVER2=$(echo "$MIN_PYTHON_2_VERSION" | sed 's/\.//')
|
||||||
|
MIN_PYTHON_3_VERSION="3.5"
|
||||||
|
MIN_PYVER3=$(echo "$MIN_PYTHON_3_VERSION" | sed 's/\.//')
|
||||||
# Sets LE_PYTHON to Python version string and PYVER to the first two
|
# Sets LE_PYTHON to Python version string and PYVER to the first two
|
||||||
# digits of the python version
|
# digits of the python version.
|
||||||
|
# MIN_PYVER and MIN_PYTHON_VERSION are also set by this function, and their
|
||||||
|
# values depend on if we try to use Python 3 or Python 2.
|
||||||
DeterminePythonVersion() {
|
DeterminePythonVersion() {
|
||||||
# Arguments: "NOCRASH" if we shouldn't crash if we don't find a good python
|
# Arguments: "NOCRASH" if we shouldn't crash if we don't find a good python
|
||||||
#
|
#
|
||||||
# If no Python is found, PYVER is set to 0.
|
# If no Python is found, PYVER is set to 0.
|
||||||
if [ "$USE_PYTHON_3" = 1 ]; then
|
if [ "$USE_PYTHON_3" = 1 ]; then
|
||||||
|
MIN_PYVER=$MIN_PYVER3
|
||||||
|
MIN_PYTHON_VERSION=$MIN_PYTHON_3_VERSION
|
||||||
for LE_PYTHON in "$LE_PYTHON" python3; do
|
for LE_PYTHON in "$LE_PYTHON" python3; do
|
||||||
# Break (while keeping the LE_PYTHON value) if found.
|
# Break (while keeping the LE_PYTHON value) if found.
|
||||||
$EXISTS "$LE_PYTHON" > /dev/null && break
|
$EXISTS "$LE_PYTHON" > /dev/null && break
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
MIN_PYVER=$MIN_PYVER2
|
||||||
|
MIN_PYTHON_VERSION=$MIN_PYTHON_2_VERSION
|
||||||
for LE_PYTHON in "$LE_PYTHON" python2.7 python27 python2 python; do
|
for LE_PYTHON in "$LE_PYTHON" python2.7 python27 python2 python; do
|
||||||
# Break (while keeping the LE_PYTHON value) if found.
|
# Break (while keeping the LE_PYTHON value) if found.
|
||||||
$EXISTS "$LE_PYTHON" > /dev/null && break
|
$EXISTS "$LE_PYTHON" > /dev/null && break
|
||||||
@@ -285,7 +293,7 @@ DeterminePythonVersion() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PYVER=`"$LE_PYTHON" -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//'`
|
PYVER=$("$LE_PYTHON" -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//')
|
||||||
if [ "$PYVER" -lt "$MIN_PYVER" ]; then
|
if [ "$PYVER" -lt "$MIN_PYVER" ]; then
|
||||||
if [ "$1" != "NOCRASH" ]; then
|
if [ "$1" != "NOCRASH" ]; then
|
||||||
error "You have an ancient version of Python entombed in your operating system..."
|
error "You have an ancient version of Python entombed in your operating system..."
|
||||||
@@ -368,7 +376,9 @@ BootstrapDebCommon() {
|
|||||||
|
|
||||||
# Sets TOOL to the name of the package manager
|
# Sets TOOL to the name of the package manager
|
||||||
# Sets appropriate values for YES_FLAG and QUIET_FLAG based on $ASSUME_YES and $QUIET_FLAG.
|
# Sets appropriate values for YES_FLAG and QUIET_FLAG based on $ASSUME_YES and $QUIET_FLAG.
|
||||||
# Enables EPEL if applicable and possible.
|
# Note: this function is called both while selecting the bootstrap scripts and
|
||||||
|
# during the actual bootstrap. Some things like prompting to user can be done in the latter
|
||||||
|
# case, but not in the former one.
|
||||||
InitializeRPMCommonBase() {
|
InitializeRPMCommonBase() {
|
||||||
if type dnf 2>/dev/null
|
if type dnf 2>/dev/null
|
||||||
then
|
then
|
||||||
@@ -388,26 +398,6 @@ InitializeRPMCommonBase() {
|
|||||||
if [ "$QUIET" = 1 ]; then
|
if [ "$QUIET" = 1 ]; then
|
||||||
QUIET_FLAG='--quiet'
|
QUIET_FLAG='--quiet'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! $TOOL list *virtualenv >/dev/null 2>&1; then
|
|
||||||
echo "To use Certbot, packages from the EPEL repository need to be installed."
|
|
||||||
if ! $TOOL list epel-release >/dev/null 2>&1; then
|
|
||||||
error "Enable the EPEL repository and try running Certbot again."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [ "$ASSUME_YES" = 1 ]; then
|
|
||||||
/bin/echo -n "Enabling the EPEL repository in 3 seconds..."
|
|
||||||
sleep 1s
|
|
||||||
/bin/echo -ne "\e[0K\rEnabling the EPEL repository in 2 seconds..."
|
|
||||||
sleep 1s
|
|
||||||
/bin/echo -e "\e[0K\rEnabling the EPEL repository in 1 second..."
|
|
||||||
sleep 1s
|
|
||||||
fi
|
|
||||||
if ! $TOOL install $YES_FLAG $QUIET_FLAG epel-release; then
|
|
||||||
error "Could not enable EPEL. Aborting bootstrap!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BootstrapRpmCommonBase() {
|
BootstrapRpmCommonBase() {
|
||||||
@@ -488,13 +478,91 @@ BootstrapRpmCommon() {
|
|||||||
BootstrapRpmCommonBase "$python_pkgs"
|
BootstrapRpmCommonBase "$python_pkgs"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If new packages are installed by BootstrapRpmPython3 below, this version
|
||||||
|
# number must be increased.
|
||||||
|
BOOTSTRAP_RPM_PYTHON3_LEGACY_VERSION=1
|
||||||
|
|
||||||
|
# Checks if rh-python36 can be installed.
|
||||||
|
Python36SclIsAvailable() {
|
||||||
|
InitializeRPMCommonBase >/dev/null 2>&1;
|
||||||
|
|
||||||
|
if "${TOOL}" list rh-python36 >/dev/null 2>&1; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if "${TOOL}" list centos-release-scl >/dev/null 2>&1; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Try to enable rh-python36 from SCL if it is necessary and possible.
|
||||||
|
EnablePython36SCL() {
|
||||||
|
if "$EXISTS" python3.6 > /dev/null 2> /dev/null; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [ ! -f /opt/rh/rh-python36/enable ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
set +e
|
||||||
|
if ! . /opt/rh/rh-python36/enable; then
|
||||||
|
error 'Unable to enable rh-python36!'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
}
|
||||||
|
|
||||||
|
# This bootstrap concerns old RedHat-based distributions that do not ship by default
|
||||||
|
# with Python 2.7, but only Python 2.6. We bootstrap them by enabling SCL and installing
|
||||||
|
# Python 3.6. Some of these distributions are: CentOS/RHEL/OL/SL 6.
|
||||||
|
BootstrapRpmPython3Legacy() {
|
||||||
|
# Tested with:
|
||||||
|
# - CentOS 6
|
||||||
|
|
||||||
|
InitializeRPMCommonBase
|
||||||
|
|
||||||
|
if ! "${TOOL}" list rh-python36 >/dev/null 2>&1; then
|
||||||
|
echo "To use Certbot on this operating system, packages from the SCL repository need to be installed."
|
||||||
|
if ! "${TOOL}" list centos-release-scl >/dev/null 2>&1; then
|
||||||
|
error "Enable the SCL repository and try running Certbot again."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ "${ASSUME_YES}" = 1 ]; then
|
||||||
|
/bin/echo -n "Enabling the SCL repository in 3 seconds... (Press Ctrl-C to cancel)"
|
||||||
|
sleep 1s
|
||||||
|
/bin/echo -ne "\e[0K\rEnabling the SCL repository in 2 seconds... (Press Ctrl-C to cancel)"
|
||||||
|
sleep 1s
|
||||||
|
/bin/echo -e "\e[0K\rEnabling the SCL repository in 1 second... (Press Ctrl-C to cancel)"
|
||||||
|
sleep 1s
|
||||||
|
fi
|
||||||
|
if ! "${TOOL}" install "${YES_FLAG}" "${QUIET_FLAG}" centos-release-scl; then
|
||||||
|
error "Could not enable SCL. Aborting bootstrap!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# CentOS 6 must use rh-python36 from SCL
|
||||||
|
if "${TOOL}" list rh-python36 >/dev/null 2>&1; then
|
||||||
|
python_pkgs="rh-python36-python
|
||||||
|
rh-python36-python-virtualenv
|
||||||
|
rh-python36-python-devel
|
||||||
|
"
|
||||||
|
else
|
||||||
|
error "No supported Python package available to install. Aborting bootstrap!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
BootstrapRpmCommonBase "${python_pkgs}"
|
||||||
|
|
||||||
|
# Enable SCL rh-python36 after bootstrapping.
|
||||||
|
EnablePython36SCL
|
||||||
|
}
|
||||||
|
|
||||||
# If new packages are installed by BootstrapRpmPython3 below, this version
|
# If new packages are installed by BootstrapRpmPython3 below, this version
|
||||||
# number must be increased.
|
# number must be increased.
|
||||||
BOOTSTRAP_RPM_PYTHON3_VERSION=1
|
BOOTSTRAP_RPM_PYTHON3_VERSION=1
|
||||||
|
|
||||||
BootstrapRpmPython3() {
|
BootstrapRpmPython3() {
|
||||||
# Tested with:
|
# Tested with:
|
||||||
# - CentOS 6
|
|
||||||
# - Fedora 29
|
# - Fedora 29
|
||||||
|
|
||||||
InitializeRPMCommonBase
|
InitializeRPMCommonBase
|
||||||
@@ -505,12 +573,6 @@ BootstrapRpmPython3() {
|
|||||||
python3-virtualenv
|
python3-virtualenv
|
||||||
python3-devel
|
python3-devel
|
||||||
"
|
"
|
||||||
# EPEL uses python34
|
|
||||||
elif $TOOL list python34 >/dev/null 2>&1; then
|
|
||||||
python_pkgs="python34
|
|
||||||
python34-devel
|
|
||||||
python34-tools
|
|
||||||
"
|
|
||||||
else
|
else
|
||||||
error "No supported Python package available to install. Aborting bootstrap!"
|
error "No supported Python package available to install. Aborting bootstrap!"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -758,6 +820,11 @@ elif [ -f /etc/redhat-release ]; then
|
|||||||
|
|
||||||
RPM_DIST_NAME=`(. /etc/os-release 2> /dev/null && echo $ID) || echo "unknown"`
|
RPM_DIST_NAME=`(. /etc/os-release 2> /dev/null && echo $ID) || echo "unknown"`
|
||||||
|
|
||||||
|
if [ "$PYVER" -eq 26 -a $(uname -m) != 'x86_64' ]; then
|
||||||
|
# 32 bits CentOS 6 and affiliates are not supported anymore by certbot-auto.
|
||||||
|
DEPRECATED_OS=1
|
||||||
|
fi
|
||||||
|
|
||||||
# Set RPM_DIST_VERSION to VERSION_ID from /etc/os-release after splitting on
|
# Set RPM_DIST_VERSION to VERSION_ID from /etc/os-release after splitting on
|
||||||
# '.' characters (e.g. "8.0" becomes "8"). If the command exits with an
|
# '.' characters (e.g. "8.0" becomes "8"). If the command exits with an
|
||||||
# error, RPM_DIST_VERSION is set to "unknown".
|
# error, RPM_DIST_VERSION is set to "unknown".
|
||||||
@@ -769,31 +836,50 @@ elif [ -f /etc/redhat-release ]; then
|
|||||||
RPM_DIST_VERSION=0
|
RPM_DIST_VERSION=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Starting to Fedora 29, python2 is on a deprecation path. Let's move to python3 then.
|
# Handle legacy RPM distributions
|
||||||
# RHEL 8 also uses python3 by default.
|
if [ "$PYVER" -eq 26 ]; then
|
||||||
if [ "$RPM_DIST_NAME" = "fedora" -a "$RPM_DIST_VERSION" -ge 29 -o "$PYVER" -eq 26 ]; then
|
# Check if an automated bootstrap can be achieved on this system.
|
||||||
RPM_USE_PYTHON_3=1
|
if ! Python36SclIsAvailable; then
|
||||||
elif [ "$RPM_DIST_NAME" = "rhel" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
INTERACTIVE_BOOTSTRAP=1
|
||||||
RPM_USE_PYTHON_3=1
|
fi
|
||||||
elif [ "$RPM_DIST_NAME" = "centos" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
|
||||||
RPM_USE_PYTHON_3=1
|
|
||||||
else
|
|
||||||
RPM_USE_PYTHON_3=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$RPM_USE_PYTHON_3" = 1 ]; then
|
|
||||||
Bootstrap() {
|
Bootstrap() {
|
||||||
BootstrapMessage "RedHat-based OSes that will use Python3"
|
BootstrapMessage "Legacy RedHat-based OSes that will use Python3"
|
||||||
BootstrapRpmPython3
|
BootstrapRpmPython3Legacy
|
||||||
}
|
}
|
||||||
USE_PYTHON_3=1
|
USE_PYTHON_3=1
|
||||||
BOOTSTRAP_VERSION="BootstrapRpmPython3 $BOOTSTRAP_RPM_PYTHON3_VERSION"
|
BOOTSTRAP_VERSION="BootstrapRpmPython3Legacy $BOOTSTRAP_RPM_PYTHON3_LEGACY_VERSION"
|
||||||
|
|
||||||
|
# Try now to enable SCL rh-python36 for systems already bootstrapped
|
||||||
|
# NB: EnablePython36SCL has been defined along with BootstrapRpmPython3Legacy in certbot-auto
|
||||||
|
EnablePython36SCL
|
||||||
else
|
else
|
||||||
Bootstrap() {
|
# Starting to Fedora 29, python2 is on a deprecation path. Let's move to python3 then.
|
||||||
BootstrapMessage "RedHat-based OSes"
|
# RHEL 8 also uses python3 by default.
|
||||||
BootstrapRpmCommon
|
if [ "$RPM_DIST_NAME" = "fedora" -a "$RPM_DIST_VERSION" -ge 29 ]; then
|
||||||
}
|
RPM_USE_PYTHON_3=1
|
||||||
BOOTSTRAP_VERSION="BootstrapRpmCommon $BOOTSTRAP_RPM_COMMON_VERSION"
|
elif [ "$RPM_DIST_NAME" = "rhel" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
||||||
|
RPM_USE_PYTHON_3=1
|
||||||
|
elif [ "$RPM_DIST_NAME" = "centos" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
||||||
|
RPM_USE_PYTHON_3=1
|
||||||
|
else
|
||||||
|
RPM_USE_PYTHON_3=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$RPM_USE_PYTHON_3" = 1 ]; then
|
||||||
|
Bootstrap() {
|
||||||
|
BootstrapMessage "RedHat-based OSes that will use Python3"
|
||||||
|
BootstrapRpmPython3
|
||||||
|
}
|
||||||
|
USE_PYTHON_3=1
|
||||||
|
BOOTSTRAP_VERSION="BootstrapRpmPython3 $BOOTSTRAP_RPM_PYTHON3_VERSION"
|
||||||
|
else
|
||||||
|
Bootstrap() {
|
||||||
|
BootstrapMessage "RedHat-based OSes"
|
||||||
|
BootstrapRpmCommon
|
||||||
|
}
|
||||||
|
BOOTSTRAP_VERSION="BootstrapRpmCommon $BOOTSTRAP_RPM_COMMON_VERSION"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LE_PYTHON="$prev_le_python"
|
LE_PYTHON="$prev_le_python"
|
||||||
@@ -870,6 +956,13 @@ if [ "$NO_BOOTSTRAP" = 1 ]; then
|
|||||||
unset BOOTSTRAP_VERSION
|
unset BOOTSTRAP_VERSION
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$DEPRECATED_OS" = 1 ]; then
|
||||||
|
Bootstrap() {
|
||||||
|
error "Skipping bootstrap because certbot-auto is deprecated on this system."
|
||||||
|
}
|
||||||
|
unset BOOTSTRAP_VERSION
|
||||||
|
fi
|
||||||
|
|
||||||
# Sets PREV_BOOTSTRAP_VERSION to the identifier for the bootstrap script used
|
# Sets PREV_BOOTSTRAP_VERSION to the identifier for the bootstrap script used
|
||||||
# to install OS dependencies on this system. PREV_BOOTSTRAP_VERSION isn't set
|
# to install OS dependencies on this system. PREV_BOOTSTRAP_VERSION isn't set
|
||||||
# if it is unknown how OS dependencies were installed on this system.
|
# if it is unknown how OS dependencies were installed on this system.
|
||||||
@@ -1067,6 +1160,28 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
# Phase 2: Create venv, install LE, and run.
|
# Phase 2: Create venv, install LE, and run.
|
||||||
|
|
||||||
shift 1 # the --le-auto-phase2 arg
|
shift 1 # the --le-auto-phase2 arg
|
||||||
|
|
||||||
|
if [ "$DEPRECATED_OS" = 1 ]; then
|
||||||
|
# Phase 2 damage control mode for deprecated OSes.
|
||||||
|
# In this situation, we bypass any bootstrap or certbot venv setup.
|
||||||
|
error "Your system is not supported by certbot-auto anymore."
|
||||||
|
|
||||||
|
if [ ! -d "$VENV_PATH" ] && OldVenvExists; then
|
||||||
|
VENV_BIN="$OLD_VENV_PATH/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$VENV_BIN/letsencrypt" -a "$INSTALL_ONLY" != 1 ]; then
|
||||||
|
error "Certbot will no longer receive updates."
|
||||||
|
error "Please visit https://certbot.eff.org/ to check for other alternatives."
|
||||||
|
"$VENV_BIN/letsencrypt" "$@"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
error "Certbot cannot be installed."
|
||||||
|
error "Please visit https://certbot.eff.org/ to check for other alternatives."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
SetPrevBootstrapVersion
|
SetPrevBootstrapVersion
|
||||||
|
|
||||||
if [ -z "$PHASE_1_VERSION" -a "$USE_PYTHON_3" = 1 ]; then
|
if [ -z "$PHASE_1_VERSION" -a "$USE_PYTHON_3" = 1 ]; then
|
||||||
@@ -1078,8 +1193,15 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
# If the selected Bootstrap function isn't a noop and it differs from the
|
# If the selected Bootstrap function isn't a noop and it differs from the
|
||||||
# previously used version
|
# previously used version
|
||||||
if [ -n "$BOOTSTRAP_VERSION" -a "$BOOTSTRAP_VERSION" != "$PREV_BOOTSTRAP_VERSION" ]; then
|
if [ -n "$BOOTSTRAP_VERSION" -a "$BOOTSTRAP_VERSION" != "$PREV_BOOTSTRAP_VERSION" ]; then
|
||||||
# if non-interactive mode or stdin and stdout are connected to a terminal
|
# Check if we can rebootstrap without manual user intervention: this requires that
|
||||||
if [ \( "$NONINTERACTIVE" = 1 \) -o \( \( -t 0 \) -a \( -t 1 \) \) ]; then
|
# certbot-auto is in non-interactive mode AND selected bootstrap does not claim to
|
||||||
|
# require a manual user intervention.
|
||||||
|
if [ "$NONINTERACTIVE" = 1 -a "$INTERACTIVE_BOOTSTRAP" != 1 ]; then
|
||||||
|
CAN_REBOOTSTRAP=1
|
||||||
|
fi
|
||||||
|
# Check if rebootstrap can be done non-interactively and current shell is non-interactive
|
||||||
|
# (true if stdin and stdout are not attached to a terminal).
|
||||||
|
if [ \( "$CAN_REBOOTSTRAP" = 1 \) -o \( \( -t 0 \) -a \( -t 1 \) \) ]; then
|
||||||
if [ -d "$VENV_PATH" ]; then
|
if [ -d "$VENV_PATH" ]; then
|
||||||
rm -rf "$VENV_PATH"
|
rm -rf "$VENV_PATH"
|
||||||
fi
|
fi
|
||||||
@@ -1090,12 +1212,21 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
ln -s "$VENV_PATH" "$OLD_VENV_PATH"
|
ln -s "$VENV_PATH" "$OLD_VENV_PATH"
|
||||||
fi
|
fi
|
||||||
RerunWithArgs "$@"
|
RerunWithArgs "$@"
|
||||||
|
# Otherwise bootstrap needs to be done manually by the user.
|
||||||
else
|
else
|
||||||
error "Skipping upgrade because new OS dependencies may need to be installed."
|
# If it is because bootstrapping is interactive, --non-interactive will be of no use.
|
||||||
error
|
if [ "$INTERACTIVE_BOOTSTRAP" = 1 ]; then
|
||||||
error "To upgrade to a newer version, please run this script again manually so you can"
|
error "Skipping upgrade because new OS dependencies may need to be installed."
|
||||||
error "approve changes or with --non-interactive on the command line to automatically"
|
error "This requires manual user intervention: please run this script again manually."
|
||||||
error "install any required packages."
|
# If this is because of the environment (eg. non interactive shell without
|
||||||
|
# --non-interactive flag set), help the user in that direction.
|
||||||
|
else
|
||||||
|
error "Skipping upgrade because new OS dependencies may need to be installed."
|
||||||
|
error
|
||||||
|
error "To upgrade to a newer version, please run this script again manually so you can"
|
||||||
|
error "approve changes or with --non-interactive on the command line to automatically"
|
||||||
|
error "install any required packages."
|
||||||
|
fi
|
||||||
# Set INSTALLED_VERSION to be the same so we don't update the venv
|
# Set INSTALLED_VERSION to be the same so we don't update the venv
|
||||||
INSTALLED_VERSION="$LE_AUTO_VERSION"
|
INSTALLED_VERSION="$LE_AUTO_VERSION"
|
||||||
# Continue to use OLD_VENV_PATH if the new venv doesn't exist
|
# Continue to use OLD_VENV_PATH if the new venv doesn't exist
|
||||||
@@ -1372,18 +1503,18 @@ letsencrypt==0.7.0 \
|
|||||||
--hash=sha256:105a5fb107e45bcd0722eb89696986dcf5f08a86a321d6aef25a0c7c63375ade \
|
--hash=sha256:105a5fb107e45bcd0722eb89696986dcf5f08a86a321d6aef25a0c7c63375ade \
|
||||||
--hash=sha256:c36e532c486a7e92155ee09da54b436a3c420813ec1c590b98f635d924720de9
|
--hash=sha256:c36e532c486a7e92155ee09da54b436a3c420813ec1c590b98f635d924720de9
|
||||||
|
|
||||||
certbot==1.0.0 \
|
certbot==1.1.0 \
|
||||||
--hash=sha256:8d074cff89dee002dec1c47cb0da04ea8e0ede8d68838b6d54aa41580d9262df \
|
--hash=sha256:66a5cab9267349941604c2c98082bfef85877653c023fc324b1c3869fb16add6 \
|
||||||
--hash=sha256:86b82d31db19fffffb0d6b218951e2121ef514e3ff659aa042deaf92a33e302a
|
--hash=sha256:46e93661a0db53f416c0f5476d8d2e62bc7259b7660dd983453b85df9ef6e8b8
|
||||||
acme==1.0.0 \
|
acme==1.1.0 \
|
||||||
--hash=sha256:f6972e436e76f7f1e395e81e149f8713ca8462d465b14993bddc53fb18a40644 \
|
--hash=sha256:11b9beba706fb8f652c8910d46dd1939d670cac8169f3c66c18c080ed3353e71 \
|
||||||
--hash=sha256:6a08f12f848ce563b50bca421ba9db653df9f82cfefeaf8aba517f046d1386c2
|
--hash=sha256:c305a20eeb9cb02240347703d497891c13d43a47c794fa100d4dbb479a5370d9
|
||||||
certbot-apache==1.0.0 \
|
certbot-apache==1.1.0 \
|
||||||
--hash=sha256:e591d0cf773ad33ee978f7adb1b69288eac2c8847c643b06e70260e707626f8e \
|
--hash=sha256:9c847ff223c2e465e241c78d22f97cee77d5e551df608bed06c55f8627f4cbd2 \
|
||||||
--hash=sha256:7335ab5687a0a47d9041d9e13f3a2d67d0e8372da97ab639edb31c14b787cd68
|
--hash=sha256:05e84dfe96b72582cde97c490977d8e2d33d440c927a320debb4cf287f6fadcc
|
||||||
certbot-nginx==1.0.0 \
|
certbot-nginx==1.1.0 \
|
||||||
--hash=sha256:ce8a2e51165da7c15bfdc059cd6572d0f368c078f1e1a77633a2773310b2f231 \
|
--hash=sha256:bf06fa2f5059f0fdb7d352c8739e1ed0830db4f0d89e812dab4f081bda6ec7d6 \
|
||||||
--hash=sha256:63b4ae09d4f1c9ef0a1a2a49c3f651d8a7cb30303ec6f954239e987c5da45dc4
|
--hash=sha256:0a80ecbd2a30f3757c7652cabfff854ca07873b1cf02ebbe1892786c3b3a5874
|
||||||
|
|
||||||
UNLIKELY_EOF
|
UNLIKELY_EOF
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
@@ -1617,6 +1748,9 @@ UNLIKELY_EOF
|
|||||||
say "Installation succeeded."
|
say "Installation succeeded."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If you're modifying any of the code after this point in this current `if` block, you
|
||||||
|
# may need to update the "$DEPRECATED_OS" = 1 case at the beginning of phase 2 as well.
|
||||||
|
|
||||||
if [ "$INSTALL_ONLY" = 1 ]; then
|
if [ "$INSTALL_ONLY" = 1 ]; then
|
||||||
say "Certbot is installed."
|
say "Certbot is installed."
|
||||||
exit 0
|
exit 0
|
||||||
@@ -1828,30 +1962,35 @@ UNLIKELY_EOF
|
|||||||
error "WARNING: unable to check for updates."
|
error "WARNING: unable to check for updates."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LE_VERSION_STATE=`CompareVersions "$LE_PYTHON" "$LE_AUTO_VERSION" "$REMOTE_VERSION"`
|
# If for any reason REMOTE_VERSION is not set, let's assume certbot-auto is up-to-date,
|
||||||
if [ "$LE_VERSION_STATE" = "UNOFFICIAL" ]; then
|
# and do not go into the self-upgrading process.
|
||||||
say "Unofficial certbot-auto version detected, self-upgrade is disabled: $LE_AUTO_VERSION"
|
if [ -n "$REMOTE_VERSION" ]; then
|
||||||
elif [ "$LE_VERSION_STATE" = "OUTDATED" ]; then
|
LE_VERSION_STATE=`CompareVersions "$LE_PYTHON" "$LE_AUTO_VERSION" "$REMOTE_VERSION"`
|
||||||
say "Upgrading certbot-auto $LE_AUTO_VERSION to $REMOTE_VERSION..."
|
|
||||||
|
|
||||||
# Now we drop into Python so we don't have to install even more
|
if [ "$LE_VERSION_STATE" = "UNOFFICIAL" ]; then
|
||||||
# dependencies (curl, etc.), for better flow control, and for the option of
|
say "Unofficial certbot-auto version detected, self-upgrade is disabled: $LE_AUTO_VERSION"
|
||||||
# future Windows compatibility.
|
elif [ "$LE_VERSION_STATE" = "OUTDATED" ]; then
|
||||||
"$LE_PYTHON" "$TEMP_DIR/fetch.py" --le-auto-script "v$REMOTE_VERSION"
|
say "Upgrading certbot-auto $LE_AUTO_VERSION to $REMOTE_VERSION..."
|
||||||
|
|
||||||
# Install new copy of certbot-auto.
|
# Now we drop into Python so we don't have to install even more
|
||||||
# TODO: Deal with quotes in pathnames.
|
# dependencies (curl, etc.), for better flow control, and for the option of
|
||||||
say "Replacing certbot-auto..."
|
# future Windows compatibility.
|
||||||
# Clone permissions with cp. chmod and chown don't have a --reference
|
"$LE_PYTHON" "$TEMP_DIR/fetch.py" --le-auto-script "v$REMOTE_VERSION"
|
||||||
# option on macOS or BSD, and stat -c on Linux is stat -f on macOS and BSD:
|
|
||||||
cp -p "$0" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
# Install new copy of certbot-auto.
|
||||||
cp "$TEMP_DIR/letsencrypt-auto" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
# TODO: Deal with quotes in pathnames.
|
||||||
# Using mv rather than cp leaves the old file descriptor pointing to the
|
say "Replacing certbot-auto..."
|
||||||
# original copy so the shell can continue to read it unmolested. mv across
|
# Clone permissions with cp. chmod and chown don't have a --reference
|
||||||
# filesystems is non-atomic, doing `rm dest, cp src dest, rm src`, but the
|
# option on macOS or BSD, and stat -c on Linux is stat -f on macOS and BSD:
|
||||||
# cp is unlikely to fail if the rm doesn't.
|
cp -p "$0" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
||||||
mv -f "$TEMP_DIR/letsencrypt-auto.permission-clone" "$0"
|
cp "$TEMP_DIR/letsencrypt-auto" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
||||||
fi # A newer version is available.
|
# Using mv rather than cp leaves the old file descriptor pointing to the
|
||||||
|
# original copy so the shell can continue to read it unmolested. mv across
|
||||||
|
# filesystems is non-atomic, doing `rm dest, cp src dest, rm src`, but the
|
||||||
|
# cp is unlikely to fail if the rm doesn't.
|
||||||
|
mv -f "$TEMP_DIR/letsencrypt-auto.permission-clone" "$0"
|
||||||
|
fi # A newer version is available.
|
||||||
|
fi
|
||||||
fi # Self-upgrading is allowed.
|
fi # Self-upgrading is allowed.
|
||||||
|
|
||||||
RerunWithArgs --le-auto-phase2 "$@"
|
RerunWithArgs --le-auto-phase2 "$@"
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
# For running tests, build a docker image with a passwordless sudo and a trust
|
|
||||||
# store we can manipulate.
|
|
||||||
|
|
||||||
FROM centos:6
|
|
||||||
|
|
||||||
RUN yum install -y epel-release
|
|
||||||
|
|
||||||
# Install pip and sudo:
|
|
||||||
RUN yum install -y python-pip sudo
|
|
||||||
# Update to a stable and tested version of pip.
|
|
||||||
# We do not use pipstrap here because it no longer supports Python 2.6.
|
|
||||||
RUN pip install pip==9.0.1 setuptools==29.0.1 wheel==0.29.0
|
|
||||||
# Pin pytest version for increased stability
|
|
||||||
RUN pip install pytest==3.2.5 six==1.10.0
|
|
||||||
|
|
||||||
# Add an unprivileged user:
|
|
||||||
RUN useradd --create-home --home-dir /home/lea --shell /bin/bash --groups wheel --uid 1000 lea
|
|
||||||
|
|
||||||
# Let that user sudo:
|
|
||||||
RUN sed -i.bkp -e \
|
|
||||||
's/# %wheel\(NOPASSWD: ALL\)\?/%wheel/g' \
|
|
||||||
/etc/sudoers
|
|
||||||
|
|
||||||
RUN mkdir -p /home/lea/certbot
|
|
||||||
|
|
||||||
# Install fake testing CA:
|
|
||||||
COPY ./tests/certs/ca/my-root-ca.crt.pem /usr/local/share/ca-certificates/
|
|
||||||
RUN update-ca-trust
|
|
||||||
|
|
||||||
# Copy code:
|
|
||||||
COPY . /home/lea/certbot/letsencrypt-auto-source
|
|
||||||
|
|
||||||
USER lea
|
|
||||||
WORKDIR /home/lea
|
|
||||||
|
|
||||||
RUN sudo chmod +x certbot/letsencrypt-auto-source/tests/centos6_tests.sh
|
|
||||||
CMD sudo certbot/letsencrypt-auto-source/tests/centos6_tests.sh
|
|
||||||
54
letsencrypt-auto-source/Dockerfile.redhat6
Normal file
54
letsencrypt-auto-source/Dockerfile.redhat6
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# For running tests, build a docker image with a passwordless sudo and a trust
|
||||||
|
# store we can manipulate.
|
||||||
|
|
||||||
|
ARG REDHAT_DIST_FLAVOR
|
||||||
|
FROM ${REDHAT_DIST_FLAVOR}:6
|
||||||
|
|
||||||
|
ARG REDHAT_DIST_FLAVOR
|
||||||
|
|
||||||
|
RUN curl -O https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \
|
||||||
|
&& rpm -ivh epel-release-latest-6.noarch.rpm
|
||||||
|
|
||||||
|
# Install pip and sudo:
|
||||||
|
RUN yum install -y python-pip sudo
|
||||||
|
# Update to a stable and tested version of pip.
|
||||||
|
# We do not use pipstrap here because it no longer supports Python 2.6.
|
||||||
|
RUN pip install pip==9.0.1 setuptools==29.0.1 wheel==0.29.0
|
||||||
|
# Pin pytest version for increased stability
|
||||||
|
RUN pip install pytest==3.2.5 six==1.10.0
|
||||||
|
|
||||||
|
# Add an unprivileged user:
|
||||||
|
RUN useradd --create-home --home-dir /home/lea --shell /bin/bash --groups wheel --uid 1000 lea
|
||||||
|
|
||||||
|
# Let that user sudo:
|
||||||
|
RUN sed -i.bkp -e \
|
||||||
|
's/# %wheel\(NOPASSWD: ALL\)\?/%wheel/g' \
|
||||||
|
/etc/sudoers
|
||||||
|
|
||||||
|
RUN mkdir -p /home/lea/certbot
|
||||||
|
|
||||||
|
# Install fake testing CA:
|
||||||
|
COPY ./tests/certs/ca/my-root-ca.crt.pem /usr/local/share/ca-certificates/
|
||||||
|
RUN update-ca-trust
|
||||||
|
|
||||||
|
# Copy current letsencrypt-auto:
|
||||||
|
COPY . /home/lea/certbot/letsencrypt-auto-source
|
||||||
|
|
||||||
|
# Tweak uname binary for tests on fake 32bits
|
||||||
|
COPY tests/uname_wrapper.sh /bin
|
||||||
|
RUN mv /bin/uname /bin/uname_orig \
|
||||||
|
&& mv /bin/uname_wrapper.sh /bin/uname \
|
||||||
|
&& chmod +x /bin/uname
|
||||||
|
|
||||||
|
# Fetch previous letsencrypt-auto that was installing python 3.4
|
||||||
|
RUN curl https://raw.githubusercontent.com/certbot/certbot/v0.38.0/letsencrypt-auto-source/letsencrypt-auto \
|
||||||
|
-o /home/lea/certbot/letsencrypt-auto-source/letsencrypt-auto_py_34 \
|
||||||
|
&& chmod +x /home/lea/certbot/letsencrypt-auto-source/letsencrypt-auto_py_34
|
||||||
|
|
||||||
|
RUN cp /home/lea/certbot/letsencrypt-auto-source/tests/${REDHAT_DIST_FLAVOR}6_tests.sh /home/lea/certbot/letsencrypt-auto-source/tests/redhat6_tests.sh \
|
||||||
|
&& chmod +x /home/lea/certbot/letsencrypt-auto-source/tests/redhat6_tests.sh
|
||||||
|
|
||||||
|
USER lea
|
||||||
|
WORKDIR /home/lea
|
||||||
|
|
||||||
|
CMD ["sudo", "certbot/letsencrypt-auto-source/tests/redhat6_tests.sh"]
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
iQEzBAABCAAdFiEEos+1H6J1pyhiNOeyTRfJlc2XdfIFAl3mmvMACgkQTRfJlc2X
|
iQEzBAABCAAdFiEEos+1H6J1pyhiNOeyTRfJlc2XdfIFAl4eDcYACgkQTRfJlc2X
|
||||||
dfKUbQf/aW8ZWRH36WhTHmZjJmBumSUYclFdDAR4c6Ym+MBTeYT0iQq/dqfqTklB
|
dfIAiQgAufTpgNvnHKoLQLwWf3GbjLQYWc3w1zRbGUMjghS/rS1yuf7RE/IPItET
|
||||||
7jPHTcxWbyMJCjOqtMEDRt+aVF0A91OA1bSRt1MJCm7o8Oa1h4XVVPL2UZYCPNlu
|
ocIuIE36ogjvgnRuI0OOu3yJ+jxe41u3ToPb0ehNhINd+3rXsDhzwJDPjFdOiq98
|
||||||
46UEBGDOkd6DlrRvD0X2BrQ4EsktLe1d+EoDbDPebwfip9OYnEYMD7EQB9O3N8eo
|
NoW9wQE9AHSfKEEVprckuZe2XmNLsYbBfa9THFULYIlnqAewtercXXx0eKaMG9+d
|
||||||
aYRkaSJMc2HalI5u0oLEhnZGucNw6K7uvuW0LkwmRWpN8Lc8e9ELZ3FOCE6qD9yh
|
aRaD+LZXANx7IV6XnI9jfdKRuldHDvYp1TdvrRWBAVHid8j44c3P0pSvzf0YKGbx
|
||||||
giAkvZNklwhAxkk9spFkEilvEOPVtKgiSS6jZIL5G1NlAhp8n6+vhatY5Aotw8nO
|
xIty/w0zQFIWCfqPdK7/R2EHbEyR0SdI00a1Va1x7P8JGf7kDyLXl+Y9Yth7/uHA
|
||||||
QrqmPvzBd+2Gy2nrrGuSMC146m0x/g==
|
osivJCpSrtAEbvMXojnL7u7kq3b37Q==
|
||||||
=3A0n
|
=Une9
|
||||||
-----END PGP SIGNATURE-----
|
-----END PGP SIGNATURE-----
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ if [ -z "$VENV_PATH" ]; then
|
|||||||
fi
|
fi
|
||||||
VENV_BIN="$VENV_PATH/bin"
|
VENV_BIN="$VENV_PATH/bin"
|
||||||
BOOTSTRAP_VERSION_PATH="$VENV_PATH/certbot-auto-bootstrap-version.txt"
|
BOOTSTRAP_VERSION_PATH="$VENV_PATH/certbot-auto-bootstrap-version.txt"
|
||||||
LE_AUTO_VERSION="1.1.0.dev0"
|
LE_AUTO_VERSION="1.2.0.dev0"
|
||||||
BASENAME=$(basename $0)
|
BASENAME=$(basename $0)
|
||||||
USAGE="Usage: $BASENAME [OPTIONS]
|
USAGE="Usage: $BASENAME [OPTIONS]
|
||||||
A self-updating wrapper script for the Certbot ACME client. When run, updates
|
A self-updating wrapper script for the Certbot ACME client. When run, updates
|
||||||
@@ -256,20 +256,28 @@ DeprecationBootstrap() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
MIN_PYTHON_VERSION="2.7"
|
MIN_PYTHON_2_VERSION="2.7"
|
||||||
MIN_PYVER=$(echo "$MIN_PYTHON_VERSION" | sed 's/\.//')
|
MIN_PYVER2=$(echo "$MIN_PYTHON_2_VERSION" | sed 's/\.//')
|
||||||
|
MIN_PYTHON_3_VERSION="3.5"
|
||||||
|
MIN_PYVER3=$(echo "$MIN_PYTHON_3_VERSION" | sed 's/\.//')
|
||||||
# Sets LE_PYTHON to Python version string and PYVER to the first two
|
# Sets LE_PYTHON to Python version string and PYVER to the first two
|
||||||
# digits of the python version
|
# digits of the python version.
|
||||||
|
# MIN_PYVER and MIN_PYTHON_VERSION are also set by this function, and their
|
||||||
|
# values depend on if we try to use Python 3 or Python 2.
|
||||||
DeterminePythonVersion() {
|
DeterminePythonVersion() {
|
||||||
# Arguments: "NOCRASH" if we shouldn't crash if we don't find a good python
|
# Arguments: "NOCRASH" if we shouldn't crash if we don't find a good python
|
||||||
#
|
#
|
||||||
# If no Python is found, PYVER is set to 0.
|
# If no Python is found, PYVER is set to 0.
|
||||||
if [ "$USE_PYTHON_3" = 1 ]; then
|
if [ "$USE_PYTHON_3" = 1 ]; then
|
||||||
|
MIN_PYVER=$MIN_PYVER3
|
||||||
|
MIN_PYTHON_VERSION=$MIN_PYTHON_3_VERSION
|
||||||
for LE_PYTHON in "$LE_PYTHON" python3; do
|
for LE_PYTHON in "$LE_PYTHON" python3; do
|
||||||
# Break (while keeping the LE_PYTHON value) if found.
|
# Break (while keeping the LE_PYTHON value) if found.
|
||||||
$EXISTS "$LE_PYTHON" > /dev/null && break
|
$EXISTS "$LE_PYTHON" > /dev/null && break
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
MIN_PYVER=$MIN_PYVER2
|
||||||
|
MIN_PYTHON_VERSION=$MIN_PYTHON_2_VERSION
|
||||||
for LE_PYTHON in "$LE_PYTHON" python2.7 python27 python2 python; do
|
for LE_PYTHON in "$LE_PYTHON" python2.7 python27 python2 python; do
|
||||||
# Break (while keeping the LE_PYTHON value) if found.
|
# Break (while keeping the LE_PYTHON value) if found.
|
||||||
$EXISTS "$LE_PYTHON" > /dev/null && break
|
$EXISTS "$LE_PYTHON" > /dev/null && break
|
||||||
@@ -285,7 +293,7 @@ DeterminePythonVersion() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PYVER=`"$LE_PYTHON" -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//'`
|
PYVER=$("$LE_PYTHON" -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//')
|
||||||
if [ "$PYVER" -lt "$MIN_PYVER" ]; then
|
if [ "$PYVER" -lt "$MIN_PYVER" ]; then
|
||||||
if [ "$1" != "NOCRASH" ]; then
|
if [ "$1" != "NOCRASH" ]; then
|
||||||
error "You have an ancient version of Python entombed in your operating system..."
|
error "You have an ancient version of Python entombed in your operating system..."
|
||||||
@@ -368,7 +376,9 @@ BootstrapDebCommon() {
|
|||||||
|
|
||||||
# Sets TOOL to the name of the package manager
|
# Sets TOOL to the name of the package manager
|
||||||
# Sets appropriate values for YES_FLAG and QUIET_FLAG based on $ASSUME_YES and $QUIET_FLAG.
|
# Sets appropriate values for YES_FLAG and QUIET_FLAG based on $ASSUME_YES and $QUIET_FLAG.
|
||||||
# Enables EPEL if applicable and possible.
|
# Note: this function is called both while selecting the bootstrap scripts and
|
||||||
|
# during the actual bootstrap. Some things like prompting to user can be done in the latter
|
||||||
|
# case, but not in the former one.
|
||||||
InitializeRPMCommonBase() {
|
InitializeRPMCommonBase() {
|
||||||
if type dnf 2>/dev/null
|
if type dnf 2>/dev/null
|
||||||
then
|
then
|
||||||
@@ -388,26 +398,6 @@ InitializeRPMCommonBase() {
|
|||||||
if [ "$QUIET" = 1 ]; then
|
if [ "$QUIET" = 1 ]; then
|
||||||
QUIET_FLAG='--quiet'
|
QUIET_FLAG='--quiet'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! $TOOL list *virtualenv >/dev/null 2>&1; then
|
|
||||||
echo "To use Certbot, packages from the EPEL repository need to be installed."
|
|
||||||
if ! $TOOL list epel-release >/dev/null 2>&1; then
|
|
||||||
error "Enable the EPEL repository and try running Certbot again."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [ "$ASSUME_YES" = 1 ]; then
|
|
||||||
/bin/echo -n "Enabling the EPEL repository in 3 seconds..."
|
|
||||||
sleep 1s
|
|
||||||
/bin/echo -ne "\e[0K\rEnabling the EPEL repository in 2 seconds..."
|
|
||||||
sleep 1s
|
|
||||||
/bin/echo -e "\e[0K\rEnabling the EPEL repository in 1 second..."
|
|
||||||
sleep 1s
|
|
||||||
fi
|
|
||||||
if ! $TOOL install $YES_FLAG $QUIET_FLAG epel-release; then
|
|
||||||
error "Could not enable EPEL. Aborting bootstrap!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BootstrapRpmCommonBase() {
|
BootstrapRpmCommonBase() {
|
||||||
@@ -488,13 +478,91 @@ BootstrapRpmCommon() {
|
|||||||
BootstrapRpmCommonBase "$python_pkgs"
|
BootstrapRpmCommonBase "$python_pkgs"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If new packages are installed by BootstrapRpmPython3 below, this version
|
||||||
|
# number must be increased.
|
||||||
|
BOOTSTRAP_RPM_PYTHON3_LEGACY_VERSION=1
|
||||||
|
|
||||||
|
# Checks if rh-python36 can be installed.
|
||||||
|
Python36SclIsAvailable() {
|
||||||
|
InitializeRPMCommonBase >/dev/null 2>&1;
|
||||||
|
|
||||||
|
if "${TOOL}" list rh-python36 >/dev/null 2>&1; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if "${TOOL}" list centos-release-scl >/dev/null 2>&1; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Try to enable rh-python36 from SCL if it is necessary and possible.
|
||||||
|
EnablePython36SCL() {
|
||||||
|
if "$EXISTS" python3.6 > /dev/null 2> /dev/null; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [ ! -f /opt/rh/rh-python36/enable ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
set +e
|
||||||
|
if ! . /opt/rh/rh-python36/enable; then
|
||||||
|
error 'Unable to enable rh-python36!'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
}
|
||||||
|
|
||||||
|
# This bootstrap concerns old RedHat-based distributions that do not ship by default
|
||||||
|
# with Python 2.7, but only Python 2.6. We bootstrap them by enabling SCL and installing
|
||||||
|
# Python 3.6. Some of these distributions are: CentOS/RHEL/OL/SL 6.
|
||||||
|
BootstrapRpmPython3Legacy() {
|
||||||
|
# Tested with:
|
||||||
|
# - CentOS 6
|
||||||
|
|
||||||
|
InitializeRPMCommonBase
|
||||||
|
|
||||||
|
if ! "${TOOL}" list rh-python36 >/dev/null 2>&1; then
|
||||||
|
echo "To use Certbot on this operating system, packages from the SCL repository need to be installed."
|
||||||
|
if ! "${TOOL}" list centos-release-scl >/dev/null 2>&1; then
|
||||||
|
error "Enable the SCL repository and try running Certbot again."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ "${ASSUME_YES}" = 1 ]; then
|
||||||
|
/bin/echo -n "Enabling the SCL repository in 3 seconds... (Press Ctrl-C to cancel)"
|
||||||
|
sleep 1s
|
||||||
|
/bin/echo -ne "\e[0K\rEnabling the SCL repository in 2 seconds... (Press Ctrl-C to cancel)"
|
||||||
|
sleep 1s
|
||||||
|
/bin/echo -e "\e[0K\rEnabling the SCL repository in 1 second... (Press Ctrl-C to cancel)"
|
||||||
|
sleep 1s
|
||||||
|
fi
|
||||||
|
if ! "${TOOL}" install "${YES_FLAG}" "${QUIET_FLAG}" centos-release-scl; then
|
||||||
|
error "Could not enable SCL. Aborting bootstrap!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# CentOS 6 must use rh-python36 from SCL
|
||||||
|
if "${TOOL}" list rh-python36 >/dev/null 2>&1; then
|
||||||
|
python_pkgs="rh-python36-python
|
||||||
|
rh-python36-python-virtualenv
|
||||||
|
rh-python36-python-devel
|
||||||
|
"
|
||||||
|
else
|
||||||
|
error "No supported Python package available to install. Aborting bootstrap!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
BootstrapRpmCommonBase "${python_pkgs}"
|
||||||
|
|
||||||
|
# Enable SCL rh-python36 after bootstrapping.
|
||||||
|
EnablePython36SCL
|
||||||
|
}
|
||||||
|
|
||||||
# If new packages are installed by BootstrapRpmPython3 below, this version
|
# If new packages are installed by BootstrapRpmPython3 below, this version
|
||||||
# number must be increased.
|
# number must be increased.
|
||||||
BOOTSTRAP_RPM_PYTHON3_VERSION=1
|
BOOTSTRAP_RPM_PYTHON3_VERSION=1
|
||||||
|
|
||||||
BootstrapRpmPython3() {
|
BootstrapRpmPython3() {
|
||||||
# Tested with:
|
# Tested with:
|
||||||
# - CentOS 6
|
|
||||||
# - Fedora 29
|
# - Fedora 29
|
||||||
|
|
||||||
InitializeRPMCommonBase
|
InitializeRPMCommonBase
|
||||||
@@ -505,12 +573,6 @@ BootstrapRpmPython3() {
|
|||||||
python3-virtualenv
|
python3-virtualenv
|
||||||
python3-devel
|
python3-devel
|
||||||
"
|
"
|
||||||
# EPEL uses python34
|
|
||||||
elif $TOOL list python34 >/dev/null 2>&1; then
|
|
||||||
python_pkgs="python34
|
|
||||||
python34-devel
|
|
||||||
python34-tools
|
|
||||||
"
|
|
||||||
else
|
else
|
||||||
error "No supported Python package available to install. Aborting bootstrap!"
|
error "No supported Python package available to install. Aborting bootstrap!"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -758,6 +820,11 @@ elif [ -f /etc/redhat-release ]; then
|
|||||||
|
|
||||||
RPM_DIST_NAME=`(. /etc/os-release 2> /dev/null && echo $ID) || echo "unknown"`
|
RPM_DIST_NAME=`(. /etc/os-release 2> /dev/null && echo $ID) || echo "unknown"`
|
||||||
|
|
||||||
|
if [ "$PYVER" -eq 26 -a $(uname -m) != 'x86_64' ]; then
|
||||||
|
# 32 bits CentOS 6 and affiliates are not supported anymore by certbot-auto.
|
||||||
|
DEPRECATED_OS=1
|
||||||
|
fi
|
||||||
|
|
||||||
# Set RPM_DIST_VERSION to VERSION_ID from /etc/os-release after splitting on
|
# Set RPM_DIST_VERSION to VERSION_ID from /etc/os-release after splitting on
|
||||||
# '.' characters (e.g. "8.0" becomes "8"). If the command exits with an
|
# '.' characters (e.g. "8.0" becomes "8"). If the command exits with an
|
||||||
# error, RPM_DIST_VERSION is set to "unknown".
|
# error, RPM_DIST_VERSION is set to "unknown".
|
||||||
@@ -769,31 +836,50 @@ elif [ -f /etc/redhat-release ]; then
|
|||||||
RPM_DIST_VERSION=0
|
RPM_DIST_VERSION=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Starting to Fedora 29, python2 is on a deprecation path. Let's move to python3 then.
|
# Handle legacy RPM distributions
|
||||||
# RHEL 8 also uses python3 by default.
|
if [ "$PYVER" -eq 26 ]; then
|
||||||
if [ "$RPM_DIST_NAME" = "fedora" -a "$RPM_DIST_VERSION" -ge 29 -o "$PYVER" -eq 26 ]; then
|
# Check if an automated bootstrap can be achieved on this system.
|
||||||
RPM_USE_PYTHON_3=1
|
if ! Python36SclIsAvailable; then
|
||||||
elif [ "$RPM_DIST_NAME" = "rhel" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
INTERACTIVE_BOOTSTRAP=1
|
||||||
RPM_USE_PYTHON_3=1
|
fi
|
||||||
elif [ "$RPM_DIST_NAME" = "centos" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
|
||||||
RPM_USE_PYTHON_3=1
|
|
||||||
else
|
|
||||||
RPM_USE_PYTHON_3=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$RPM_USE_PYTHON_3" = 1 ]; then
|
|
||||||
Bootstrap() {
|
Bootstrap() {
|
||||||
BootstrapMessage "RedHat-based OSes that will use Python3"
|
BootstrapMessage "Legacy RedHat-based OSes that will use Python3"
|
||||||
BootstrapRpmPython3
|
BootstrapRpmPython3Legacy
|
||||||
}
|
}
|
||||||
USE_PYTHON_3=1
|
USE_PYTHON_3=1
|
||||||
BOOTSTRAP_VERSION="BootstrapRpmPython3 $BOOTSTRAP_RPM_PYTHON3_VERSION"
|
BOOTSTRAP_VERSION="BootstrapRpmPython3Legacy $BOOTSTRAP_RPM_PYTHON3_LEGACY_VERSION"
|
||||||
|
|
||||||
|
# Try now to enable SCL rh-python36 for systems already bootstrapped
|
||||||
|
# NB: EnablePython36SCL has been defined along with BootstrapRpmPython3Legacy in certbot-auto
|
||||||
|
EnablePython36SCL
|
||||||
else
|
else
|
||||||
Bootstrap() {
|
# Starting to Fedora 29, python2 is on a deprecation path. Let's move to python3 then.
|
||||||
BootstrapMessage "RedHat-based OSes"
|
# RHEL 8 also uses python3 by default.
|
||||||
BootstrapRpmCommon
|
if [ "$RPM_DIST_NAME" = "fedora" -a "$RPM_DIST_VERSION" -ge 29 ]; then
|
||||||
}
|
RPM_USE_PYTHON_3=1
|
||||||
BOOTSTRAP_VERSION="BootstrapRpmCommon $BOOTSTRAP_RPM_COMMON_VERSION"
|
elif [ "$RPM_DIST_NAME" = "rhel" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
||||||
|
RPM_USE_PYTHON_3=1
|
||||||
|
elif [ "$RPM_DIST_NAME" = "centos" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
||||||
|
RPM_USE_PYTHON_3=1
|
||||||
|
else
|
||||||
|
RPM_USE_PYTHON_3=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$RPM_USE_PYTHON_3" = 1 ]; then
|
||||||
|
Bootstrap() {
|
||||||
|
BootstrapMessage "RedHat-based OSes that will use Python3"
|
||||||
|
BootstrapRpmPython3
|
||||||
|
}
|
||||||
|
USE_PYTHON_3=1
|
||||||
|
BOOTSTRAP_VERSION="BootstrapRpmPython3 $BOOTSTRAP_RPM_PYTHON3_VERSION"
|
||||||
|
else
|
||||||
|
Bootstrap() {
|
||||||
|
BootstrapMessage "RedHat-based OSes"
|
||||||
|
BootstrapRpmCommon
|
||||||
|
}
|
||||||
|
BOOTSTRAP_VERSION="BootstrapRpmCommon $BOOTSTRAP_RPM_COMMON_VERSION"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LE_PYTHON="$prev_le_python"
|
LE_PYTHON="$prev_le_python"
|
||||||
@@ -870,6 +956,13 @@ if [ "$NO_BOOTSTRAP" = 1 ]; then
|
|||||||
unset BOOTSTRAP_VERSION
|
unset BOOTSTRAP_VERSION
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$DEPRECATED_OS" = 1 ]; then
|
||||||
|
Bootstrap() {
|
||||||
|
error "Skipping bootstrap because certbot-auto is deprecated on this system."
|
||||||
|
}
|
||||||
|
unset BOOTSTRAP_VERSION
|
||||||
|
fi
|
||||||
|
|
||||||
# Sets PREV_BOOTSTRAP_VERSION to the identifier for the bootstrap script used
|
# Sets PREV_BOOTSTRAP_VERSION to the identifier for the bootstrap script used
|
||||||
# to install OS dependencies on this system. PREV_BOOTSTRAP_VERSION isn't set
|
# to install OS dependencies on this system. PREV_BOOTSTRAP_VERSION isn't set
|
||||||
# if it is unknown how OS dependencies were installed on this system.
|
# if it is unknown how OS dependencies were installed on this system.
|
||||||
@@ -1067,6 +1160,28 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
# Phase 2: Create venv, install LE, and run.
|
# Phase 2: Create venv, install LE, and run.
|
||||||
|
|
||||||
shift 1 # the --le-auto-phase2 arg
|
shift 1 # the --le-auto-phase2 arg
|
||||||
|
|
||||||
|
if [ "$DEPRECATED_OS" = 1 ]; then
|
||||||
|
# Phase 2 damage control mode for deprecated OSes.
|
||||||
|
# In this situation, we bypass any bootstrap or certbot venv setup.
|
||||||
|
error "Your system is not supported by certbot-auto anymore."
|
||||||
|
|
||||||
|
if [ ! -d "$VENV_PATH" ] && OldVenvExists; then
|
||||||
|
VENV_BIN="$OLD_VENV_PATH/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$VENV_BIN/letsencrypt" -a "$INSTALL_ONLY" != 1 ]; then
|
||||||
|
error "Certbot will no longer receive updates."
|
||||||
|
error "Please visit https://certbot.eff.org/ to check for other alternatives."
|
||||||
|
"$VENV_BIN/letsencrypt" "$@"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
error "Certbot cannot be installed."
|
||||||
|
error "Please visit https://certbot.eff.org/ to check for other alternatives."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
SetPrevBootstrapVersion
|
SetPrevBootstrapVersion
|
||||||
|
|
||||||
if [ -z "$PHASE_1_VERSION" -a "$USE_PYTHON_3" = 1 ]; then
|
if [ -z "$PHASE_1_VERSION" -a "$USE_PYTHON_3" = 1 ]; then
|
||||||
@@ -1078,8 +1193,15 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
# If the selected Bootstrap function isn't a noop and it differs from the
|
# If the selected Bootstrap function isn't a noop and it differs from the
|
||||||
# previously used version
|
# previously used version
|
||||||
if [ -n "$BOOTSTRAP_VERSION" -a "$BOOTSTRAP_VERSION" != "$PREV_BOOTSTRAP_VERSION" ]; then
|
if [ -n "$BOOTSTRAP_VERSION" -a "$BOOTSTRAP_VERSION" != "$PREV_BOOTSTRAP_VERSION" ]; then
|
||||||
# if non-interactive mode or stdin and stdout are connected to a terminal
|
# Check if we can rebootstrap without manual user intervention: this requires that
|
||||||
if [ \( "$NONINTERACTIVE" = 1 \) -o \( \( -t 0 \) -a \( -t 1 \) \) ]; then
|
# certbot-auto is in non-interactive mode AND selected bootstrap does not claim to
|
||||||
|
# require a manual user intervention.
|
||||||
|
if [ "$NONINTERACTIVE" = 1 -a "$INTERACTIVE_BOOTSTRAP" != 1 ]; then
|
||||||
|
CAN_REBOOTSTRAP=1
|
||||||
|
fi
|
||||||
|
# Check if rebootstrap can be done non-interactively and current shell is non-interactive
|
||||||
|
# (true if stdin and stdout are not attached to a terminal).
|
||||||
|
if [ \( "$CAN_REBOOTSTRAP" = 1 \) -o \( \( -t 0 \) -a \( -t 1 \) \) ]; then
|
||||||
if [ -d "$VENV_PATH" ]; then
|
if [ -d "$VENV_PATH" ]; then
|
||||||
rm -rf "$VENV_PATH"
|
rm -rf "$VENV_PATH"
|
||||||
fi
|
fi
|
||||||
@@ -1090,12 +1212,21 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
ln -s "$VENV_PATH" "$OLD_VENV_PATH"
|
ln -s "$VENV_PATH" "$OLD_VENV_PATH"
|
||||||
fi
|
fi
|
||||||
RerunWithArgs "$@"
|
RerunWithArgs "$@"
|
||||||
|
# Otherwise bootstrap needs to be done manually by the user.
|
||||||
else
|
else
|
||||||
error "Skipping upgrade because new OS dependencies may need to be installed."
|
# If it is because bootstrapping is interactive, --non-interactive will be of no use.
|
||||||
error
|
if [ "$INTERACTIVE_BOOTSTRAP" = 1 ]; then
|
||||||
error "To upgrade to a newer version, please run this script again manually so you can"
|
error "Skipping upgrade because new OS dependencies may need to be installed."
|
||||||
error "approve changes or with --non-interactive on the command line to automatically"
|
error "This requires manual user intervention: please run this script again manually."
|
||||||
error "install any required packages."
|
# If this is because of the environment (eg. non interactive shell without
|
||||||
|
# --non-interactive flag set), help the user in that direction.
|
||||||
|
else
|
||||||
|
error "Skipping upgrade because new OS dependencies may need to be installed."
|
||||||
|
error
|
||||||
|
error "To upgrade to a newer version, please run this script again manually so you can"
|
||||||
|
error "approve changes or with --non-interactive on the command line to automatically"
|
||||||
|
error "install any required packages."
|
||||||
|
fi
|
||||||
# Set INSTALLED_VERSION to be the same so we don't update the venv
|
# Set INSTALLED_VERSION to be the same so we don't update the venv
|
||||||
INSTALLED_VERSION="$LE_AUTO_VERSION"
|
INSTALLED_VERSION="$LE_AUTO_VERSION"
|
||||||
# Continue to use OLD_VENV_PATH if the new venv doesn't exist
|
# Continue to use OLD_VENV_PATH if the new venv doesn't exist
|
||||||
@@ -1372,18 +1503,18 @@ letsencrypt==0.7.0 \
|
|||||||
--hash=sha256:105a5fb107e45bcd0722eb89696986dcf5f08a86a321d6aef25a0c7c63375ade \
|
--hash=sha256:105a5fb107e45bcd0722eb89696986dcf5f08a86a321d6aef25a0c7c63375ade \
|
||||||
--hash=sha256:c36e532c486a7e92155ee09da54b436a3c420813ec1c590b98f635d924720de9
|
--hash=sha256:c36e532c486a7e92155ee09da54b436a3c420813ec1c590b98f635d924720de9
|
||||||
|
|
||||||
certbot==1.0.0 \
|
certbot==1.1.0 \
|
||||||
--hash=sha256:8d074cff89dee002dec1c47cb0da04ea8e0ede8d68838b6d54aa41580d9262df \
|
--hash=sha256:66a5cab9267349941604c2c98082bfef85877653c023fc324b1c3869fb16add6 \
|
||||||
--hash=sha256:86b82d31db19fffffb0d6b218951e2121ef514e3ff659aa042deaf92a33e302a
|
--hash=sha256:46e93661a0db53f416c0f5476d8d2e62bc7259b7660dd983453b85df9ef6e8b8
|
||||||
acme==1.0.0 \
|
acme==1.1.0 \
|
||||||
--hash=sha256:f6972e436e76f7f1e395e81e149f8713ca8462d465b14993bddc53fb18a40644 \
|
--hash=sha256:11b9beba706fb8f652c8910d46dd1939d670cac8169f3c66c18c080ed3353e71 \
|
||||||
--hash=sha256:6a08f12f848ce563b50bca421ba9db653df9f82cfefeaf8aba517f046d1386c2
|
--hash=sha256:c305a20eeb9cb02240347703d497891c13d43a47c794fa100d4dbb479a5370d9
|
||||||
certbot-apache==1.0.0 \
|
certbot-apache==1.1.0 \
|
||||||
--hash=sha256:e591d0cf773ad33ee978f7adb1b69288eac2c8847c643b06e70260e707626f8e \
|
--hash=sha256:9c847ff223c2e465e241c78d22f97cee77d5e551df608bed06c55f8627f4cbd2 \
|
||||||
--hash=sha256:7335ab5687a0a47d9041d9e13f3a2d67d0e8372da97ab639edb31c14b787cd68
|
--hash=sha256:05e84dfe96b72582cde97c490977d8e2d33d440c927a320debb4cf287f6fadcc
|
||||||
certbot-nginx==1.0.0 \
|
certbot-nginx==1.1.0 \
|
||||||
--hash=sha256:ce8a2e51165da7c15bfdc059cd6572d0f368c078f1e1a77633a2773310b2f231 \
|
--hash=sha256:bf06fa2f5059f0fdb7d352c8739e1ed0830db4f0d89e812dab4f081bda6ec7d6 \
|
||||||
--hash=sha256:63b4ae09d4f1c9ef0a1a2a49c3f651d8a7cb30303ec6f954239e987c5da45dc4
|
--hash=sha256:0a80ecbd2a30f3757c7652cabfff854ca07873b1cf02ebbe1892786c3b3a5874
|
||||||
|
|
||||||
UNLIKELY_EOF
|
UNLIKELY_EOF
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
@@ -1617,6 +1748,9 @@ UNLIKELY_EOF
|
|||||||
say "Installation succeeded."
|
say "Installation succeeded."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If you're modifying any of the code after this point in this current `if` block, you
|
||||||
|
# may need to update the "$DEPRECATED_OS" = 1 case at the beginning of phase 2 as well.
|
||||||
|
|
||||||
if [ "$INSTALL_ONLY" = 1 ]; then
|
if [ "$INSTALL_ONLY" = 1 ]; then
|
||||||
say "Certbot is installed."
|
say "Certbot is installed."
|
||||||
exit 0
|
exit 0
|
||||||
@@ -1828,30 +1962,35 @@ UNLIKELY_EOF
|
|||||||
error "WARNING: unable to check for updates."
|
error "WARNING: unable to check for updates."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LE_VERSION_STATE=`CompareVersions "$LE_PYTHON" "$LE_AUTO_VERSION" "$REMOTE_VERSION"`
|
# If for any reason REMOTE_VERSION is not set, let's assume certbot-auto is up-to-date,
|
||||||
if [ "$LE_VERSION_STATE" = "UNOFFICIAL" ]; then
|
# and do not go into the self-upgrading process.
|
||||||
say "Unofficial certbot-auto version detected, self-upgrade is disabled: $LE_AUTO_VERSION"
|
if [ -n "$REMOTE_VERSION" ]; then
|
||||||
elif [ "$LE_VERSION_STATE" = "OUTDATED" ]; then
|
LE_VERSION_STATE=`CompareVersions "$LE_PYTHON" "$LE_AUTO_VERSION" "$REMOTE_VERSION"`
|
||||||
say "Upgrading certbot-auto $LE_AUTO_VERSION to $REMOTE_VERSION..."
|
|
||||||
|
|
||||||
# Now we drop into Python so we don't have to install even more
|
if [ "$LE_VERSION_STATE" = "UNOFFICIAL" ]; then
|
||||||
# dependencies (curl, etc.), for better flow control, and for the option of
|
say "Unofficial certbot-auto version detected, self-upgrade is disabled: $LE_AUTO_VERSION"
|
||||||
# future Windows compatibility.
|
elif [ "$LE_VERSION_STATE" = "OUTDATED" ]; then
|
||||||
"$LE_PYTHON" "$TEMP_DIR/fetch.py" --le-auto-script "v$REMOTE_VERSION"
|
say "Upgrading certbot-auto $LE_AUTO_VERSION to $REMOTE_VERSION..."
|
||||||
|
|
||||||
# Install new copy of certbot-auto.
|
# Now we drop into Python so we don't have to install even more
|
||||||
# TODO: Deal with quotes in pathnames.
|
# dependencies (curl, etc.), for better flow control, and for the option of
|
||||||
say "Replacing certbot-auto..."
|
# future Windows compatibility.
|
||||||
# Clone permissions with cp. chmod and chown don't have a --reference
|
"$LE_PYTHON" "$TEMP_DIR/fetch.py" --le-auto-script "v$REMOTE_VERSION"
|
||||||
# option on macOS or BSD, and stat -c on Linux is stat -f on macOS and BSD:
|
|
||||||
cp -p "$0" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
# Install new copy of certbot-auto.
|
||||||
cp "$TEMP_DIR/letsencrypt-auto" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
# TODO: Deal with quotes in pathnames.
|
||||||
# Using mv rather than cp leaves the old file descriptor pointing to the
|
say "Replacing certbot-auto..."
|
||||||
# original copy so the shell can continue to read it unmolested. mv across
|
# Clone permissions with cp. chmod and chown don't have a --reference
|
||||||
# filesystems is non-atomic, doing `rm dest, cp src dest, rm src`, but the
|
# option on macOS or BSD, and stat -c on Linux is stat -f on macOS and BSD:
|
||||||
# cp is unlikely to fail if the rm doesn't.
|
cp -p "$0" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
||||||
mv -f "$TEMP_DIR/letsencrypt-auto.permission-clone" "$0"
|
cp "$TEMP_DIR/letsencrypt-auto" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
||||||
fi # A newer version is available.
|
# Using mv rather than cp leaves the old file descriptor pointing to the
|
||||||
|
# original copy so the shell can continue to read it unmolested. mv across
|
||||||
|
# filesystems is non-atomic, doing `rm dest, cp src dest, rm src`, but the
|
||||||
|
# cp is unlikely to fail if the rm doesn't.
|
||||||
|
mv -f "$TEMP_DIR/letsencrypt-auto.permission-clone" "$0"
|
||||||
|
fi # A newer version is available.
|
||||||
|
fi
|
||||||
fi # Self-upgrading is allowed.
|
fi # Self-upgrading is allowed.
|
||||||
|
|
||||||
RerunWithArgs --le-auto-phase2 "$@"
|
RerunWithArgs --le-auto-phase2 "$@"
|
||||||
|
|||||||
Binary file not shown.
@@ -256,20 +256,28 @@ DeprecationBootstrap() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
MIN_PYTHON_VERSION="2.7"
|
MIN_PYTHON_2_VERSION="2.7"
|
||||||
MIN_PYVER=$(echo "$MIN_PYTHON_VERSION" | sed 's/\.//')
|
MIN_PYVER2=$(echo "$MIN_PYTHON_2_VERSION" | sed 's/\.//')
|
||||||
|
MIN_PYTHON_3_VERSION="3.5"
|
||||||
|
MIN_PYVER3=$(echo "$MIN_PYTHON_3_VERSION" | sed 's/\.//')
|
||||||
# Sets LE_PYTHON to Python version string and PYVER to the first two
|
# Sets LE_PYTHON to Python version string and PYVER to the first two
|
||||||
# digits of the python version
|
# digits of the python version.
|
||||||
|
# MIN_PYVER and MIN_PYTHON_VERSION are also set by this function, and their
|
||||||
|
# values depend on if we try to use Python 3 or Python 2.
|
||||||
DeterminePythonVersion() {
|
DeterminePythonVersion() {
|
||||||
# Arguments: "NOCRASH" if we shouldn't crash if we don't find a good python
|
# Arguments: "NOCRASH" if we shouldn't crash if we don't find a good python
|
||||||
#
|
#
|
||||||
# If no Python is found, PYVER is set to 0.
|
# If no Python is found, PYVER is set to 0.
|
||||||
if [ "$USE_PYTHON_3" = 1 ]; then
|
if [ "$USE_PYTHON_3" = 1 ]; then
|
||||||
|
MIN_PYVER=$MIN_PYVER3
|
||||||
|
MIN_PYTHON_VERSION=$MIN_PYTHON_3_VERSION
|
||||||
for LE_PYTHON in "$LE_PYTHON" python3; do
|
for LE_PYTHON in "$LE_PYTHON" python3; do
|
||||||
# Break (while keeping the LE_PYTHON value) if found.
|
# Break (while keeping the LE_PYTHON value) if found.
|
||||||
$EXISTS "$LE_PYTHON" > /dev/null && break
|
$EXISTS "$LE_PYTHON" > /dev/null && break
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
MIN_PYVER=$MIN_PYVER2
|
||||||
|
MIN_PYTHON_VERSION=$MIN_PYTHON_2_VERSION
|
||||||
for LE_PYTHON in "$LE_PYTHON" python2.7 python27 python2 python; do
|
for LE_PYTHON in "$LE_PYTHON" python2.7 python27 python2 python; do
|
||||||
# Break (while keeping the LE_PYTHON value) if found.
|
# Break (while keeping the LE_PYTHON value) if found.
|
||||||
$EXISTS "$LE_PYTHON" > /dev/null && break
|
$EXISTS "$LE_PYTHON" > /dev/null && break
|
||||||
@@ -285,7 +293,7 @@ DeterminePythonVersion() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PYVER=`"$LE_PYTHON" -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//'`
|
PYVER=$("$LE_PYTHON" -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//')
|
||||||
if [ "$PYVER" -lt "$MIN_PYVER" ]; then
|
if [ "$PYVER" -lt "$MIN_PYVER" ]; then
|
||||||
if [ "$1" != "NOCRASH" ]; then
|
if [ "$1" != "NOCRASH" ]; then
|
||||||
error "You have an ancient version of Python entombed in your operating system..."
|
error "You have an ancient version of Python entombed in your operating system..."
|
||||||
@@ -298,6 +306,7 @@ DeterminePythonVersion() {
|
|||||||
{{ bootstrappers/deb_common.sh }}
|
{{ bootstrappers/deb_common.sh }}
|
||||||
{{ bootstrappers/rpm_common_base.sh }}
|
{{ bootstrappers/rpm_common_base.sh }}
|
||||||
{{ bootstrappers/rpm_common.sh }}
|
{{ bootstrappers/rpm_common.sh }}
|
||||||
|
{{ bootstrappers/rpm_python3_legacy.sh }}
|
||||||
{{ bootstrappers/rpm_python3.sh }}
|
{{ bootstrappers/rpm_python3.sh }}
|
||||||
{{ bootstrappers/suse_common.sh }}
|
{{ bootstrappers/suse_common.sh }}
|
||||||
{{ bootstrappers/arch_common.sh }}
|
{{ bootstrappers/arch_common.sh }}
|
||||||
@@ -333,6 +342,11 @@ elif [ -f /etc/redhat-release ]; then
|
|||||||
|
|
||||||
RPM_DIST_NAME=`(. /etc/os-release 2> /dev/null && echo $ID) || echo "unknown"`
|
RPM_DIST_NAME=`(. /etc/os-release 2> /dev/null && echo $ID) || echo "unknown"`
|
||||||
|
|
||||||
|
if [ "$PYVER" -eq 26 -a $(uname -m) != 'x86_64' ]; then
|
||||||
|
# 32 bits CentOS 6 and affiliates are not supported anymore by certbot-auto.
|
||||||
|
DEPRECATED_OS=1
|
||||||
|
fi
|
||||||
|
|
||||||
# Set RPM_DIST_VERSION to VERSION_ID from /etc/os-release after splitting on
|
# Set RPM_DIST_VERSION to VERSION_ID from /etc/os-release after splitting on
|
||||||
# '.' characters (e.g. "8.0" becomes "8"). If the command exits with an
|
# '.' characters (e.g. "8.0" becomes "8"). If the command exits with an
|
||||||
# error, RPM_DIST_VERSION is set to "unknown".
|
# error, RPM_DIST_VERSION is set to "unknown".
|
||||||
@@ -344,31 +358,50 @@ elif [ -f /etc/redhat-release ]; then
|
|||||||
RPM_DIST_VERSION=0
|
RPM_DIST_VERSION=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Starting to Fedora 29, python2 is on a deprecation path. Let's move to python3 then.
|
# Handle legacy RPM distributions
|
||||||
# RHEL 8 also uses python3 by default.
|
if [ "$PYVER" -eq 26 ]; then
|
||||||
if [ "$RPM_DIST_NAME" = "fedora" -a "$RPM_DIST_VERSION" -ge 29 -o "$PYVER" -eq 26 ]; then
|
# Check if an automated bootstrap can be achieved on this system.
|
||||||
RPM_USE_PYTHON_3=1
|
if ! Python36SclIsAvailable; then
|
||||||
elif [ "$RPM_DIST_NAME" = "rhel" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
INTERACTIVE_BOOTSTRAP=1
|
||||||
RPM_USE_PYTHON_3=1
|
fi
|
||||||
elif [ "$RPM_DIST_NAME" = "centos" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
|
||||||
RPM_USE_PYTHON_3=1
|
|
||||||
else
|
|
||||||
RPM_USE_PYTHON_3=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$RPM_USE_PYTHON_3" = 1 ]; then
|
|
||||||
Bootstrap() {
|
Bootstrap() {
|
||||||
BootstrapMessage "RedHat-based OSes that will use Python3"
|
BootstrapMessage "Legacy RedHat-based OSes that will use Python3"
|
||||||
BootstrapRpmPython3
|
BootstrapRpmPython3Legacy
|
||||||
}
|
}
|
||||||
USE_PYTHON_3=1
|
USE_PYTHON_3=1
|
||||||
BOOTSTRAP_VERSION="BootstrapRpmPython3 $BOOTSTRAP_RPM_PYTHON3_VERSION"
|
BOOTSTRAP_VERSION="BootstrapRpmPython3Legacy $BOOTSTRAP_RPM_PYTHON3_LEGACY_VERSION"
|
||||||
|
|
||||||
|
# Try now to enable SCL rh-python36 for systems already bootstrapped
|
||||||
|
# NB: EnablePython36SCL has been defined along with BootstrapRpmPython3Legacy in certbot-auto
|
||||||
|
EnablePython36SCL
|
||||||
else
|
else
|
||||||
Bootstrap() {
|
# Starting to Fedora 29, python2 is on a deprecation path. Let's move to python3 then.
|
||||||
BootstrapMessage "RedHat-based OSes"
|
# RHEL 8 also uses python3 by default.
|
||||||
BootstrapRpmCommon
|
if [ "$RPM_DIST_NAME" = "fedora" -a "$RPM_DIST_VERSION" -ge 29 ]; then
|
||||||
}
|
RPM_USE_PYTHON_3=1
|
||||||
BOOTSTRAP_VERSION="BootstrapRpmCommon $BOOTSTRAP_RPM_COMMON_VERSION"
|
elif [ "$RPM_DIST_NAME" = "rhel" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
||||||
|
RPM_USE_PYTHON_3=1
|
||||||
|
elif [ "$RPM_DIST_NAME" = "centos" -a "$RPM_DIST_VERSION" -ge 8 ]; then
|
||||||
|
RPM_USE_PYTHON_3=1
|
||||||
|
else
|
||||||
|
RPM_USE_PYTHON_3=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$RPM_USE_PYTHON_3" = 1 ]; then
|
||||||
|
Bootstrap() {
|
||||||
|
BootstrapMessage "RedHat-based OSes that will use Python3"
|
||||||
|
BootstrapRpmPython3
|
||||||
|
}
|
||||||
|
USE_PYTHON_3=1
|
||||||
|
BOOTSTRAP_VERSION="BootstrapRpmPython3 $BOOTSTRAP_RPM_PYTHON3_VERSION"
|
||||||
|
else
|
||||||
|
Bootstrap() {
|
||||||
|
BootstrapMessage "RedHat-based OSes"
|
||||||
|
BootstrapRpmCommon
|
||||||
|
}
|
||||||
|
BOOTSTRAP_VERSION="BootstrapRpmCommon $BOOTSTRAP_RPM_COMMON_VERSION"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LE_PYTHON="$prev_le_python"
|
LE_PYTHON="$prev_le_python"
|
||||||
@@ -445,6 +478,13 @@ if [ "$NO_BOOTSTRAP" = 1 ]; then
|
|||||||
unset BOOTSTRAP_VERSION
|
unset BOOTSTRAP_VERSION
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$DEPRECATED_OS" = 1 ]; then
|
||||||
|
Bootstrap() {
|
||||||
|
error "Skipping bootstrap because certbot-auto is deprecated on this system."
|
||||||
|
}
|
||||||
|
unset BOOTSTRAP_VERSION
|
||||||
|
fi
|
||||||
|
|
||||||
# Sets PREV_BOOTSTRAP_VERSION to the identifier for the bootstrap script used
|
# Sets PREV_BOOTSTRAP_VERSION to the identifier for the bootstrap script used
|
||||||
# to install OS dependencies on this system. PREV_BOOTSTRAP_VERSION isn't set
|
# to install OS dependencies on this system. PREV_BOOTSTRAP_VERSION isn't set
|
||||||
# if it is unknown how OS dependencies were installed on this system.
|
# if it is unknown how OS dependencies were installed on this system.
|
||||||
@@ -534,6 +574,28 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
# Phase 2: Create venv, install LE, and run.
|
# Phase 2: Create venv, install LE, and run.
|
||||||
|
|
||||||
shift 1 # the --le-auto-phase2 arg
|
shift 1 # the --le-auto-phase2 arg
|
||||||
|
|
||||||
|
if [ "$DEPRECATED_OS" = 1 ]; then
|
||||||
|
# Phase 2 damage control mode for deprecated OSes.
|
||||||
|
# In this situation, we bypass any bootstrap or certbot venv setup.
|
||||||
|
error "Your system is not supported by certbot-auto anymore."
|
||||||
|
|
||||||
|
if [ ! -d "$VENV_PATH" ] && OldVenvExists; then
|
||||||
|
VENV_BIN="$OLD_VENV_PATH/bin"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$VENV_BIN/letsencrypt" -a "$INSTALL_ONLY" != 1 ]; then
|
||||||
|
error "Certbot will no longer receive updates."
|
||||||
|
error "Please visit https://certbot.eff.org/ to check for other alternatives."
|
||||||
|
"$VENV_BIN/letsencrypt" "$@"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
error "Certbot cannot be installed."
|
||||||
|
error "Please visit https://certbot.eff.org/ to check for other alternatives."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
SetPrevBootstrapVersion
|
SetPrevBootstrapVersion
|
||||||
|
|
||||||
if [ -z "$PHASE_1_VERSION" -a "$USE_PYTHON_3" = 1 ]; then
|
if [ -z "$PHASE_1_VERSION" -a "$USE_PYTHON_3" = 1 ]; then
|
||||||
@@ -545,8 +607,15 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
# If the selected Bootstrap function isn't a noop and it differs from the
|
# If the selected Bootstrap function isn't a noop and it differs from the
|
||||||
# previously used version
|
# previously used version
|
||||||
if [ -n "$BOOTSTRAP_VERSION" -a "$BOOTSTRAP_VERSION" != "$PREV_BOOTSTRAP_VERSION" ]; then
|
if [ -n "$BOOTSTRAP_VERSION" -a "$BOOTSTRAP_VERSION" != "$PREV_BOOTSTRAP_VERSION" ]; then
|
||||||
# if non-interactive mode or stdin and stdout are connected to a terminal
|
# Check if we can rebootstrap without manual user intervention: this requires that
|
||||||
if [ \( "$NONINTERACTIVE" = 1 \) -o \( \( -t 0 \) -a \( -t 1 \) \) ]; then
|
# certbot-auto is in non-interactive mode AND selected bootstrap does not claim to
|
||||||
|
# require a manual user intervention.
|
||||||
|
if [ "$NONINTERACTIVE" = 1 -a "$INTERACTIVE_BOOTSTRAP" != 1 ]; then
|
||||||
|
CAN_REBOOTSTRAP=1
|
||||||
|
fi
|
||||||
|
# Check if rebootstrap can be done non-interactively and current shell is non-interactive
|
||||||
|
# (true if stdin and stdout are not attached to a terminal).
|
||||||
|
if [ \( "$CAN_REBOOTSTRAP" = 1 \) -o \( \( -t 0 \) -a \( -t 1 \) \) ]; then
|
||||||
if [ -d "$VENV_PATH" ]; then
|
if [ -d "$VENV_PATH" ]; then
|
||||||
rm -rf "$VENV_PATH"
|
rm -rf "$VENV_PATH"
|
||||||
fi
|
fi
|
||||||
@@ -557,12 +626,21 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
ln -s "$VENV_PATH" "$OLD_VENV_PATH"
|
ln -s "$VENV_PATH" "$OLD_VENV_PATH"
|
||||||
fi
|
fi
|
||||||
RerunWithArgs "$@"
|
RerunWithArgs "$@"
|
||||||
|
# Otherwise bootstrap needs to be done manually by the user.
|
||||||
else
|
else
|
||||||
error "Skipping upgrade because new OS dependencies may need to be installed."
|
# If it is because bootstrapping is interactive, --non-interactive will be of no use.
|
||||||
error
|
if [ "$INTERACTIVE_BOOTSTRAP" = 1 ]; then
|
||||||
error "To upgrade to a newer version, please run this script again manually so you can"
|
error "Skipping upgrade because new OS dependencies may need to be installed."
|
||||||
error "approve changes or with --non-interactive on the command line to automatically"
|
error "This requires manual user intervention: please run this script again manually."
|
||||||
error "install any required packages."
|
# If this is because of the environment (eg. non interactive shell without
|
||||||
|
# --non-interactive flag set), help the user in that direction.
|
||||||
|
else
|
||||||
|
error "Skipping upgrade because new OS dependencies may need to be installed."
|
||||||
|
error
|
||||||
|
error "To upgrade to a newer version, please run this script again manually so you can"
|
||||||
|
error "approve changes or with --non-interactive on the command line to automatically"
|
||||||
|
error "install any required packages."
|
||||||
|
fi
|
||||||
# Set INSTALLED_VERSION to be the same so we don't update the venv
|
# Set INSTALLED_VERSION to be the same so we don't update the venv
|
||||||
INSTALLED_VERSION="$LE_AUTO_VERSION"
|
INSTALLED_VERSION="$LE_AUTO_VERSION"
|
||||||
# Continue to use OLD_VENV_PATH if the new venv doesn't exist
|
# Continue to use OLD_VENV_PATH if the new venv doesn't exist
|
||||||
@@ -657,6 +735,9 @@ UNLIKELY_EOF
|
|||||||
say "Installation succeeded."
|
say "Installation succeeded."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If you're modifying any of the code after this point in this current `if` block, you
|
||||||
|
# may need to update the "$DEPRECATED_OS" = 1 case at the beginning of phase 2 as well.
|
||||||
|
|
||||||
if [ "$INSTALL_ONLY" = 1 ]; then
|
if [ "$INSTALL_ONLY" = 1 ]; then
|
||||||
say "Certbot is installed."
|
say "Certbot is installed."
|
||||||
exit 0
|
exit 0
|
||||||
@@ -720,30 +801,35 @@ UNLIKELY_EOF
|
|||||||
error "WARNING: unable to check for updates."
|
error "WARNING: unable to check for updates."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LE_VERSION_STATE=`CompareVersions "$LE_PYTHON" "$LE_AUTO_VERSION" "$REMOTE_VERSION"`
|
# If for any reason REMOTE_VERSION is not set, let's assume certbot-auto is up-to-date,
|
||||||
if [ "$LE_VERSION_STATE" = "UNOFFICIAL" ]; then
|
# and do not go into the self-upgrading process.
|
||||||
say "Unofficial certbot-auto version detected, self-upgrade is disabled: $LE_AUTO_VERSION"
|
if [ -n "$REMOTE_VERSION" ]; then
|
||||||
elif [ "$LE_VERSION_STATE" = "OUTDATED" ]; then
|
LE_VERSION_STATE=`CompareVersions "$LE_PYTHON" "$LE_AUTO_VERSION" "$REMOTE_VERSION"`
|
||||||
say "Upgrading certbot-auto $LE_AUTO_VERSION to $REMOTE_VERSION..."
|
|
||||||
|
|
||||||
# Now we drop into Python so we don't have to install even more
|
if [ "$LE_VERSION_STATE" = "UNOFFICIAL" ]; then
|
||||||
# dependencies (curl, etc.), for better flow control, and for the option of
|
say "Unofficial certbot-auto version detected, self-upgrade is disabled: $LE_AUTO_VERSION"
|
||||||
# future Windows compatibility.
|
elif [ "$LE_VERSION_STATE" = "OUTDATED" ]; then
|
||||||
"$LE_PYTHON" "$TEMP_DIR/fetch.py" --le-auto-script "v$REMOTE_VERSION"
|
say "Upgrading certbot-auto $LE_AUTO_VERSION to $REMOTE_VERSION..."
|
||||||
|
|
||||||
# Install new copy of certbot-auto.
|
# Now we drop into Python so we don't have to install even more
|
||||||
# TODO: Deal with quotes in pathnames.
|
# dependencies (curl, etc.), for better flow control, and for the option of
|
||||||
say "Replacing certbot-auto..."
|
# future Windows compatibility.
|
||||||
# Clone permissions with cp. chmod and chown don't have a --reference
|
"$LE_PYTHON" "$TEMP_DIR/fetch.py" --le-auto-script "v$REMOTE_VERSION"
|
||||||
# option on macOS or BSD, and stat -c on Linux is stat -f on macOS and BSD:
|
|
||||||
cp -p "$0" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
# Install new copy of certbot-auto.
|
||||||
cp "$TEMP_DIR/letsencrypt-auto" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
# TODO: Deal with quotes in pathnames.
|
||||||
# Using mv rather than cp leaves the old file descriptor pointing to the
|
say "Replacing certbot-auto..."
|
||||||
# original copy so the shell can continue to read it unmolested. mv across
|
# Clone permissions with cp. chmod and chown don't have a --reference
|
||||||
# filesystems is non-atomic, doing `rm dest, cp src dest, rm src`, but the
|
# option on macOS or BSD, and stat -c on Linux is stat -f on macOS and BSD:
|
||||||
# cp is unlikely to fail if the rm doesn't.
|
cp -p "$0" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
||||||
mv -f "$TEMP_DIR/letsencrypt-auto.permission-clone" "$0"
|
cp "$TEMP_DIR/letsencrypt-auto" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
||||||
fi # A newer version is available.
|
# Using mv rather than cp leaves the old file descriptor pointing to the
|
||||||
|
# original copy so the shell can continue to read it unmolested. mv across
|
||||||
|
# filesystems is non-atomic, doing `rm dest, cp src dest, rm src`, but the
|
||||||
|
# cp is unlikely to fail if the rm doesn't.
|
||||||
|
mv -f "$TEMP_DIR/letsencrypt-auto.permission-clone" "$0"
|
||||||
|
fi # A newer version is available.
|
||||||
|
fi
|
||||||
fi # Self-upgrading is allowed.
|
fi # Self-upgrading is allowed.
|
||||||
|
|
||||||
RerunWithArgs --le-auto-phase2 "$@"
|
RerunWithArgs --le-auto-phase2 "$@"
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
|
|
||||||
# Sets TOOL to the name of the package manager
|
# Sets TOOL to the name of the package manager
|
||||||
# Sets appropriate values for YES_FLAG and QUIET_FLAG based on $ASSUME_YES and $QUIET_FLAG.
|
# Sets appropriate values for YES_FLAG and QUIET_FLAG based on $ASSUME_YES and $QUIET_FLAG.
|
||||||
# Enables EPEL if applicable and possible.
|
# Note: this function is called both while selecting the bootstrap scripts and
|
||||||
|
# during the actual bootstrap. Some things like prompting to user can be done in the latter
|
||||||
|
# case, but not in the former one.
|
||||||
InitializeRPMCommonBase() {
|
InitializeRPMCommonBase() {
|
||||||
if type dnf 2>/dev/null
|
if type dnf 2>/dev/null
|
||||||
then
|
then
|
||||||
@@ -23,26 +25,6 @@ InitializeRPMCommonBase() {
|
|||||||
if [ "$QUIET" = 1 ]; then
|
if [ "$QUIET" = 1 ]; then
|
||||||
QUIET_FLAG='--quiet'
|
QUIET_FLAG='--quiet'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! $TOOL list *virtualenv >/dev/null 2>&1; then
|
|
||||||
echo "To use Certbot, packages from the EPEL repository need to be installed."
|
|
||||||
if ! $TOOL list epel-release >/dev/null 2>&1; then
|
|
||||||
error "Enable the EPEL repository and try running Certbot again."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [ "$ASSUME_YES" = 1 ]; then
|
|
||||||
/bin/echo -n "Enabling the EPEL repository in 3 seconds..."
|
|
||||||
sleep 1s
|
|
||||||
/bin/echo -ne "\e[0K\rEnabling the EPEL repository in 2 seconds..."
|
|
||||||
sleep 1s
|
|
||||||
/bin/echo -e "\e[0K\rEnabling the EPEL repository in 1 second..."
|
|
||||||
sleep 1s
|
|
||||||
fi
|
|
||||||
if ! $TOOL install $YES_FLAG $QUIET_FLAG epel-release; then
|
|
||||||
error "Could not enable EPEL. Aborting bootstrap!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BootstrapRpmCommonBase() {
|
BootstrapRpmCommonBase() {
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ BOOTSTRAP_RPM_PYTHON3_VERSION=1
|
|||||||
|
|
||||||
BootstrapRpmPython3() {
|
BootstrapRpmPython3() {
|
||||||
# Tested with:
|
# Tested with:
|
||||||
# - CentOS 6
|
|
||||||
# - Fedora 29
|
# - Fedora 29
|
||||||
|
|
||||||
InitializeRPMCommonBase
|
InitializeRPMCommonBase
|
||||||
@@ -15,12 +14,6 @@ BootstrapRpmPython3() {
|
|||||||
python3-virtualenv
|
python3-virtualenv
|
||||||
python3-devel
|
python3-devel
|
||||||
"
|
"
|
||||||
# EPEL uses python34
|
|
||||||
elif $TOOL list python34 >/dev/null 2>&1; then
|
|
||||||
python_pkgs="python34
|
|
||||||
python34-devel
|
|
||||||
python34-tools
|
|
||||||
"
|
|
||||||
else
|
else
|
||||||
error "No supported Python package available to install. Aborting bootstrap!"
|
error "No supported Python package available to install. Aborting bootstrap!"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
# If new packages are installed by BootstrapRpmPython3 below, this version
|
||||||
|
# number must be increased.
|
||||||
|
BOOTSTRAP_RPM_PYTHON3_LEGACY_VERSION=1
|
||||||
|
|
||||||
|
# Checks if rh-python36 can be installed.
|
||||||
|
Python36SclIsAvailable() {
|
||||||
|
InitializeRPMCommonBase >/dev/null 2>&1;
|
||||||
|
|
||||||
|
if "${TOOL}" list rh-python36 >/dev/null 2>&1; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if "${TOOL}" list centos-release-scl >/dev/null 2>&1; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Try to enable rh-python36 from SCL if it is necessary and possible.
|
||||||
|
EnablePython36SCL() {
|
||||||
|
if "$EXISTS" python3.6 > /dev/null 2> /dev/null; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [ ! -f /opt/rh/rh-python36/enable ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
set +e
|
||||||
|
if ! . /opt/rh/rh-python36/enable; then
|
||||||
|
error 'Unable to enable rh-python36!'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
}
|
||||||
|
|
||||||
|
# This bootstrap concerns old RedHat-based distributions that do not ship by default
|
||||||
|
# with Python 2.7, but only Python 2.6. We bootstrap them by enabling SCL and installing
|
||||||
|
# Python 3.6. Some of these distributions are: CentOS/RHEL/OL/SL 6.
|
||||||
|
BootstrapRpmPython3Legacy() {
|
||||||
|
# Tested with:
|
||||||
|
# - CentOS 6
|
||||||
|
|
||||||
|
InitializeRPMCommonBase
|
||||||
|
|
||||||
|
if ! "${TOOL}" list rh-python36 >/dev/null 2>&1; then
|
||||||
|
echo "To use Certbot on this operating system, packages from the SCL repository need to be installed."
|
||||||
|
if ! "${TOOL}" list centos-release-scl >/dev/null 2>&1; then
|
||||||
|
error "Enable the SCL repository and try running Certbot again."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ "${ASSUME_YES}" = 1 ]; then
|
||||||
|
/bin/echo -n "Enabling the SCL repository in 3 seconds... (Press Ctrl-C to cancel)"
|
||||||
|
sleep 1s
|
||||||
|
/bin/echo -ne "\e[0K\rEnabling the SCL repository in 2 seconds... (Press Ctrl-C to cancel)"
|
||||||
|
sleep 1s
|
||||||
|
/bin/echo -e "\e[0K\rEnabling the SCL repository in 1 second... (Press Ctrl-C to cancel)"
|
||||||
|
sleep 1s
|
||||||
|
fi
|
||||||
|
if ! "${TOOL}" install "${YES_FLAG}" "${QUIET_FLAG}" centos-release-scl; then
|
||||||
|
error "Could not enable SCL. Aborting bootstrap!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# CentOS 6 must use rh-python36 from SCL
|
||||||
|
if "${TOOL}" list rh-python36 >/dev/null 2>&1; then
|
||||||
|
python_pkgs="rh-python36-python
|
||||||
|
rh-python36-python-virtualenv
|
||||||
|
rh-python36-python-devel
|
||||||
|
"
|
||||||
|
else
|
||||||
|
error "No supported Python package available to install. Aborting bootstrap!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
BootstrapRpmCommonBase "${python_pkgs}"
|
||||||
|
|
||||||
|
# Enable SCL rh-python36 after bootstrapping.
|
||||||
|
EnablePython36SCL
|
||||||
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
certbot==1.0.0 \
|
certbot==1.1.0 \
|
||||||
--hash=sha256:8d074cff89dee002dec1c47cb0da04ea8e0ede8d68838b6d54aa41580d9262df \
|
--hash=sha256:66a5cab9267349941604c2c98082bfef85877653c023fc324b1c3869fb16add6 \
|
||||||
--hash=sha256:86b82d31db19fffffb0d6b218951e2121ef514e3ff659aa042deaf92a33e302a
|
--hash=sha256:46e93661a0db53f416c0f5476d8d2e62bc7259b7660dd983453b85df9ef6e8b8
|
||||||
acme==1.0.0 \
|
acme==1.1.0 \
|
||||||
--hash=sha256:f6972e436e76f7f1e395e81e149f8713ca8462d465b14993bddc53fb18a40644 \
|
--hash=sha256:11b9beba706fb8f652c8910d46dd1939d670cac8169f3c66c18c080ed3353e71 \
|
||||||
--hash=sha256:6a08f12f848ce563b50bca421ba9db653df9f82cfefeaf8aba517f046d1386c2
|
--hash=sha256:c305a20eeb9cb02240347703d497891c13d43a47c794fa100d4dbb479a5370d9
|
||||||
certbot-apache==1.0.0 \
|
certbot-apache==1.1.0 \
|
||||||
--hash=sha256:e591d0cf773ad33ee978f7adb1b69288eac2c8847c643b06e70260e707626f8e \
|
--hash=sha256:9c847ff223c2e465e241c78d22f97cee77d5e551df608bed06c55f8627f4cbd2 \
|
||||||
--hash=sha256:7335ab5687a0a47d9041d9e13f3a2d67d0e8372da97ab639edb31c14b787cd68
|
--hash=sha256:05e84dfe96b72582cde97c490977d8e2d33d440c927a320debb4cf287f6fadcc
|
||||||
certbot-nginx==1.0.0 \
|
certbot-nginx==1.1.0 \
|
||||||
--hash=sha256:ce8a2e51165da7c15bfdc059cd6572d0f368c078f1e1a77633a2773310b2f231 \
|
--hash=sha256:bf06fa2f5059f0fdb7d352c8739e1ed0830db4f0d89e812dab4f081bda6ec7d6 \
|
||||||
--hash=sha256:63b4ae09d4f1c9ef0a1a2a49c3f651d8a7cb30303ec6f954239e987c5da45dc4
|
--hash=sha256:0a80ecbd2a30f3757c7652cabfff854ca07873b1cf02ebbe1892786c3b3a5874
|
||||||
|
|||||||
@@ -1,81 +1,173 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
# Start by making sure your system is up-to-date:
|
# Start by making sure your system is up-to-date:
|
||||||
yum update -y > /dev/null
|
yum update -y >/dev/null
|
||||||
yum install -y centos-release-scl > /dev/null
|
yum install -y centos-release-scl >/dev/null
|
||||||
yum install -y python27 > /dev/null 2> /dev/null
|
yum install -y python27 >/dev/null 2>/dev/null
|
||||||
|
|
||||||
|
LE_AUTO_PY_34="certbot/letsencrypt-auto-source/letsencrypt-auto_py_34"
|
||||||
LE_AUTO="certbot/letsencrypt-auto-source/letsencrypt-auto"
|
LE_AUTO="certbot/letsencrypt-auto-source/letsencrypt-auto"
|
||||||
|
|
||||||
|
# Last version of certbot-auto that was bootstraping Python 3.4 for CentOS 6 users
|
||||||
|
INITIAL_CERTBOT_VERSION_PY34="certbot 0.38.0"
|
||||||
|
|
||||||
# we're going to modify env variables, so do this in a subshell
|
# we're going to modify env variables, so do this in a subshell
|
||||||
(
|
(
|
||||||
source /opt/rh/python27/enable
|
# ensure CentOS6 32bits is not supported anymore, and so certbot is not installed
|
||||||
|
export UNAME_FAKE_32BITS=true
|
||||||
# ensure python 3 isn't installed
|
if ! "$LE_AUTO" 2>&1 | grep -q "Certbot cannot be installed."; then
|
||||||
python3 --version 2> /dev/null
|
echo "ERROR: certbot-auto installed certbot on 32-bit CentOS."
|
||||||
RESULT=$?
|
|
||||||
if [ $RESULT -eq 0 ]; then
|
|
||||||
error "Python3 is already installed."
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
)
|
||||||
|
|
||||||
# ensure python2.7 is available
|
echo "PASSED: On CentOS 6 32 bits, certbot-auto refused to install certbot."
|
||||||
python2.7 --version 2> /dev/null
|
|
||||||
RESULT=$?
|
|
||||||
if [ $RESULT -ne 0 ]; then
|
|
||||||
error "Python3 is not available."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# bootstrap, but don't install python 3.
|
# we're going to modify env variables, so do this in a subshell
|
||||||
"$LE_AUTO" --no-self-upgrade -n > /dev/null 2> /dev/null
|
(
|
||||||
|
. /opt/rh/python27/enable
|
||||||
|
|
||||||
# ensure python 3 isn't installed
|
# ensure python 3 isn't installed
|
||||||
python3 --version 2> /dev/null
|
if python3 --version 2> /dev/null; then
|
||||||
RESULT=$?
|
echo "ERROR: Python3 is already installed."
|
||||||
if [ $RESULT -eq 0 ]; then
|
exit 1
|
||||||
error "letsencrypt-auto installed Python3 even though Python2.7 is present."
|
fi
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ""
|
# ensure python2.7 is available
|
||||||
echo "PASSED: Did not upgrade to Python3 when Python2.7 is present."
|
if ! python2.7 --version 2> /dev/null; then
|
||||||
|
echo "ERROR: Python2.7 is not available."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# bootstrap, but don't install python 3.
|
||||||
|
"$LE_AUTO" --no-self-upgrade -n --version > /dev/null 2> /dev/null
|
||||||
|
|
||||||
|
# ensure python 3 isn't installed
|
||||||
|
if python3 --version 2> /dev/null; then
|
||||||
|
echo "ERROR: letsencrypt-auto installed Python3 even though Python2.7 is present."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "PASSED: Did not upgrade to Python3 when Python2.7 is present."
|
||||||
)
|
)
|
||||||
|
|
||||||
# ensure python2.7 isn't available
|
# ensure python2.7 isn't available
|
||||||
python2.7 --version 2> /dev/null
|
if python2.7 --version 2> /dev/null; then
|
||||||
RESULT=$?
|
echo "ERROR: Python2.7 is still available."
|
||||||
if [ $RESULT -eq 0 ]; then
|
|
||||||
error "Python2.7 is still available."
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Skip self upgrade due to Python 3 not being available.
|
# Skip self upgrade due to Python 3 not being available.
|
||||||
if ! "$LE_AUTO" 2>&1 | grep -q "WARNING: couldn't find Python"; then
|
if ! "$LE_AUTO" 2>&1 | grep -q "WARNING: couldn't find Python"; then
|
||||||
echo "Python upgrade failure warning not printed!"
|
echo "ERROR: Python upgrade failure warning not printed!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# bootstrap, this time installing python3
|
# bootstrap from the old letsencrypt-auto, this time installing python3.4
|
||||||
"$LE_AUTO" --no-self-upgrade -n > /dev/null 2> /dev/null
|
"$LE_AUTO_PY_34" --no-self-upgrade -n --version >/dev/null 2>/dev/null
|
||||||
|
|
||||||
# ensure python 3 is installed
|
# ensure python 3.4 is installed
|
||||||
python3 --version > /dev/null
|
if ! python3.4 --version >/dev/null 2>/dev/null; then
|
||||||
RESULT=$?
|
echo "ERROR: letsencrypt-auto failed to install Python3.4 using letsencrypt-auto < 0.37.0 when only Python2.6 is present."
|
||||||
if [ $RESULT -ne 0 ]; then
|
|
||||||
error "letsencrypt-auto failed to install Python3 when only Python2.6 is present."
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "PASSED: Successfully upgraded to Python3 when only Python2.6 is present."
|
echo "PASSED: Successfully upgraded to Python3.4 using letsencrypt-auto < 0.37.0 when only Python2.6 is present."
|
||||||
echo ""
|
|
||||||
|
|
||||||
export VENV_PATH=$(mktemp -d)
|
# As "certbot-auto" (so without implicit --non-interactive flag set), check that the script
|
||||||
"$LE_AUTO" -n --no-bootstrap --no-self-upgrade --version >/dev/null 2>&1
|
# refuses to install SCL Python 3.6 when run in a non interactive shell (simulated here
|
||||||
if [ "$($VENV_PATH/bin/python -V 2>&1 | cut -d" " -f2 | cut -d. -f1)" != 3 ]; then
|
# using | tee /dev/null) if --non-interactive flag is not provided.
|
||||||
echo "Python 3 wasn't used with --no-bootstrap!"
|
cp "$LE_AUTO" /tmp/certbot-auto
|
||||||
|
# NB: Readline has an issue on all Python versions for CentOS 6, making `certbot --version`
|
||||||
|
# output an unprintable ASCII character on a new line at the end.
|
||||||
|
# So we take the second last line of the output.
|
||||||
|
version=$(/tmp/certbot-auto --version 2>/dev/null | tee /dev/null | tail -2 | head -1)
|
||||||
|
|
||||||
|
if [ "$version" != "$INITIAL_CERTBOT_VERSION_PY34" ]; then
|
||||||
|
echo "ERROR: certbot-auto upgraded certbot in a non-interactive shell with --non-interactive flag not set."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
unset VENV_PATH
|
|
||||||
|
echo "PASSED: certbot-auto did not upgrade certbot in a non-interactive shell with --non-interactive flag not set."
|
||||||
|
|
||||||
|
if [ -f /opt/rh/rh-python36/enable ]; then
|
||||||
|
echo "ERROR: certbot-auto installed Python3.6 in a non-interactive shell with --non-interactive flag not set."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "PASSED: certbot-auto did not install Python3.6 in a non-interactive shell with --non-interactive flag not set."
|
||||||
|
|
||||||
|
# now bootstrap from current letsencrypt-auto, that will install python3.6 from SCL
|
||||||
|
"$LE_AUTO" --no-self-upgrade -n --version >/dev/null 2>/dev/null
|
||||||
|
|
||||||
|
# Following test is exectued in a subshell, to not leak any environment variable
|
||||||
|
(
|
||||||
|
# enable SCL rh-python36
|
||||||
|
. /opt/rh/rh-python36/enable
|
||||||
|
|
||||||
|
# ensure python 3.6 is installed
|
||||||
|
if ! python3.6 --version >/dev/null 2>/dev/null; then
|
||||||
|
echo "ERROR: letsencrypt-auto failed to install Python3.6 using current letsencrypt-auto when only Python2.6/Python3.4 are present."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "PASSED: Successfully upgraded to Python3.6 using current letsencrypt-auto when only Python2.6/Python3.4 are present."
|
||||||
|
)
|
||||||
|
|
||||||
|
# Following test is executed in a subshell, to not leak any environment variable
|
||||||
|
(
|
||||||
|
export VENV_PATH=$(mktemp -d)
|
||||||
|
"$LE_AUTO" -n --no-bootstrap --no-self-upgrade --version >/dev/null 2>&1
|
||||||
|
if [ "$($VENV_PATH/bin/python -V 2>&1 | cut -d" " -f2 | cut -d. -f1-2)" != "3.6" ]; then
|
||||||
|
echo "ERROR: Python 3.6 wasn't used with --no-bootstrap!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
|
||||||
|
# Following test is exectued in a subshell, to not leak any environment variable
|
||||||
|
(
|
||||||
|
# enable SCL rh-python36
|
||||||
|
. /opt/rh/rh-python36/enable
|
||||||
|
|
||||||
|
# ensure everything works fine with certbot-auto bootstrap when python 3.6 is already enabled
|
||||||
|
export VENV_PATH=$(mktemp -d)
|
||||||
|
if ! "$LE_AUTO" --no-self-upgrade -n --version >/dev/null 2>/dev/null; then
|
||||||
|
echo "ERROR: Certbot-auto broke when Python 3.6 SCL is already enabled."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
|
||||||
|
# we're going to modify env variables, so do this in a subshell
|
||||||
|
(
|
||||||
|
# ensure CentOS6 32bits is not supported anymore, and so certbot
|
||||||
|
# is not upgraded nor reinstalled.
|
||||||
|
export UNAME_FAKE_32BITS=true
|
||||||
|
OUTPUT=$("$LE_AUTO" --version 2>&1)
|
||||||
|
if ! echo "$OUTPUT" | grep -q "Certbot will no longer receive updates."; then
|
||||||
|
echo "ERROR: certbot-auto failed to run or upgraded pre-existing Certbot instance on 32-bit CentOS 6."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! "$LE_AUTO" --install-only 2>&1 | grep -q "Certbot cannot be installed."; then
|
||||||
|
echo "ERROR: certbot-auto reinstalled Certbot on 32-bit CentOS 6."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
|
||||||
|
# we're going to modify env variables, so do this in a subshell
|
||||||
|
(
|
||||||
|
# Prepare a certbot installation in the old venv path
|
||||||
|
rm -rf /opt/eff.org
|
||||||
|
VENV_PATH=~/.local/share/letsencrypt "$LE_AUTO" --install-only > /dev/null 2> /dev/null
|
||||||
|
# fake 32 bits mode
|
||||||
|
export UNAME_FAKE_32BITS=true
|
||||||
|
OUTPUT=$("$LE_AUTO" --version 2>&1)
|
||||||
|
if ! echo "$OUTPUT" | grep -q "Certbot will no longer receive updates."; then
|
||||||
|
echo "ERROR: certbot-auto failed to run or upgraded pre-existing Certbot instance in the old venv path on 32-bit CentOS 6."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
|
||||||
|
echo "PASSED: certbot-auto refused to install/upgrade certbot on 32-bit CentOS 6."
|
||||||
|
|
||||||
# test using python3
|
# test using python3
|
||||||
pytest -v -s certbot/letsencrypt-auto-source/tests
|
pytest -v -s certbot/letsencrypt-auto-source/tests
|
||||||
|
|||||||
85
letsencrypt-auto-source/tests/oraclelinux6_tests.sh
Normal file
85
letsencrypt-auto-source/tests/oraclelinux6_tests.sh
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -eo pipefail
|
||||||
|
# Start by making sure your system is up-to-date:
|
||||||
|
yum update -y >/dev/null
|
||||||
|
|
||||||
|
LE_AUTO_PY_34="certbot/letsencrypt-auto-source/letsencrypt-auto_py_34"
|
||||||
|
LE_AUTO="certbot/letsencrypt-auto-source/letsencrypt-auto"
|
||||||
|
|
||||||
|
# Apply installation instructions from official documentation:
|
||||||
|
# https://certbot.eff.org/lets-encrypt/centosrhel6-other
|
||||||
|
cp "$LE_AUTO" /usr/local/bin/certbot-auto
|
||||||
|
chown root /usr/local/bin/certbot-auto
|
||||||
|
chmod 0755 /usr/local/bin/certbot-auto
|
||||||
|
LE_AUTO=/usr/local/bin/certbot-auto
|
||||||
|
|
||||||
|
# Last version of certbot-auto that was bootstraping Python 3.4 for CentOS 6 users
|
||||||
|
INITIAL_CERTBOT_VERSION_PY34="certbot 0.38.0"
|
||||||
|
|
||||||
|
# Check bootstrap from current certbot-auto will fail, because SCL is not enabled.
|
||||||
|
set +o pipefail
|
||||||
|
if ! "$LE_AUTO" -n 2>&1 | grep -q "Enable the SCL repository and try running Certbot again."; then
|
||||||
|
echo "ERROR: Bootstrap was not aborted although SCL was not installed!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
echo "PASSED: Bootstrap was aborted since SCL was not installed."
|
||||||
|
|
||||||
|
# Bootstrap from the old letsencrypt-auto, Python 3.4 will be installed from EPEL.
|
||||||
|
"$LE_AUTO_PY_34" --no-self-upgrade -n --install-only >/dev/null 2>/dev/null
|
||||||
|
|
||||||
|
# Ensure Python 3.4 is installed
|
||||||
|
if ! command -v python3.4 &>/dev/null; then
|
||||||
|
echo "ERROR: old letsencrypt-auto failed to install Python3.4 using letsencrypt-auto < 0.37.0 when only Python2.6 is present."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "PASSED: Bootstrap from old letsencrypt-auto succeeded and installed Python 3.4"
|
||||||
|
|
||||||
|
# Expect certbot-auto to skip rebootstrapping with a warning since SCL is not installed.
|
||||||
|
if ! "$LE_AUTO" --non-interactive --version 2>&1 | grep -q "This requires manual user intervention"; then
|
||||||
|
echo "FAILED: Script certbot-auto did not print a warning about needing manual intervention!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "PASSED: Script certbot-auto did not rebootstrap."
|
||||||
|
|
||||||
|
# NB: Readline has an issue on all Python versions for OL 6, making `certbot --version`
|
||||||
|
# output an unprintable ASCII character on a new line at the end.
|
||||||
|
# So we take the second last line of the output.
|
||||||
|
version=$($LE_AUTO --version 2>/dev/null | tail -2 | head -1)
|
||||||
|
|
||||||
|
if [ "$version" != "$INITIAL_CERTBOT_VERSION_PY34" ]; then
|
||||||
|
echo "ERROR: Script certbot-auto upgraded certbot in a non-interactive shell while SCL was not enabled."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "PASSED: Script certbot-auto did not upgrade certbot but started it successfully while SCL was not enabled."
|
||||||
|
|
||||||
|
# Enable SCL
|
||||||
|
yum install -y oracle-softwarecollection-release-el6 >/dev/null
|
||||||
|
|
||||||
|
# Expect certbot-auto to bootstrap successfully since SCL is available.
|
||||||
|
"$LE_AUTO" -n --version &>/dev/null
|
||||||
|
|
||||||
|
if [ "$(/opt/eff.org/certbot/venv/bin/python -V 2>&1 | cut -d" " -f2 | cut -d. -f1-2)" != "3.6" ]; then
|
||||||
|
echo "ERROR: Script certbot-auto failed to bootstrap and install Python 3.6 while SCL is available."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! /opt/eff.org/certbot/venv/bin/certbot --version > /dev/null 2> /dev/null; then
|
||||||
|
echo "ERROR: Script certbot-auto did not install certbot correctly while SCL is enabled."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "PASSED: Script certbot-auto correctly bootstraped Certbot using rh-python36 when SCL is available."
|
||||||
|
|
||||||
|
# Expect certbot-auto will be totally silent now that everything has been correctly boostraped.
|
||||||
|
OUTPUT_LEN=$("$LE_AUTO" --install-only --no-self-upgrade --quiet 2>&1 | wc -c)
|
||||||
|
if [ "$OUTPUT_LEN" != 0 ]; then
|
||||||
|
echo certbot-auto produced unexpected output!
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "PASSED: Script certbot-auto did not print anything in quiet mode."
|
||||||
10
letsencrypt-auto-source/tests/uname_wrapper.sh
Normal file
10
letsencrypt-auto-source/tests/uname_wrapper.sh
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
uname_output=$(/bin/uname_orig "$@")
|
||||||
|
|
||||||
|
if [ "$UNAME_FAKE_32BITS" = true ]; then
|
||||||
|
uname_output="${uname_output//x86_64/i686}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$uname_output"
|
||||||
@@ -40,7 +40,7 @@ extensions = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
autodoc_member_order = 'bysource'
|
autodoc_member_order = 'bysource'
|
||||||
autodoc_default_flags = ['show-inheritance', 'private-members']
|
autodoc_default_flags = ['show-inheritance']
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|||||||
@@ -117,6 +117,8 @@ if ! diff letsencrypt-auto letsencrypt-auto-source/letsencrypt-auto ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$RUN_RHEL6_TESTS" = 1 ]; then
|
if [ "$RUN_RHEL6_TESTS" = 1 ]; then
|
||||||
|
# Add the SCL python release to PATH in order to resolve python3 command
|
||||||
|
PATH="/opt/rh/rh-python36/root/usr/bin:$PATH"
|
||||||
if ! command -v python3; then
|
if ! command -v python3; then
|
||||||
echo "Python3 wasn't properly installed"
|
echo "Python3 wasn't properly installed"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -1,8 +1,21 @@
|
|||||||
#!/bin/sh -xe
|
#!/bin/sh -xe
|
||||||
|
|
||||||
cd letsencrypt
|
cd letsencrypt
|
||||||
|
|
||||||
|
# If we're on a RHEL 6 based system, we can be confident Python is already
|
||||||
|
# installed because the package manager is written in Python.
|
||||||
|
if command -v python && [ $(python -V 2>&1 | cut -d" " -f 2 | cut -d. -f1,2 | sed 's/\.//') -eq 26 ]; then
|
||||||
|
# RHEL/CentOS 6 will need a special treatment, so we need to detect that environment
|
||||||
|
RUN_RHEL6_TESTS=1
|
||||||
|
fi
|
||||||
|
|
||||||
letsencrypt-auto-source/letsencrypt-auto --install-only -n --debug
|
letsencrypt-auto-source/letsencrypt-auto --install-only -n --debug
|
||||||
|
|
||||||
|
if [ "$RUN_RHEL6_TESTS" = 1 ]; then
|
||||||
|
# Enable the SCL Python 3.6 installed by letsencrypt-auto bootstrap
|
||||||
|
PATH="/opt/rh/rh-python36/root/usr/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
PLUGINS="certbot-apache certbot-nginx"
|
PLUGINS="certbot-apache certbot-nginx"
|
||||||
PYTHON_MAJOR_VERSION=$(/opt/eff.org/certbot/venv/bin/python --version 2>&1 | cut -d" " -f 2 | cut -d. -f1)
|
PYTHON_MAJOR_VERSION=$(/opt/eff.org/certbot/venv/bin/python --version 2>&1 | cut -d" " -f 2 | cut -d. -f1)
|
||||||
TEMP_DIR=$(mktemp -d)
|
TEMP_DIR=$(mktemp -d)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ sed -i -e "s|\# import os|import os|" conf.py
|
|||||||
sed -i -e "s|\# needs_sphinx = '1.0'|needs_sphinx = '1.0'|" conf.py
|
sed -i -e "s|\# needs_sphinx = '1.0'|needs_sphinx = '1.0'|" conf.py
|
||||||
sed -i -e "s|intersphinx_mapping = {'https://docs.python.org/': None}|intersphinx_mapping = {\n 'python': ('https://docs.python.org/', None),\n 'acme': ('https://acme-python.readthedocs.org/en/latest/', None),\n 'certbot': ('https://certbot.eff.org/docs/', None),\n}|" conf.py
|
sed -i -e "s|intersphinx_mapping = {'https://docs.python.org/': None}|intersphinx_mapping = {\n 'python': ('https://docs.python.org/', None),\n 'acme': ('https://acme-python.readthedocs.org/en/latest/', None),\n 'certbot': ('https://certbot.eff.org/docs/', None),\n}|" conf.py
|
||||||
sed -i -e "s|html_theme = 'alabaster'|\n# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs\n# on_rtd is whether we are on readthedocs.org\non_rtd = os.environ.get('READTHEDOCS', None) == 'True'\nif not on_rtd: # only import and set the theme if we're building docs locally\n import sphinx_rtd_theme\n html_theme = 'sphinx_rtd_theme'\n html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n# otherwise, readthedocs.org uses their theme by default, so no need to specify it|" conf.py
|
sed -i -e "s|html_theme = 'alabaster'|\n# http://docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs\n# on_rtd is whether we are on readthedocs.org\non_rtd = os.environ.get('READTHEDOCS', None) == 'True'\nif not on_rtd: # only import and set the theme if we're building docs locally\n import sphinx_rtd_theme\n html_theme = 'sphinx_rtd_theme'\n html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n# otherwise, readthedocs.org uses their theme by default, so no need to specify it|" conf.py
|
||||||
sed -i -e "s|# Add any paths that contain templates here, relative to this directory.|autodoc_member_order = 'bysource'\nautodoc_default_flags = ['show-inheritance', 'private-members']\n\n# Add any paths that contain templates here, relative to this directory.|" conf.py
|
sed -i -e "s|# Add any paths that contain templates here, relative to this directory.|autodoc_member_order = 'bysource'\nautodoc_default_flags = ['show-inheritance']\n\n# Add any paths that contain templates here, relative to this directory.|" conf.py
|
||||||
sed -i -e "s|# The name of the Pygments (syntax highlighting) style to use.|default_role = 'py:obj'\n\n# The name of the Pygments (syntax highlighting) style to use.|" conf.py
|
sed -i -e "s|# The name of the Pygments (syntax highlighting) style to use.|default_role = 'py:obj'\n\n# The name of the Pygments (syntax highlighting) style to use.|" conf.py
|
||||||
echo "/_build/" >> .gitignore
|
echo "/_build/" >> .gitignore
|
||||||
echo "=================
|
echo "=================
|
||||||
|
|||||||
12
tox.ini
12
tox.ini
@@ -207,7 +207,17 @@ passenv = DOCKER_*
|
|||||||
# At the moment, this tests under Python 2.6 only, as only that version is
|
# At the moment, this tests under Python 2.6 only, as only that version is
|
||||||
# readily available on the CentOS 6 Docker image.
|
# readily available on the CentOS 6 Docker image.
|
||||||
commands =
|
commands =
|
||||||
docker build -f letsencrypt-auto-source/Dockerfile.centos6 -t lea letsencrypt-auto-source
|
docker build -f letsencrypt-auto-source/Dockerfile.redhat6 --build-arg REDHAT_DIST_FLAVOR=centos -t lea letsencrypt-auto-source
|
||||||
|
docker run --rm -t -i lea
|
||||||
|
whitelist_externals =
|
||||||
|
docker
|
||||||
|
passenv = DOCKER_*
|
||||||
|
|
||||||
|
[testenv:le_auto_oraclelinux6]
|
||||||
|
# At the moment, this tests under Python 2.6 only, as only that version is
|
||||||
|
# readily available on the Oracle Linux 6 Docker image.
|
||||||
|
commands =
|
||||||
|
docker build -f letsencrypt-auto-source/Dockerfile.redhat6 --build-arg REDHAT_DIST_FLAVOR=oraclelinux -t lea letsencrypt-auto-source
|
||||||
docker run --rm -t -i lea
|
docker run --rm -t -i lea
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
docker
|
docker
|
||||||
|
|||||||
Reference in New Issue
Block a user