mirror of
https://github.com/certbot/certbot.git
synced 2026-08-04 12:32:02 +02:00
* fix --no-bootstrap on RHEL6
* Add regression test
(cherry picked from commit a1aba5842e)
This commit is contained in:
@@ -761,13 +761,8 @@ BootstrapMageiaCommon() {
|
|||||||
# Set Bootstrap to the function that installs OS dependencies on this system
|
# Set Bootstrap to the function that installs OS dependencies on this system
|
||||||
# and BOOTSTRAP_VERSION to the unique identifier for the current version of
|
# and BOOTSTRAP_VERSION to the unique identifier for the current version of
|
||||||
# that function. If Bootstrap is set to a function that doesn't install any
|
# that function. If Bootstrap is set to a function that doesn't install any
|
||||||
# packages (either because --no-bootstrap was included on the command line or
|
# packages BOOTSTRAP_VERSION is not set.
|
||||||
# we don't know how to bootstrap on this system), BOOTSTRAP_VERSION is not set.
|
if [ -f /etc/debian_version ]; then
|
||||||
if [ "$NO_BOOTSTRAP" = 1 ]; then
|
|
||||||
Bootstrap() {
|
|
||||||
:
|
|
||||||
}
|
|
||||||
elif [ -f /etc/debian_version ]; then
|
|
||||||
Bootstrap() {
|
Bootstrap() {
|
||||||
BootstrapMessage "Debian-based OSes"
|
BootstrapMessage "Debian-based OSes"
|
||||||
BootstrapDebCommon
|
BootstrapDebCommon
|
||||||
@@ -863,6 +858,17 @@ else
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# We handle this case after determining the normal bootstrap version to allow
|
||||||
|
# variables like USE_PYTHON_3 to be properly set. As described above, if the
|
||||||
|
# Bootstrap function doesn't install any packages, BOOTSTRAP_VERSION should not
|
||||||
|
# be set so we unset it here.
|
||||||
|
if [ "$NO_BOOTSTRAP" = 1 ]; then
|
||||||
|
Bootstrap() {
|
||||||
|
:
|
||||||
|
}
|
||||||
|
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.
|
||||||
|
|||||||
@@ -300,13 +300,8 @@ DeterminePythonVersion() {
|
|||||||
# Set Bootstrap to the function that installs OS dependencies on this system
|
# Set Bootstrap to the function that installs OS dependencies on this system
|
||||||
# and BOOTSTRAP_VERSION to the unique identifier for the current version of
|
# and BOOTSTRAP_VERSION to the unique identifier for the current version of
|
||||||
# that function. If Bootstrap is set to a function that doesn't install any
|
# that function. If Bootstrap is set to a function that doesn't install any
|
||||||
# packages (either because --no-bootstrap was included on the command line or
|
# packages BOOTSTRAP_VERSION is not set.
|
||||||
# we don't know how to bootstrap on this system), BOOTSTRAP_VERSION is not set.
|
if [ -f /etc/debian_version ]; then
|
||||||
if [ "$NO_BOOTSTRAP" = 1 ]; then
|
|
||||||
Bootstrap() {
|
|
||||||
:
|
|
||||||
}
|
|
||||||
elif [ -f /etc/debian_version ]; then
|
|
||||||
Bootstrap() {
|
Bootstrap() {
|
||||||
BootstrapMessage "Debian-based OSes"
|
BootstrapMessage "Debian-based OSes"
|
||||||
BootstrapDebCommon
|
BootstrapDebCommon
|
||||||
@@ -402,6 +397,17 @@ else
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# We handle this case after determining the normal bootstrap version to allow
|
||||||
|
# variables like USE_PYTHON_3 to be properly set. As described above, if the
|
||||||
|
# Bootstrap function doesn't install any packages, BOOTSTRAP_VERSION should not
|
||||||
|
# be set so we unset it here.
|
||||||
|
if [ "$NO_BOOTSTRAP" = 1 ]; then
|
||||||
|
Bootstrap() {
|
||||||
|
:
|
||||||
|
}
|
||||||
|
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.
|
||||||
|
|||||||
@@ -69,5 +69,13 @@ fi
|
|||||||
echo "PASSED: Successfully upgraded to Python3 when only Python2.6 is present."
|
echo "PASSED: Successfully upgraded to Python3 when only Python2.6 is present."
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
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)" != 3 ]; then
|
||||||
|
echo "Python 3 wasn't used with --no-bootstrap!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
unset VENV_PATH
|
||||||
|
|
||||||
# test using python3
|
# test using python3
|
||||||
pytest -v -s certbot/letsencrypt-auto-source/tests
|
pytest -v -s certbot/letsencrypt-auto-source/tests
|
||||||
|
|||||||
Reference in New Issue
Block a user