mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 00:22:04 +02:00
Merge remote-tracking branch 'letsencrypt/master'
This commit is contained in:
@@ -6,6 +6,7 @@ dist*/
|
|||||||
/venv*/
|
/venv*/
|
||||||
/kgs/
|
/kgs/
|
||||||
/.tox/
|
/.tox/
|
||||||
|
/releases/
|
||||||
letsencrypt.log
|
letsencrypt.log
|
||||||
|
|
||||||
# coverage
|
# coverage
|
||||||
|
|||||||
+3
-1
@@ -18,7 +18,9 @@ install_requires = [
|
|||||||
'pyrfc3339',
|
'pyrfc3339',
|
||||||
'pytz',
|
'pytz',
|
||||||
'requests',
|
'requests',
|
||||||
'setuptools', # pkg_resources
|
# For pkg_resources. >=1.0 so pip resolves it to a version cryptography
|
||||||
|
# will tolerate; see #2599:
|
||||||
|
'setuptools>=1.0',
|
||||||
'six',
|
'six',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,9 @@ install_requires = [
|
|||||||
'acme=={0}'.format(version),
|
'acme=={0}'.format(version),
|
||||||
'letsencrypt=={0}'.format(version),
|
'letsencrypt=={0}'.format(version),
|
||||||
'python-augeas',
|
'python-augeas',
|
||||||
'setuptools', # pkg_resources
|
# For pkg_resources. >=1.0 so pip resolves it to a version cryptography
|
||||||
|
# will tolerate; see #2599:
|
||||||
|
'setuptools>=1.0',
|
||||||
'zope.component',
|
'zope.component',
|
||||||
'zope.interface',
|
'zope.interface',
|
||||||
]
|
]
|
||||||
|
|||||||
+100
-66
@@ -18,25 +18,31 @@ set -e # Work even if somebody does "sh thisscript.sh".
|
|||||||
XDG_DATA_HOME=${XDG_DATA_HOME:-~/.local/share}
|
XDG_DATA_HOME=${XDG_DATA_HOME:-~/.local/share}
|
||||||
VENV_NAME="letsencrypt"
|
VENV_NAME="letsencrypt"
|
||||||
VENV_PATH=${VENV_PATH:-"$XDG_DATA_HOME/$VENV_NAME"}
|
VENV_PATH=${VENV_PATH:-"$XDG_DATA_HOME/$VENV_NAME"}
|
||||||
VENV_BIN=${VENV_PATH}/bin
|
VENV_BIN="$VENV_PATH/bin"
|
||||||
LE_AUTO_VERSION="0.4.0"
|
LE_AUTO_VERSION="0.4.1"
|
||||||
|
|
||||||
# This script takes the same arguments as the main letsencrypt program, but it
|
# This script takes the same arguments as the main letsencrypt program, but it
|
||||||
# additionally responds to --verbose (more output) and --debug (allow support
|
# additionally responds to --verbose (more output) and --debug (allow support
|
||||||
# for experimental platforms)
|
# for experimental platforms)
|
||||||
for arg in "$@" ; do
|
for arg in "$@" ; do
|
||||||
# This first clause is redundant with the third, but hedging on portability
|
case "$arg" in
|
||||||
if [ "$arg" = "-v" ] || [ "$arg" = "--verbose" ] || echo "$arg" | grep -E -- "-v+$" ; then
|
--debug)
|
||||||
VERBOSE=1
|
DEBUG=1;;
|
||||||
elif [ "$arg" = "--no-self-upgrade" ] ; then
|
--os-packages-only)
|
||||||
|
OS_PACKAGES_ONLY=1;;
|
||||||
|
--no-self-upgrade)
|
||||||
# Do not upgrade this script (also prevents client upgrades, because each
|
# Do not upgrade this script (also prevents client upgrades, because each
|
||||||
# copy of the script pins a hash of the python client)
|
# copy of the script pins a hash of the python client)
|
||||||
NO_SELF_UPGRADE=1
|
NO_SELF_UPGRADE=1;;
|
||||||
elif [ "$arg" = "--os-packages-only" ] ; then
|
--verbose)
|
||||||
OS_PACKAGES_ONLY=1
|
VERBOSE=1;;
|
||||||
elif [ "$arg" = "--debug" ]; then
|
[!-]*|-*[!v]*|-)
|
||||||
DEBUG=1
|
# Anything that isn't -v, -vv, etc.: that is, anything that does not
|
||||||
fi
|
# start with a -, contains anything that's not a v, or is just "-"
|
||||||
|
;;
|
||||||
|
*) # -v+ remains.
|
||||||
|
VERBOSE=1;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# letsencrypt-auto needs root access to bootstrap OS dependencies, and
|
# letsencrypt-auto needs root access to bootstrap OS dependencies, and
|
||||||
@@ -91,21 +97,18 @@ ExperimentalBootstrap() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DeterminePythonVersion() {
|
DeterminePythonVersion() {
|
||||||
if command -v python2.7 > /dev/null ; then
|
for LE_PYTHON in "$LE_PYTHON" python2.7 python27 python2 python; do
|
||||||
export LE_PYTHON=${LE_PYTHON:-python2.7}
|
# Break (while keeping the LE_PYTHON value) if found.
|
||||||
elif command -v python27 > /dev/null ; then
|
command -v "$LE_PYTHON" > /dev/null && break
|
||||||
export LE_PYTHON=${LE_PYTHON:-python27}
|
done
|
||||||
elif command -v python2 > /dev/null ; then
|
if [ "$?" != "0" ]; then
|
||||||
export LE_PYTHON=${LE_PYTHON:-python2}
|
echo "Cannot find any Pythons; please install one!"
|
||||||
elif command -v python > /dev/null ; then
|
|
||||||
export LE_PYTHON=${LE_PYTHON:-python}
|
|
||||||
else
|
|
||||||
echo "Cannot find any Pythons... please install one!"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
export LE_PYTHON
|
||||||
|
|
||||||
PYVER=`"$LE_PYTHON" --version 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 26 ]; then
|
if [ "$PYVER" -lt 26 ]; then
|
||||||
echo "You have an ancient version of Python entombed in your operating system..."
|
echo "You have an ancient version of Python entombed in your operating system..."
|
||||||
echo "This isn't going to work; you'll need at least version 2.6."
|
echo "This isn't going to work; you'll need at least version 2.6."
|
||||||
exit 1
|
exit 1
|
||||||
@@ -165,7 +168,7 @@ BootstrapDebCommon() {
|
|||||||
/bin/echo '(Backports are only installed if explicitly requested via "apt-get install -t wheezy-backports")'
|
/bin/echo '(Backports are only installed if explicitly requested via "apt-get install -t wheezy-backports")'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo sh -c "echo $BACKPORT_SOURCELINE >> /etc/apt/sources.list.d/$BACKPORT_NAME.list"
|
$SUDO sh -c "echo $BACKPORT_SOURCELINE >> /etc/apt/sources.list.d/$BACKPORT_NAME.list"
|
||||||
$SUDO apt-get update
|
$SUDO apt-get update
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -304,10 +307,11 @@ BootstrapArchCommon() {
|
|||||||
pkg-config
|
pkg-config
|
||||||
"
|
"
|
||||||
|
|
||||||
missing=$("$SUDO" pacman -T $deps)
|
# pacman -T exits with 127 if there are missing dependencies
|
||||||
|
missing=$($SUDO pacman -T $deps) || true
|
||||||
|
|
||||||
if [ "$missing" ]; then
|
if [ "$missing" ]; then
|
||||||
"$SUDO" pacman -S --needed $missing
|
$SUDO pacman -S --needed $missing
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,19 +328,19 @@ BootstrapGentooCommon() {
|
|||||||
|
|
||||||
case "$PACKAGE_MANAGER" in
|
case "$PACKAGE_MANAGER" in
|
||||||
(paludis)
|
(paludis)
|
||||||
"$SUDO" cave resolve --keep-targets if-possible $PACKAGES -x
|
$SUDO cave resolve --preserve-world --keep-targets if-possible $PACKAGES -x
|
||||||
;;
|
;;
|
||||||
(pkgcore)
|
(pkgcore)
|
||||||
"$SUDO" pmerge --noreplace $PACKAGES
|
$SUDO pmerge --noreplace --oneshot $PACKAGES
|
||||||
;;
|
;;
|
||||||
(portage|*)
|
(portage|*)
|
||||||
"$SUDO" emerge --noreplace $PACKAGES
|
$SUDO emerge --noreplace --oneshot $PACKAGES
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
BootstrapFreeBsd() {
|
BootstrapFreeBsd() {
|
||||||
"$SUDO" pkg install -Ay \
|
$SUDO pkg install -Ay \
|
||||||
python \
|
python \
|
||||||
py27-virtualenv \
|
py27-virtualenv \
|
||||||
augeas \
|
augeas \
|
||||||
@@ -345,20 +349,27 @@ BootstrapFreeBsd() {
|
|||||||
|
|
||||||
BootstrapMac() {
|
BootstrapMac() {
|
||||||
if ! hash brew 2>/dev/null; then
|
if ! hash brew 2>/dev/null; then
|
||||||
echo "Homebrew Not Installed\nDownloading..."
|
echo "Homebrew not installed.\nDownloading..."
|
||||||
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$(brew list --versions augeas)" ]; then
|
||||||
|
echo "augeas not installed.\nInstalling augeas from Homebrew..."
|
||||||
brew install augeas
|
brew install augeas
|
||||||
brew install dialog
|
fi
|
||||||
|
|
||||||
if ! hash pip 2>/dev/null; then
|
if [ -z "$(brew list --versions dialog)" ]; then
|
||||||
echo "pip Not Installed\nInstalling python from Homebrew..."
|
echo "dialog not installed.\nInstalling dialog from Homebrew..."
|
||||||
|
brew install dialog
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$(brew list --versions python)" ]; then
|
||||||
|
echo "python not installed.\nInstalling python from Homebrew..."
|
||||||
brew install python
|
brew install python
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! hash virtualenv 2>/dev/null; then
|
if ! hash virtualenv 2>/dev/null; then
|
||||||
echo "virtualenv Not Installed\nInstalling with pip"
|
echo "virtualenv not installed.\nInstalling with pip..."
|
||||||
pip install virtualenv
|
pip install virtualenv
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -412,9 +423,10 @@ TempDir() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$NO_SELF_UPGRADE" = 1 ]; then
|
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
|
||||||
if [ -f "$VENV_BIN/letsencrypt" ]; then
|
if [ -f "$VENV_BIN/letsencrypt" ]; then
|
||||||
INSTALLED_VERSION=$("$VENV_BIN/letsencrypt" --version 2>&1 | cut -d " " -f 2)
|
INSTALLED_VERSION=$("$VENV_BIN/letsencrypt" --version 2>&1 | cut -d " " -f 2)
|
||||||
else
|
else
|
||||||
@@ -609,10 +621,6 @@ traceback2==1.4.0
|
|||||||
# sha256: IogqDkGMKE4fcYqCKzsCKUTVPS2QjhaQsxmp0-ssBXk
|
# sha256: IogqDkGMKE4fcYqCKzsCKUTVPS2QjhaQsxmp0-ssBXk
|
||||||
unittest2==1.1.0
|
unittest2==1.1.0
|
||||||
|
|
||||||
# sha256: aUkbUwUVfDxuDwSnAZhNaud_1yn8HJrNJQd_HfOFMms
|
|
||||||
# sha256: 619wCpv8lkILBVY1r5AC02YuQ9gMP_0x8iTCW8DV9GI
|
|
||||||
Werkzeug==0.11.3
|
|
||||||
|
|
||||||
# sha256: KCwRK1XdjjyGmjVx-GdnwVCrEoSprOK97CJsWSrK-Bo
|
# sha256: KCwRK1XdjjyGmjVx-GdnwVCrEoSprOK97CJsWSrK-Bo
|
||||||
zope.component==4.2.2
|
zope.component==4.2.2
|
||||||
|
|
||||||
@@ -638,22 +646,25 @@ zope.event==4.1.0
|
|||||||
# sha256: sJyMHUezUxxADgGVaX8UFKYyId5u9HhZik8UYPfZo5I
|
# sha256: sJyMHUezUxxADgGVaX8UFKYyId5u9HhZik8UYPfZo5I
|
||||||
zope.interface==4.1.3
|
zope.interface==4.1.3
|
||||||
|
|
||||||
# sha256: ilvjjTWOS86xchl0WBZ0YOAw_0rmqdnjNsxb1hq2RD8
|
|
||||||
# sha256: T37KMj0TnsuvHIzCCmoww2fpfpOBTj7cd4NAqucXcpw
|
|
||||||
acme==0.4.0
|
|
||||||
|
|
||||||
# sha256: 33BQiANlNLGqGpirTfdCEElTF9YbpaKiYpTbK4zeGD8
|
|
||||||
# sha256: lwsV1OdEzzlMeb08C_PRxaCXZ2vOk_1AI2755rZHmPM
|
|
||||||
letsencrypt==0.4.0
|
|
||||||
|
|
||||||
# sha256: D3YDaVFjLsMSEfjI5B5D5tn5FeWUtNHYXCObw3ih2tg
|
|
||||||
# sha256: VTgvsePYGRmI4IOSAnxoYFHd8KciD73bxIuIHtbVFd8
|
|
||||||
letsencrypt-apache==0.4.0
|
|
||||||
|
|
||||||
# sha256: uDndLZwRfHAUMMFJlWkYpCOphjtIsJyQ4wpgE-fS9E8
|
# sha256: uDndLZwRfHAUMMFJlWkYpCOphjtIsJyQ4wpgE-fS9E8
|
||||||
# sha256: j4MIDaoknQNsvM-4rlzG_wB7iNbZN1ITca-r57Gbrbw
|
# sha256: j4MIDaoknQNsvM-4rlzG_wB7iNbZN1ITca-r57Gbrbw
|
||||||
mock==1.0.1
|
mock==1.0.1
|
||||||
|
|
||||||
|
# THE LINES BELOW ARE EDITED BY THE RELEASE SCRIPT;
|
||||||
|
# ADD ALL DEPENDENCIES ABOVE
|
||||||
|
|
||||||
|
# sha256: zd_qpRKPaFs00y5hex5Rbu5CVLWzed7pBGL28juxoHM
|
||||||
|
# sha256: 18Gfo85AbZXE46GyTkyePthTNiUeoGTQNcXlSvmRQvM
|
||||||
|
acme==0.4.1
|
||||||
|
|
||||||
|
# sha256: wIuGh8yh1TeOClXW0qLz70bKeM9Ax4bfFNrkKSDjbbo
|
||||||
|
# sha256: 7TeAUt8cZ0IZQuQNuUm8MoH8vPWlKaCrwWAkdCEs_5s
|
||||||
|
letsencrypt==0.4.1
|
||||||
|
|
||||||
|
# sha256: bnpKXJTXy9cFSktJLtvTCTovJJybc__Ivqs6XaXxk9U
|
||||||
|
# sha256: bcvJ6j5UB8sOJ_M88DAsqvmaLxD2UnAP9ys-_J6Bdcc
|
||||||
|
letsencrypt-apache==0.4.1
|
||||||
|
|
||||||
UNLIKELY_EOF
|
UNLIKELY_EOF
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
cat << "UNLIKELY_EOF" > "$TEMP_DIR/peep.py"
|
cat << "UNLIKELY_EOF" > "$TEMP_DIR/peep.py"
|
||||||
@@ -745,6 +756,7 @@ except ImportError:
|
|||||||
from pip.util import url_to_path # 0.7.0
|
from pip.util import url_to_path # 0.7.0
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from pip.util import url_to_filename as url_to_path # 0.6.2
|
from pip.util import url_to_filename as url_to_path # 0.6.2
|
||||||
|
from pip.exceptions import InstallationError
|
||||||
from pip.index import PackageFinder, Link
|
from pip.index import PackageFinder, Link
|
||||||
try:
|
try:
|
||||||
from pip.log import logger
|
from pip.log import logger
|
||||||
@@ -763,7 +775,7 @@ except ImportError:
|
|||||||
|
|
||||||
DownloadProgressBar = DownloadProgressSpinner = NullProgressBar
|
DownloadProgressBar = DownloadProgressSpinner = NullProgressBar
|
||||||
|
|
||||||
__version__ = 3, 0, 0
|
__version__ = 3, 1, 1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from pip.index import FormatControl # noqa
|
from pip.index import FormatControl # noqa
|
||||||
@@ -781,6 +793,7 @@ ITS_FINE_ITS_FINE = 0
|
|||||||
SOMETHING_WENT_WRONG = 1
|
SOMETHING_WENT_WRONG = 1
|
||||||
# "Traditional" for command-line errors according to optparse docs:
|
# "Traditional" for command-line errors according to optparse docs:
|
||||||
COMMAND_LINE_ERROR = 2
|
COMMAND_LINE_ERROR = 2
|
||||||
|
UNHANDLED_EXCEPTION = 3
|
||||||
|
|
||||||
ARCHIVE_EXTENSIONS = ('.tar.bz2', '.tar.gz', '.tgz', '.tar', '.zip')
|
ARCHIVE_EXTENSIONS = ('.tar.bz2', '.tar.gz', '.tgz', '.tar', '.zip')
|
||||||
|
|
||||||
@@ -1543,7 +1556,7 @@ def peep_install(argv):
|
|||||||
first_every_last(buckets[SatisfiedReq], *printers)
|
first_every_last(buckets[SatisfiedReq], *printers)
|
||||||
|
|
||||||
return ITS_FINE_ITS_FINE
|
return ITS_FINE_ITS_FINE
|
||||||
except (UnsupportedRequirementError, DownloadError) as exc:
|
except (UnsupportedRequirementError, InstallationError, DownloadError) as exc:
|
||||||
out(str(exc))
|
out(str(exc))
|
||||||
return SOMETHING_WENT_WRONG
|
return SOMETHING_WENT_WRONG
|
||||||
finally:
|
finally:
|
||||||
@@ -1563,16 +1576,23 @@ def peep_port(paths):
|
|||||||
print('Please specify one or more requirements files so I have '
|
print('Please specify one or more requirements files so I have '
|
||||||
'something to port.\n')
|
'something to port.\n')
|
||||||
return COMMAND_LINE_ERROR
|
return COMMAND_LINE_ERROR
|
||||||
|
|
||||||
|
comes_from = None
|
||||||
for req in chain.from_iterable(
|
for req in chain.from_iterable(
|
||||||
_parse_requirements(path, package_finder(argv)) for path in paths):
|
_parse_requirements(path, package_finder(argv)) for path in paths):
|
||||||
|
req_path, req_line = path_and_line(req)
|
||||||
hashes = [hexlify(urlsafe_b64decode((hash + '=').encode('ascii'))).decode('ascii')
|
hashes = [hexlify(urlsafe_b64decode((hash + '=').encode('ascii'))).decode('ascii')
|
||||||
for hash in hashes_above(*path_and_line(req))]
|
for hash in hashes_above(req_path, req_line)]
|
||||||
|
if req_path != comes_from:
|
||||||
|
print()
|
||||||
|
print('# from %s' % req_path)
|
||||||
|
print()
|
||||||
|
comes_from = req_path
|
||||||
|
|
||||||
if not hashes:
|
if not hashes:
|
||||||
print(req.req)
|
print(req.req)
|
||||||
elif len(hashes) == 1:
|
|
||||||
print('%s --hash=sha256:%s' % (req.req, hashes[0]))
|
|
||||||
else:
|
else:
|
||||||
print('%s' % req.req, end='')
|
print('%s' % (req.link if getattr(req, 'link', None) else req.req), end='')
|
||||||
for hash in hashes:
|
for hash in hashes:
|
||||||
print(' \\')
|
print(' \\')
|
||||||
print(' --hash=sha256:%s' % hash, end='')
|
print(' --hash=sha256:%s' % hash, end='')
|
||||||
@@ -1617,7 +1637,7 @@ if __name__ == '__main__':
|
|||||||
exit(main())
|
exit(main())
|
||||||
except Exception:
|
except Exception:
|
||||||
exception_handler(*sys.exc_info())
|
exception_handler(*sys.exc_info())
|
||||||
exit(SOMETHING_WENT_WRONG)
|
exit(UNHANDLED_EXCEPTION)
|
||||||
|
|
||||||
UNLIKELY_EOF
|
UNLIKELY_EOF
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
@@ -1630,8 +1650,10 @@ UNLIKELY_EOF
|
|||||||
# Report error. (Otherwise, be quiet.)
|
# Report error. (Otherwise, be quiet.)
|
||||||
echo "Had a problem while downloading and verifying Python packages:"
|
echo "Had a problem while downloading and verifying Python packages:"
|
||||||
echo "$PEEP_OUT"
|
echo "$PEEP_OUT"
|
||||||
|
rm -rf "$VENV_PATH"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo "Installation succeeded."
|
||||||
fi
|
fi
|
||||||
echo "Requesting root privileges to run letsencrypt..."
|
echo "Requesting root privileges to run letsencrypt..."
|
||||||
echo " " $SUDO "$VENV_BIN/letsencrypt" "$@"
|
echo " " $SUDO "$VENV_BIN/letsencrypt" "$@"
|
||||||
@@ -1653,6 +1675,7 @@ else
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$NO_SELF_UPGRADE" != 1 ]; then
|
||||||
echo "Checking for new version..."
|
echo "Checking for new version..."
|
||||||
TEMP_DIR=$(TempDir)
|
TEMP_DIR=$(TempDir)
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
@@ -1796,14 +1819,25 @@ UNLIKELY_EOF
|
|||||||
# future Windows compatibility.
|
# future Windows compatibility.
|
||||||
"$LE_PYTHON" "$TEMP_DIR/fetch.py" --le-auto-script "v$REMOTE_VERSION"
|
"$LE_PYTHON" "$TEMP_DIR/fetch.py" --le-auto-script "v$REMOTE_VERSION"
|
||||||
|
|
||||||
# Install new copy of letsencrypt-auto. This preserves permissions and
|
# Install new copy of letsencrypt-auto.
|
||||||
# ownership from the old copy.
|
|
||||||
# TODO: Deal with quotes in pathnames.
|
# TODO: Deal with quotes in pathnames.
|
||||||
echo "Replacing letsencrypt-auto..."
|
echo "Replacing letsencrypt-auto..."
|
||||||
echo " " $SUDO cp "$TEMP_DIR/letsencrypt-auto" "$0"
|
# Clone permissions with cp. chmod and chown don't have a --reference
|
||||||
$SUDO cp "$TEMP_DIR/letsencrypt-auto" "$0"
|
# option on OS X or BSD, and stat -c on Linux is stat -f on OS X and BSD:
|
||||||
|
echo " " $SUDO cp -p "$0" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
||||||
|
$SUDO cp -p "$0" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
||||||
|
echo " " $SUDO cp "$TEMP_DIR/letsencrypt-auto" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
||||||
|
$SUDO cp "$TEMP_DIR/letsencrypt-auto" "$TEMP_DIR/letsencrypt-auto.permission-clone"
|
||||||
|
# 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 (esp. under sudo) if the rm doesn't.
|
||||||
|
echo " " $SUDO mv -f "$TEMP_DIR/letsencrypt-auto.permission-clone" "$0"
|
||||||
|
$SUDO mv -f "$TEMP_DIR/letsencrypt-auto.permission-clone" "$0"
|
||||||
# TODO: Clean up temp dir safely, even if it has quotes in its path.
|
# TODO: Clean up temp dir safely, even if it has quotes in its path.
|
||||||
rm -rf "$TEMP_DIR"
|
rm -rf "$TEMP_DIR"
|
||||||
fi # should upgrade
|
fi # A newer version is available.
|
||||||
"$0" --no-self-upgrade "$@"
|
fi # Self-upgrading is allowed.
|
||||||
|
|
||||||
|
"$0" --le-auto-phase2 "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -421,6 +421,19 @@ TempDir() {
|
|||||||
mktemp -d 2>/dev/null || mktemp -d -t 'le' # Linux || OS X
|
mktemp -d 2>/dev/null || mktemp -d -t 'le' # Linux || OS X
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InstallRequirements() {
|
||||||
|
set +e
|
||||||
|
PEEP_OUT=`"$VENV_BIN/python" "$TEMP_DIR/peep.py" install -r "$TEMP_DIR/$1"`
|
||||||
|
PEEP_STATUS=$?
|
||||||
|
set -e
|
||||||
|
if [ "$PEEP_STATUS" != 0 ]; then
|
||||||
|
# Report error. (Otherwise, be quiet.)
|
||||||
|
echo "Had a problem while downloading and verifying Python packages:"
|
||||||
|
echo "$PEEP_OUT"
|
||||||
|
rm -rf "$VENV_PATH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if [ "$1" = "--le-auto-phase2" ]; then
|
if [ "$1" = "--le-auto-phase2" ]; then
|
||||||
@@ -444,7 +457,17 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
|
|
||||||
echo "Installing Python packages..."
|
echo "Installing Python packages..."
|
||||||
TEMP_DIR=$(TempDir)
|
TEMP_DIR=$(TempDir)
|
||||||
|
trap "rm -rf '$TEMP_DIR'" EXIT
|
||||||
# There is no $ interpolation due to quotes on starting heredoc delimiter.
|
# There is no $ interpolation due to quotes on starting heredoc delimiter.
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
cat << "UNLIKELY_EOF" > "$TEMP_DIR/setuptools-requirements.txt"
|
||||||
|
# cryptography requires a more modern version of setuptools.
|
||||||
|
# sha256: _ANFf7h6utSdwJ-cMTOGNpPn3bbKgrtQpzmnc3nOWpo
|
||||||
|
# sha256: JPz8FTZKn-CaIg830tztyEl5Xj3j5LOT7piOZqnL2Fo
|
||||||
|
# sha256: gJaELiTE8ddN_xKr6Qwm0S8F0NmlbtXgb8qm-qHkC2o
|
||||||
|
setuptools==20.2.2
|
||||||
|
|
||||||
|
UNLIKELY_EOF
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
cat << "UNLIKELY_EOF" > "$TEMP_DIR/letsencrypt-auto-requirements.txt"
|
cat << "UNLIKELY_EOF" > "$TEMP_DIR/letsencrypt-auto-requirements.txt"
|
||||||
# This is the flattened list of packages letsencrypt-auto installs. To generate
|
# This is the flattened list of packages letsencrypt-auto installs. To generate
|
||||||
@@ -455,6 +478,11 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
# sha256: YrCJpVvh2JSc0rx-DfC9254Cj678jDIDjMhIYq791uQ
|
# sha256: YrCJpVvh2JSc0rx-DfC9254Cj678jDIDjMhIYq791uQ
|
||||||
argparse==1.4.0
|
argparse==1.4.0
|
||||||
|
|
||||||
|
# This comes before cffi because cffi will otherwise install an unchecked
|
||||||
|
# version via setup_requires.
|
||||||
|
# sha256: eVm0p0q9wnsxL-0cIebK-TCc4LKeqGtZH9Lpns3yf3M
|
||||||
|
pycparser==2.14
|
||||||
|
|
||||||
# sha256: U8HJ3bMEMVE-t_PN7wo-BrDxJSGIqqd0SvD1pM1F268
|
# sha256: U8HJ3bMEMVE-t_PN7wo-BrDxJSGIqqd0SvD1pM1F268
|
||||||
# sha256: pWj0nfyhKo2fNwGHJX78WKOBCeHu5xTZKFYdegGKZPg
|
# sha256: pWj0nfyhKo2fNwGHJX78WKOBCeHu5xTZKFYdegGKZPg
|
||||||
# sha256: gJxsqM-8ruv71DK0V2ABtA04_yRjdzy1dXfXXhoCC8M
|
# sha256: gJxsqM-8ruv71DK0V2ABtA04_yRjdzy1dXfXXhoCC8M
|
||||||
@@ -479,28 +507,28 @@ ConfigArgParse==0.10.0
|
|||||||
# sha256: ovVlB3DhyH-zNa8Zqbfrc_wFzPIhROto230AzSvLCQI
|
# sha256: ovVlB3DhyH-zNa8Zqbfrc_wFzPIhROto230AzSvLCQI
|
||||||
configobj==5.0.6
|
configobj==5.0.6
|
||||||
|
|
||||||
# sha256: 1U_hszrB4J8cEj4vl0948z6V1h1PSALdISIKXD6MEX0
|
# sha256: Axk49zpcXrPoCeGP98rraGU1GHFBe-YFDLjIapogK5o
|
||||||
# sha256: B1X2aE4RhSAFs2MTdh7ctbqEOmTNAizhrC3L1JqTYG0
|
# sha256: oXmjjVD41otJHXoxPbePjKvikIQs7N3dx7NNQI5Z2wo
|
||||||
# sha256: zjhNo4lZlluh90VKJfVp737yqxRd8ueiml4pS3TgRnc
|
# sha256: kGyIsqrc-Zz6uyQJgmPRv2WrDIaIrN4Q2uHwnYZZIPE
|
||||||
# sha256: GvQDkV3LmWHDB2iuZRr6tpKC0dpaut-mN1IhrBGHdQM
|
# sha256: bnBsXGCIdwsdG2NOlZ4hlj4xWwJV9fR3cSWtPVQIKXc
|
||||||
# sha256: ag08d91PH-W8ZfJ--3fsjQSjiNpesl66DiBAwJgZ30o
|
# sha256: 9ev44xxI-HB5Idyg6ZTed4E6nJub8DwRnF3fl73P_nM
|
||||||
# sha256: KdelgcO6_wTh--IAaltHjZ7cfPmib8ijWUkkf09lA3k
|
# sha256: x7ieQiiMx_vuOBLpnvXHRPIkUuEdaCL2gHr8bWs76D4
|
||||||
# sha256: IPAWEKpAh_bVadjMIMR4uB8DhIYnWqqx3Dx12VAsZ-A
|
# sha256: hAjSmGWUcQnYto8YN6fN4apNyG4Peco7pYwMRORD1qU
|
||||||
# sha256: l9hGUIulDVomml82OK4cFmWbNTFaH0B_oVF2cH2j0Jc
|
# sha256: x-ds88PZJd0x-iOM-4Bs_7pxjA8IcH13pTh2hHeWmVY
|
||||||
# sha256: djfqRMLL1NsvLKccsmtmPRczORqnafi8g2xZVilbd5g
|
# sha256: fY3jU4DzFwJ1i3dTu1xAcjgyxzAG3tsvkJm_YaN_coc
|
||||||
# sha256: gR-eqJVbPquzLgQGU0XDB4Ui5rPuPZLz0n08fNcWpjM
|
# sha256: XtvucfrlRp7oP-CjeGa5OYyM46RjJcJPzt-_CXu0ihk
|
||||||
# sha256: DXCMjYz97Qm4fCoLqHY856ZjWG4EPmrEL9eDHpKQHLY
|
# sha256: WU7a_kgBwTvcHMMF53BKkMGWF-lZNvarRX7k_-AAulA
|
||||||
# sha256: Efnq11YqPgATWGytM5o_em9Yg8zhw7S5jhrGnft3p_Y
|
# sha256: t_2xagp_SBvkLadEv-HqIWMCXeIfkPLGiKMW88NU2pw
|
||||||
# sha256: dNhnm55-0ePs-wq1NNyTUruxz3PTYsmQkJTAlyivqJY
|
# sha256: IHuL8P4JBzNt84tzO0h1Ic-eE4GJq6kjStVP5UXdDbg
|
||||||
# sha256: z1Hd-123eBaiB1OKZgEUuC4w4IAD_uhJmwILi4SA2sU
|
# sha256: UJovBThicM94OZPJDUn_77PdYq7kW_HqjOPSzecnHCE
|
||||||
# sha256: 47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
# sha256: rGm2XdGvAXnt5AyfFXiMiPc-Yo6mwFGd44OOJ5uziMY
|
||||||
# sha256: dITvgYGUFB3_eUdf-74vd6-FHiw7v-Lk1ZEjEi-KTjM
|
# sha256: jfb61sauEv1wBOopNX8KK003dOrsp2VlMNCNLZDNQao
|
||||||
# sha256: 7gLB6J7l7pUBV6VK1YTXN8Ec83putMCFPozz8n6WLcA
|
# sha256: C4uW3YHMFTOgTzA4LA_iHBly4Yn3lNDEJhoYzsCP2bU
|
||||||
# sha256: pfGPaxhQpVVKV9v2YsrSUSpGBW5paHJqmFjngN1bnQo
|
# sha256: yuj8oYg_I8UOp42J3m_k_v20zqgxd3YPRxd1WUFN7ZM
|
||||||
# sha256: 26GA8xrb5xi6qdbPirY0hJSwlLK4GAL_8zvVDSfRPnM
|
# sha256: GkccpXapzc4bHNnzoisdCe5E1GhiA3VX3heRnA20RCU
|
||||||
# sha256: 5RinlLjzjoOC9_B3kUGBPOtIE6z9MRVBwNsOGJ69eN4
|
# sha256: jsTo49RTs6G2O19Xc3pDTc8e5KLyb2_3xaN8P2eRBNI
|
||||||
# sha256: f1FFn4TWcERCdeYVg59FQsk1R6Euk4oKSQba_l994VM
|
# sha256: jrEcd92Oc_SN9rL3p-Fhc_4P6P3-JmIygy6IR34IRU4
|
||||||
cryptography==1.1.2
|
cryptography==1.2.3
|
||||||
|
|
||||||
# sha256: JHXX_N31lR6S_1RpcnWIAt5SYL9Akxmp8ZNOa7yLHcc
|
# sha256: JHXX_N31lR6S_1RpcnWIAt5SYL9Akxmp8ZNOa7yLHcc
|
||||||
# sha256: NZB977D5krdat3iPZf7cHPIP-iJojg5vbxKvwGs-pQE
|
# sha256: NZB977D5krdat3iPZf7cHPIP-iJojg5vbxKvwGs-pQE
|
||||||
@@ -528,9 +556,9 @@ ndg-httpsclient==0.4.0
|
|||||||
# sha256: HDW0rCBs7y0kgWyJ-Jzyid09OM98RJuz-re_bUPwGx8
|
# sha256: HDW0rCBs7y0kgWyJ-Jzyid09OM98RJuz-re_bUPwGx8
|
||||||
ordereddict==1.1
|
ordereddict==1.1
|
||||||
|
|
||||||
# sha256: OnTxAPkNZZGDFf5kkHca0gi8PxOv0y01_P5OjQs7gSs
|
# sha256: zp1CIWXPbpY5Bc1fdPJ06_fMmMlBkWFpF475Pw5VeDg
|
||||||
# sha256: Paa-K-UG9ZzOMuGeMOIBBT4btNB-JWaJGOAPikmtQKs
|
# sha256: F8V4d1UgyZExY04Jz8paBeqeG9KgXNBpZ-vs4Q33ry0
|
||||||
parsedatetime==1.5
|
parsedatetime==2.1
|
||||||
|
|
||||||
# sha256: Rsjbda51oFa9HMB_ohc0_i5gPRGgeDPswe63TDXHLgw
|
# sha256: Rsjbda51oFa9HMB_ohc0_i5gPRGgeDPswe63TDXHLgw
|
||||||
# sha256: 4hJ2JqkebIhduJZol22zECDwry2nKJJLVkgPx8zwlkk
|
# sha256: 4hJ2JqkebIhduJZol22zECDwry2nKJJLVkgPx8zwlkk
|
||||||
@@ -572,9 +600,6 @@ psutil==3.3.0
|
|||||||
# sha256: hTys2W0fcB3dZ6oD7MBfUYkBNbcmLpInEBEvEqLtKn8
|
# sha256: hTys2W0fcB3dZ6oD7MBfUYkBNbcmLpInEBEvEqLtKn8
|
||||||
pyasn1==0.1.9
|
pyasn1==0.1.9
|
||||||
|
|
||||||
# sha256: eVm0p0q9wnsxL-0cIebK-TCc4LKeqGtZH9Lpns3yf3M
|
|
||||||
pycparser==2.14
|
|
||||||
|
|
||||||
# sha256: iORea7Jd_tJyoe8ucoRh1EtjTCzWiemJtuVqNJxaOuU
|
# sha256: iORea7Jd_tJyoe8ucoRh1EtjTCzWiemJtuVqNJxaOuU
|
||||||
# sha256: 8KJgcNbbCIHei8x4RpNLfDyTDY-cedRYg-5ImEvA1nI
|
# sha256: 8KJgcNbbCIHei8x4RpNLfDyTDY-cedRYg-5ImEvA1nI
|
||||||
pyOpenSSL==0.15.1
|
pyOpenSSL==0.15.1
|
||||||
@@ -646,22 +671,25 @@ zope.event==4.1.0
|
|||||||
# sha256: sJyMHUezUxxADgGVaX8UFKYyId5u9HhZik8UYPfZo5I
|
# sha256: sJyMHUezUxxADgGVaX8UFKYyId5u9HhZik8UYPfZo5I
|
||||||
zope.interface==4.1.3
|
zope.interface==4.1.3
|
||||||
|
|
||||||
# sha256: ilvjjTWOS86xchl0WBZ0YOAw_0rmqdnjNsxb1hq2RD8
|
|
||||||
# sha256: T37KMj0TnsuvHIzCCmoww2fpfpOBTj7cd4NAqucXcpw
|
|
||||||
acme==0.4.0
|
|
||||||
|
|
||||||
# sha256: 33BQiANlNLGqGpirTfdCEElTF9YbpaKiYpTbK4zeGD8
|
|
||||||
# sha256: lwsV1OdEzzlMeb08C_PRxaCXZ2vOk_1AI2755rZHmPM
|
|
||||||
letsencrypt==0.4.0
|
|
||||||
|
|
||||||
# sha256: D3YDaVFjLsMSEfjI5B5D5tn5FeWUtNHYXCObw3ih2tg
|
|
||||||
# sha256: VTgvsePYGRmI4IOSAnxoYFHd8KciD73bxIuIHtbVFd8
|
|
||||||
letsencrypt-apache==0.4.0
|
|
||||||
|
|
||||||
# sha256: uDndLZwRfHAUMMFJlWkYpCOphjtIsJyQ4wpgE-fS9E8
|
# sha256: uDndLZwRfHAUMMFJlWkYpCOphjtIsJyQ4wpgE-fS9E8
|
||||||
# sha256: j4MIDaoknQNsvM-4rlzG_wB7iNbZN1ITca-r57Gbrbw
|
# sha256: j4MIDaoknQNsvM-4rlzG_wB7iNbZN1ITca-r57Gbrbw
|
||||||
mock==1.0.1
|
mock==1.0.1
|
||||||
|
|
||||||
|
# THE LINES BELOW ARE EDITED BY THE RELEASE SCRIPT;
|
||||||
|
# ADD ALL DEPENDENCIES ABOVE
|
||||||
|
|
||||||
|
# sha256: zd_qpRKPaFs00y5hex5Rbu5CVLWzed7pBGL28juxoHM
|
||||||
|
# sha256: 18Gfo85AbZXE46GyTkyePthTNiUeoGTQNcXlSvmRQvM
|
||||||
|
acme==0.4.1
|
||||||
|
|
||||||
|
# sha256: wIuGh8yh1TeOClXW0qLz70bKeM9Ax4bfFNrkKSDjbbo
|
||||||
|
# sha256: 7TeAUt8cZ0IZQuQNuUm8MoH8vPWlKaCrwWAkdCEs_5s
|
||||||
|
letsencrypt==0.4.1
|
||||||
|
|
||||||
|
# sha256: bnpKXJTXy9cFSktJLtvTCTovJJybc__Ivqs6XaXxk9U
|
||||||
|
# sha256: bcvJ6j5UB8sOJ_M88DAsqvmaLxD2UnAP9ys-_J6Bdcc
|
||||||
|
letsencrypt-apache==0.4.1
|
||||||
|
|
||||||
UNLIKELY_EOF
|
UNLIKELY_EOF
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
cat << "UNLIKELY_EOF" > "$TEMP_DIR/peep.py"
|
cat << "UNLIKELY_EOF" > "$TEMP_DIR/peep.py"
|
||||||
@@ -1638,18 +1666,8 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
UNLIKELY_EOF
|
UNLIKELY_EOF
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
set +e
|
InstallRequirements "setuptools-requirements.txt"
|
||||||
PEEP_OUT=`"$VENV_BIN/python" "$TEMP_DIR/peep.py" install -r "$TEMP_DIR/letsencrypt-auto-requirements.txt"`
|
InstallRequirements "letsencrypt-auto-requirements.txt"
|
||||||
PEEP_STATUS=$?
|
|
||||||
set -e
|
|
||||||
rm -rf "$TEMP_DIR"
|
|
||||||
if [ "$PEEP_STATUS" != 0 ]; then
|
|
||||||
# Report error. (Otherwise, be quiet.)
|
|
||||||
echo "Had a problem while downloading and verifying Python packages:"
|
|
||||||
echo "$PEEP_OUT"
|
|
||||||
rm -rf "$VENV_PATH"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Installation succeeded."
|
echo "Installation succeeded."
|
||||||
fi
|
fi
|
||||||
echo "Requesting root privileges to run letsencrypt..."
|
echo "Requesting root privileges to run letsencrypt..."
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,6 @@
|
|||||||
|
XQAAAAT//////////wBCghGWcdbIc2Jwx9eNx/8BCz2bNPFlhMANgkl2y9DXQ35eeVwpAz1hka/X
|
||||||
|
mbAtebf8wyUrVCYJ295X4aa52T2/hffWukE1K2mV5ZNV2IstEohx5ghX536mksyW2pLB5K6pttTs
|
||||||
|
Zg4DW17p/vWM/VczjT5yhIlR+ZAKcSKGSiMhJXLnvF0UKcQ6RJ2CFdfQhPkEEtjHlWPPlLRc8K9/
|
||||||
|
DyPI1KeAoER9MMl/sZELr7gRJh8vpDV9XtVwQ0RhH59/Xze6s/WvaMf2C08IWysSW/BulLu9YbEs
|
||||||
|
oOiW7OKECzryCNcg4+QISNcoiKUEDGUYbQWMfcB1I0hYjl5HZ332R1ljr9UbdGGdUAF0zby+LvrT
|
||||||
|
///9TmAA
|
||||||
@@ -169,6 +169,19 @@ TempDir() {
|
|||||||
mktemp -d 2>/dev/null || mktemp -d -t 'le' # Linux || OS X
|
mktemp -d 2>/dev/null || mktemp -d -t 'le' # Linux || OS X
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InstallRequirements() {
|
||||||
|
set +e
|
||||||
|
PEEP_OUT=`"$VENV_BIN/python" "$TEMP_DIR/peep.py" install -r "$TEMP_DIR/$1"`
|
||||||
|
PEEP_STATUS=$?
|
||||||
|
set -e
|
||||||
|
if [ "$PEEP_STATUS" != 0 ]; then
|
||||||
|
# Report error. (Otherwise, be quiet.)
|
||||||
|
echo "Had a problem while downloading and verifying Python packages:"
|
||||||
|
echo "$PEEP_OUT"
|
||||||
|
rm -rf "$VENV_PATH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if [ "$1" = "--le-auto-phase2" ]; then
|
if [ "$1" = "--le-auto-phase2" ]; then
|
||||||
@@ -192,7 +205,12 @@ if [ "$1" = "--le-auto-phase2" ]; then
|
|||||||
|
|
||||||
echo "Installing Python packages..."
|
echo "Installing Python packages..."
|
||||||
TEMP_DIR=$(TempDir)
|
TEMP_DIR=$(TempDir)
|
||||||
|
trap "rm -rf '$TEMP_DIR'" EXIT
|
||||||
# There is no $ interpolation due to quotes on starting heredoc delimiter.
|
# There is no $ interpolation due to quotes on starting heredoc delimiter.
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
cat << "UNLIKELY_EOF" > "$TEMP_DIR/setuptools-requirements.txt"
|
||||||
|
{{ setuptools-requirements.txt }}
|
||||||
|
UNLIKELY_EOF
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
cat << "UNLIKELY_EOF" > "$TEMP_DIR/letsencrypt-auto-requirements.txt"
|
cat << "UNLIKELY_EOF" > "$TEMP_DIR/letsencrypt-auto-requirements.txt"
|
||||||
{{ letsencrypt-auto-requirements.txt }}
|
{{ letsencrypt-auto-requirements.txt }}
|
||||||
@@ -202,18 +220,8 @@ UNLIKELY_EOF
|
|||||||
{{ peep.py }}
|
{{ peep.py }}
|
||||||
UNLIKELY_EOF
|
UNLIKELY_EOF
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
set +e
|
InstallRequirements "setuptools-requirements.txt"
|
||||||
PEEP_OUT=`"$VENV_BIN/python" "$TEMP_DIR/peep.py" install -r "$TEMP_DIR/letsencrypt-auto-requirements.txt"`
|
InstallRequirements "letsencrypt-auto-requirements.txt"
|
||||||
PEEP_STATUS=$?
|
|
||||||
set -e
|
|
||||||
rm -rf "$TEMP_DIR"
|
|
||||||
if [ "$PEEP_STATUS" != 0 ]; then
|
|
||||||
# Report error. (Otherwise, be quiet.)
|
|
||||||
echo "Had a problem while downloading and verifying Python packages:"
|
|
||||||
echo "$PEEP_OUT"
|
|
||||||
rm -rf "$VENV_PATH"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Installation succeeded."
|
echo "Installation succeeded."
|
||||||
fi
|
fi
|
||||||
echo "Requesting root privileges to run letsencrypt..."
|
echo "Requesting root privileges to run letsencrypt..."
|
||||||
|
|||||||
@@ -6,6 +6,11 @@
|
|||||||
# sha256: YrCJpVvh2JSc0rx-DfC9254Cj678jDIDjMhIYq791uQ
|
# sha256: YrCJpVvh2JSc0rx-DfC9254Cj678jDIDjMhIYq791uQ
|
||||||
argparse==1.4.0
|
argparse==1.4.0
|
||||||
|
|
||||||
|
# This comes before cffi because cffi will otherwise install an unchecked
|
||||||
|
# version via setup_requires.
|
||||||
|
# sha256: eVm0p0q9wnsxL-0cIebK-TCc4LKeqGtZH9Lpns3yf3M
|
||||||
|
pycparser==2.14
|
||||||
|
|
||||||
# sha256: U8HJ3bMEMVE-t_PN7wo-BrDxJSGIqqd0SvD1pM1F268
|
# sha256: U8HJ3bMEMVE-t_PN7wo-BrDxJSGIqqd0SvD1pM1F268
|
||||||
# sha256: pWj0nfyhKo2fNwGHJX78WKOBCeHu5xTZKFYdegGKZPg
|
# sha256: pWj0nfyhKo2fNwGHJX78WKOBCeHu5xTZKFYdegGKZPg
|
||||||
# sha256: gJxsqM-8ruv71DK0V2ABtA04_yRjdzy1dXfXXhoCC8M
|
# sha256: gJxsqM-8ruv71DK0V2ABtA04_yRjdzy1dXfXXhoCC8M
|
||||||
@@ -30,28 +35,28 @@ ConfigArgParse==0.10.0
|
|||||||
# sha256: ovVlB3DhyH-zNa8Zqbfrc_wFzPIhROto230AzSvLCQI
|
# sha256: ovVlB3DhyH-zNa8Zqbfrc_wFzPIhROto230AzSvLCQI
|
||||||
configobj==5.0.6
|
configobj==5.0.6
|
||||||
|
|
||||||
# sha256: 1U_hszrB4J8cEj4vl0948z6V1h1PSALdISIKXD6MEX0
|
# sha256: Axk49zpcXrPoCeGP98rraGU1GHFBe-YFDLjIapogK5o
|
||||||
# sha256: B1X2aE4RhSAFs2MTdh7ctbqEOmTNAizhrC3L1JqTYG0
|
# sha256: oXmjjVD41otJHXoxPbePjKvikIQs7N3dx7NNQI5Z2wo
|
||||||
# sha256: zjhNo4lZlluh90VKJfVp737yqxRd8ueiml4pS3TgRnc
|
# sha256: kGyIsqrc-Zz6uyQJgmPRv2WrDIaIrN4Q2uHwnYZZIPE
|
||||||
# sha256: GvQDkV3LmWHDB2iuZRr6tpKC0dpaut-mN1IhrBGHdQM
|
# sha256: bnBsXGCIdwsdG2NOlZ4hlj4xWwJV9fR3cSWtPVQIKXc
|
||||||
# sha256: ag08d91PH-W8ZfJ--3fsjQSjiNpesl66DiBAwJgZ30o
|
# sha256: 9ev44xxI-HB5Idyg6ZTed4E6nJub8DwRnF3fl73P_nM
|
||||||
# sha256: KdelgcO6_wTh--IAaltHjZ7cfPmib8ijWUkkf09lA3k
|
# sha256: x7ieQiiMx_vuOBLpnvXHRPIkUuEdaCL2gHr8bWs76D4
|
||||||
# sha256: IPAWEKpAh_bVadjMIMR4uB8DhIYnWqqx3Dx12VAsZ-A
|
# sha256: hAjSmGWUcQnYto8YN6fN4apNyG4Peco7pYwMRORD1qU
|
||||||
# sha256: l9hGUIulDVomml82OK4cFmWbNTFaH0B_oVF2cH2j0Jc
|
# sha256: x-ds88PZJd0x-iOM-4Bs_7pxjA8IcH13pTh2hHeWmVY
|
||||||
# sha256: djfqRMLL1NsvLKccsmtmPRczORqnafi8g2xZVilbd5g
|
# sha256: fY3jU4DzFwJ1i3dTu1xAcjgyxzAG3tsvkJm_YaN_coc
|
||||||
# sha256: gR-eqJVbPquzLgQGU0XDB4Ui5rPuPZLz0n08fNcWpjM
|
# sha256: XtvucfrlRp7oP-CjeGa5OYyM46RjJcJPzt-_CXu0ihk
|
||||||
# sha256: DXCMjYz97Qm4fCoLqHY856ZjWG4EPmrEL9eDHpKQHLY
|
# sha256: WU7a_kgBwTvcHMMF53BKkMGWF-lZNvarRX7k_-AAulA
|
||||||
# sha256: Efnq11YqPgATWGytM5o_em9Yg8zhw7S5jhrGnft3p_Y
|
# sha256: t_2xagp_SBvkLadEv-HqIWMCXeIfkPLGiKMW88NU2pw
|
||||||
# sha256: dNhnm55-0ePs-wq1NNyTUruxz3PTYsmQkJTAlyivqJY
|
# sha256: IHuL8P4JBzNt84tzO0h1Ic-eE4GJq6kjStVP5UXdDbg
|
||||||
# sha256: z1Hd-123eBaiB1OKZgEUuC4w4IAD_uhJmwILi4SA2sU
|
# sha256: UJovBThicM94OZPJDUn_77PdYq7kW_HqjOPSzecnHCE
|
||||||
# sha256: 47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
# sha256: rGm2XdGvAXnt5AyfFXiMiPc-Yo6mwFGd44OOJ5uziMY
|
||||||
# sha256: dITvgYGUFB3_eUdf-74vd6-FHiw7v-Lk1ZEjEi-KTjM
|
# sha256: jfb61sauEv1wBOopNX8KK003dOrsp2VlMNCNLZDNQao
|
||||||
# sha256: 7gLB6J7l7pUBV6VK1YTXN8Ec83putMCFPozz8n6WLcA
|
# sha256: C4uW3YHMFTOgTzA4LA_iHBly4Yn3lNDEJhoYzsCP2bU
|
||||||
# sha256: pfGPaxhQpVVKV9v2YsrSUSpGBW5paHJqmFjngN1bnQo
|
# sha256: yuj8oYg_I8UOp42J3m_k_v20zqgxd3YPRxd1WUFN7ZM
|
||||||
# sha256: 26GA8xrb5xi6qdbPirY0hJSwlLK4GAL_8zvVDSfRPnM
|
# sha256: GkccpXapzc4bHNnzoisdCe5E1GhiA3VX3heRnA20RCU
|
||||||
# sha256: 5RinlLjzjoOC9_B3kUGBPOtIE6z9MRVBwNsOGJ69eN4
|
# sha256: jsTo49RTs6G2O19Xc3pDTc8e5KLyb2_3xaN8P2eRBNI
|
||||||
# sha256: f1FFn4TWcERCdeYVg59FQsk1R6Euk4oKSQba_l994VM
|
# sha256: jrEcd92Oc_SN9rL3p-Fhc_4P6P3-JmIygy6IR34IRU4
|
||||||
cryptography==1.1.2
|
cryptography==1.2.3
|
||||||
|
|
||||||
# sha256: JHXX_N31lR6S_1RpcnWIAt5SYL9Akxmp8ZNOa7yLHcc
|
# sha256: JHXX_N31lR6S_1RpcnWIAt5SYL9Akxmp8ZNOa7yLHcc
|
||||||
# sha256: NZB977D5krdat3iPZf7cHPIP-iJojg5vbxKvwGs-pQE
|
# sha256: NZB977D5krdat3iPZf7cHPIP-iJojg5vbxKvwGs-pQE
|
||||||
@@ -79,9 +84,9 @@ ndg-httpsclient==0.4.0
|
|||||||
# sha256: HDW0rCBs7y0kgWyJ-Jzyid09OM98RJuz-re_bUPwGx8
|
# sha256: HDW0rCBs7y0kgWyJ-Jzyid09OM98RJuz-re_bUPwGx8
|
||||||
ordereddict==1.1
|
ordereddict==1.1
|
||||||
|
|
||||||
# sha256: OnTxAPkNZZGDFf5kkHca0gi8PxOv0y01_P5OjQs7gSs
|
# sha256: zp1CIWXPbpY5Bc1fdPJ06_fMmMlBkWFpF475Pw5VeDg
|
||||||
# sha256: Paa-K-UG9ZzOMuGeMOIBBT4btNB-JWaJGOAPikmtQKs
|
# sha256: F8V4d1UgyZExY04Jz8paBeqeG9KgXNBpZ-vs4Q33ry0
|
||||||
parsedatetime==1.5
|
parsedatetime==2.1
|
||||||
|
|
||||||
# sha256: Rsjbda51oFa9HMB_ohc0_i5gPRGgeDPswe63TDXHLgw
|
# sha256: Rsjbda51oFa9HMB_ohc0_i5gPRGgeDPswe63TDXHLgw
|
||||||
# sha256: 4hJ2JqkebIhduJZol22zECDwry2nKJJLVkgPx8zwlkk
|
# sha256: 4hJ2JqkebIhduJZol22zECDwry2nKJJLVkgPx8zwlkk
|
||||||
@@ -123,9 +128,6 @@ psutil==3.3.0
|
|||||||
# sha256: hTys2W0fcB3dZ6oD7MBfUYkBNbcmLpInEBEvEqLtKn8
|
# sha256: hTys2W0fcB3dZ6oD7MBfUYkBNbcmLpInEBEvEqLtKn8
|
||||||
pyasn1==0.1.9
|
pyasn1==0.1.9
|
||||||
|
|
||||||
# sha256: eVm0p0q9wnsxL-0cIebK-TCc4LKeqGtZH9Lpns3yf3M
|
|
||||||
pycparser==2.14
|
|
||||||
|
|
||||||
# sha256: iORea7Jd_tJyoe8ucoRh1EtjTCzWiemJtuVqNJxaOuU
|
# sha256: iORea7Jd_tJyoe8ucoRh1EtjTCzWiemJtuVqNJxaOuU
|
||||||
# sha256: 8KJgcNbbCIHei8x4RpNLfDyTDY-cedRYg-5ImEvA1nI
|
# sha256: 8KJgcNbbCIHei8x4RpNLfDyTDY-cedRYg-5ImEvA1nI
|
||||||
pyOpenSSL==0.15.1
|
pyOpenSSL==0.15.1
|
||||||
@@ -197,18 +199,21 @@ zope.event==4.1.0
|
|||||||
# sha256: sJyMHUezUxxADgGVaX8UFKYyId5u9HhZik8UYPfZo5I
|
# sha256: sJyMHUezUxxADgGVaX8UFKYyId5u9HhZik8UYPfZo5I
|
||||||
zope.interface==4.1.3
|
zope.interface==4.1.3
|
||||||
|
|
||||||
# sha256: ilvjjTWOS86xchl0WBZ0YOAw_0rmqdnjNsxb1hq2RD8
|
|
||||||
# sha256: T37KMj0TnsuvHIzCCmoww2fpfpOBTj7cd4NAqucXcpw
|
|
||||||
acme==0.4.0
|
|
||||||
|
|
||||||
# sha256: 33BQiANlNLGqGpirTfdCEElTF9YbpaKiYpTbK4zeGD8
|
|
||||||
# sha256: lwsV1OdEzzlMeb08C_PRxaCXZ2vOk_1AI2755rZHmPM
|
|
||||||
letsencrypt==0.4.0
|
|
||||||
|
|
||||||
# sha256: D3YDaVFjLsMSEfjI5B5D5tn5FeWUtNHYXCObw3ih2tg
|
|
||||||
# sha256: VTgvsePYGRmI4IOSAnxoYFHd8KciD73bxIuIHtbVFd8
|
|
||||||
letsencrypt-apache==0.4.0
|
|
||||||
|
|
||||||
# sha256: uDndLZwRfHAUMMFJlWkYpCOphjtIsJyQ4wpgE-fS9E8
|
# sha256: uDndLZwRfHAUMMFJlWkYpCOphjtIsJyQ4wpgE-fS9E8
|
||||||
# sha256: j4MIDaoknQNsvM-4rlzG_wB7iNbZN1ITca-r57Gbrbw
|
# sha256: j4MIDaoknQNsvM-4rlzG_wB7iNbZN1ITca-r57Gbrbw
|
||||||
mock==1.0.1
|
mock==1.0.1
|
||||||
|
|
||||||
|
# THE LINES BELOW ARE EDITED BY THE RELEASE SCRIPT;
|
||||||
|
# ADD ALL DEPENDENCIES ABOVE
|
||||||
|
|
||||||
|
# sha256: zd_qpRKPaFs00y5hex5Rbu5CVLWzed7pBGL28juxoHM
|
||||||
|
# sha256: 18Gfo85AbZXE46GyTkyePthTNiUeoGTQNcXlSvmRQvM
|
||||||
|
acme==0.4.1
|
||||||
|
|
||||||
|
# sha256: wIuGh8yh1TeOClXW0qLz70bKeM9Ax4bfFNrkKSDjbbo
|
||||||
|
# sha256: 7TeAUt8cZ0IZQuQNuUm8MoH8vPWlKaCrwWAkdCEs_5s
|
||||||
|
letsencrypt==0.4.1
|
||||||
|
|
||||||
|
# sha256: bnpKXJTXy9cFSktJLtvTCTovJJybc__Ivqs6XaXxk9U
|
||||||
|
# sha256: bcvJ6j5UB8sOJ_M88DAsqvmaLxD2UnAP9ys-_J6Bdcc
|
||||||
|
letsencrypt-apache==0.4.1
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
# cryptography requires a more modern version of setuptools.
|
||||||
|
# sha256: _ANFf7h6utSdwJ-cMTOGNpPn3bbKgrtQpzmnc3nOWpo
|
||||||
|
# sha256: JPz8FTZKn-CaIg830tztyEl5Xj3j5LOT7piOZqnL2Fo
|
||||||
|
# sha256: gJaELiTE8ddN_xKr6Qwm0S8F0NmlbtXgb8qm-qHkC2o
|
||||||
|
setuptools==20.2.2
|
||||||
@@ -12,7 +12,9 @@ install_requires = [
|
|||||||
'letsencrypt=={0}'.format(version),
|
'letsencrypt=={0}'.format(version),
|
||||||
'PyOpenSSL',
|
'PyOpenSSL',
|
||||||
'pyparsing>=1.5.5', # Python3 support; perhaps unnecessary?
|
'pyparsing>=1.5.5', # Python3 support; perhaps unnecessary?
|
||||||
'setuptools', # pkg_resources
|
# For pkg_resources. >=1.0 so pip resolves it to a version cryptography
|
||||||
|
# will tolerate; see #2599:
|
||||||
|
'setuptools>=1.0',
|
||||||
'zope.interface',
|
'zope.interface',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
+14
-7
@@ -19,6 +19,7 @@ import traceback
|
|||||||
|
|
||||||
import configargparse
|
import configargparse
|
||||||
import OpenSSL
|
import OpenSSL
|
||||||
|
import six
|
||||||
import zope.component
|
import zope.component
|
||||||
import zope.interface.exceptions
|
import zope.interface.exceptions
|
||||||
import zope.interface.verify
|
import zope.interface.verify
|
||||||
@@ -806,12 +807,18 @@ def _restore_required_config_elements(config, renewalparams):
|
|||||||
# int-valued items to add if they're present
|
# int-valued items to add if they're present
|
||||||
for config_item in INT_CONFIG_ITEMS:
|
for config_item in INT_CONFIG_ITEMS:
|
||||||
if config_item in renewalparams and not _set_by_cli(config_item):
|
if config_item in renewalparams and not _set_by_cli(config_item):
|
||||||
|
config_value = renewalparams[config_item]
|
||||||
|
# the default value for http01_port was None during private beta
|
||||||
|
if config_item == "http01_port" and config_value == "None":
|
||||||
|
logger.info("updating legacy http01_port value")
|
||||||
|
int_value = flag_default("http01_port")
|
||||||
|
else:
|
||||||
try:
|
try:
|
||||||
value = int(renewalparams[config_item])
|
int_value = int(config_value)
|
||||||
setattr(config.namespace, config_item, value)
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise errors.Error(
|
raise errors.Error(
|
||||||
"Expected a numeric value for {0}".format(config_item))
|
"Expected a numeric value for {0}".format(config_item))
|
||||||
|
setattr(config.namespace, config_item, int_value)
|
||||||
|
|
||||||
|
|
||||||
def _restore_plugin_configs(config, renewalparams):
|
def _restore_plugin_configs(config, renewalparams):
|
||||||
@@ -842,7 +849,7 @@ def _restore_plugin_configs(config, renewalparams):
|
|||||||
if renewalparams.get("installer", None) is not None:
|
if renewalparams.get("installer", None) is not None:
|
||||||
plugin_prefixes.append(renewalparams["installer"])
|
plugin_prefixes.append(renewalparams["installer"])
|
||||||
for plugin_prefix in set(plugin_prefixes):
|
for plugin_prefix in set(plugin_prefixes):
|
||||||
for config_item, config_value in renewalparams.iteritems():
|
for config_item, config_value in six.iteritems(renewalparams):
|
||||||
if config_item.startswith(plugin_prefix + "_") and not _set_by_cli(config_item):
|
if config_item.startswith(plugin_prefix + "_") and not _set_by_cli(config_item):
|
||||||
# Values None, True, and False need to be treated specially,
|
# Values None, True, and False need to be treated specially,
|
||||||
# As they don't get parsed correctly based on type
|
# As they don't get parsed correctly based on type
|
||||||
@@ -1159,10 +1166,10 @@ class HelpfulArgumentParser(object):
|
|||||||
|
|
||||||
# List of topics for which additional help can be provided
|
# List of topics for which additional help can be provided
|
||||||
HELP_TOPICS = ["all", "security",
|
HELP_TOPICS = ["all", "security",
|
||||||
"paths", "automation", "testing"] + VERBS.keys()
|
"paths", "automation", "testing"] + list(six.iterkeys(VERBS))
|
||||||
|
|
||||||
def __init__(self, args, plugins, detect_defaults=False):
|
def __init__(self, args, plugins, detect_defaults=False):
|
||||||
plugin_names = [name for name, _p in plugins.iteritems()]
|
plugin_names = list(six.iterkeys(plugins))
|
||||||
self.help_topics = self.HELP_TOPICS + plugin_names + [None]
|
self.help_topics = self.HELP_TOPICS + plugin_names + [None]
|
||||||
usage, short_usage = usage_strings(plugins)
|
usage, short_usage = usage_strings(plugins)
|
||||||
self.parser = configargparse.ArgParser(
|
self.parser = configargparse.ArgParser(
|
||||||
@@ -1432,7 +1439,7 @@ class HelpfulArgumentParser(object):
|
|||||||
may or may not be displayed as help topics.
|
may or may not be displayed as help topics.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
for name, plugin_ep in plugins.iteritems():
|
for name, plugin_ep in six.iteritems(plugins):
|
||||||
parser_or_group = self.add_group(name, description=plugin_ep.description)
|
parser_or_group = self.add_group(name, description=plugin_ep.description)
|
||||||
#print(parser_or_group)
|
#print(parser_or_group)
|
||||||
plugin_ep.plugin_cls.inject_parser_options(parser_or_group, name)
|
plugin_ep.plugin_cls.inject_parser_options(parser_or_group, name)
|
||||||
@@ -1827,7 +1834,7 @@ def _process_domain(args_or_config, domain_arg, webroot_path=None):
|
|||||||
class WebrootMapProcessor(argparse.Action): # pylint: disable=missing-docstring
|
class WebrootMapProcessor(argparse.Action): # pylint: disable=missing-docstring
|
||||||
def __call__(self, parser, args, webroot_map_arg, option_string=None):
|
def __call__(self, parser, args, webroot_map_arg, option_string=None):
|
||||||
webroot_map = json.loads(webroot_map_arg)
|
webroot_map = json.loads(webroot_map_arg)
|
||||||
for domains, webroot_path in webroot_map.iteritems():
|
for domains, webroot_path in six.iteritems(webroot_map):
|
||||||
_process_domain(args, domains, [webroot_path])
|
_process_domain(args, domains, [webroot_path])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
"""Tests for letsencrypt.plugins.webroot."""
|
"""Tests for letsencrypt.plugins.webroot."""
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import errno
|
import errno
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
@@ -74,7 +77,7 @@ class AuthenticatorTest(unittest.TestCase):
|
|||||||
os.chmod(self.path, 0o000)
|
os.chmod(self.path, 0o000)
|
||||||
try:
|
try:
|
||||||
open(permission_canary, "r")
|
open(permission_canary, "r")
|
||||||
print "Warning, running tests as root skips permissions tests..."
|
print("Warning, running tests as root skips permissions tests...")
|
||||||
except IOError:
|
except IOError:
|
||||||
# ok, permissions work, test away...
|
# ok, permissions work, test away...
|
||||||
self.assertRaises(errors.PluginError, self.auth.prepare)
|
self.assertRaises(errors.PluginError, self.auth.prepare)
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ from __future__ import print_function
|
|||||||
import collections
|
import collections
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import Queue
|
|
||||||
import sys
|
import sys
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
|
from six.moves import queue # pylint: disable=import-error
|
||||||
import zope.interface
|
import zope.interface
|
||||||
|
|
||||||
from letsencrypt import interfaces
|
from letsencrypt import interfaces
|
||||||
@@ -21,7 +21,7 @@ logger = logging.getLogger(__name__)
|
|||||||
class Reporter(object):
|
class Reporter(object):
|
||||||
"""Collects and displays information to the user.
|
"""Collects and displays information to the user.
|
||||||
|
|
||||||
:ivar `Queue.PriorityQueue` messages: Messages to be displayed to
|
:ivar `queue.PriorityQueue` messages: Messages to be displayed to
|
||||||
the user.
|
the user.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -36,7 +36,7 @@ class Reporter(object):
|
|||||||
_msg_type = collections.namedtuple('ReporterMsg', 'priority text on_crash')
|
_msg_type = collections.namedtuple('ReporterMsg', 'priority text on_crash')
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.messages = Queue.PriorityQueue()
|
self.messages = queue.PriorityQueue()
|
||||||
|
|
||||||
def add_message(self, msg, priority, on_crash=True):
|
def add_message(self, msg, priority, on_crash=True):
|
||||||
"""Adds msg to the list of messages to be printed.
|
"""Adds msg to the list of messages to be printed.
|
||||||
|
|||||||
@@ -694,7 +694,7 @@ class RenewableCert(object): # pylint: disable=too-many-instance-attributes
|
|||||||
for i in (cli_config.renewal_configs_dir, cli_config.archive_dir,
|
for i in (cli_config.renewal_configs_dir, cli_config.archive_dir,
|
||||||
cli_config.live_dir):
|
cli_config.live_dir):
|
||||||
if not os.path.exists(i):
|
if not os.path.exists(i):
|
||||||
os.makedirs(i, 0700)
|
os.makedirs(i, 0o700)
|
||||||
logger.debug("Creating directory %s.", i)
|
logger.debug("Creating directory %s.", i)
|
||||||
config_file, config_filename = le_util.unique_lineage_name(
|
config_file, config_filename = le_util.unique_lineage_name(
|
||||||
cli_config.renewal_configs_dir, lineagename)
|
cli_config.renewal_configs_dir, lineagename)
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
"""Tests for letsencrypt.cli."""
|
"""Tests for letsencrypt.cli."""
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import functools
|
import functools
|
||||||
import itertools
|
import itertools
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import StringIO
|
|
||||||
import traceback
|
import traceback
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
import six
|
||||||
|
|
||||||
from acme import jose
|
from acme import jose
|
||||||
|
|
||||||
@@ -81,7 +84,7 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
|
|||||||
|
|
||||||
def _help_output(self, args):
|
def _help_output(self, args):
|
||||||
"Run a command, and return the ouput string for scrutiny"
|
"Run a command, and return the ouput string for scrutiny"
|
||||||
output = StringIO.StringIO()
|
output = six.StringIO()
|
||||||
with mock.patch('letsencrypt.cli.sys.stdout', new=output):
|
with mock.patch('letsencrypt.cli.sys.stdout', new=output):
|
||||||
self.assertRaises(SystemExit, self._call_stdout, args)
|
self.assertRaises(SystemExit, self._call_stdout, args)
|
||||||
out = output.getvalue()
|
out = output.getvalue()
|
||||||
@@ -580,7 +583,7 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
|
|||||||
try:
|
try:
|
||||||
ret, _, _, _ = self._call(args)
|
ret, _, _, _ = self._call(args)
|
||||||
if ret:
|
if ret:
|
||||||
print "Returned", ret
|
print("Returned", ret)
|
||||||
raise AssertionError(ret)
|
raise AssertionError(ret)
|
||||||
assert not error_expected, "renewal should have errored"
|
assert not error_expected, "renewal should have errored"
|
||||||
except: # pylint: disable=bare-except
|
except: # pylint: disable=bare-except
|
||||||
@@ -628,8 +631,8 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
|
|||||||
|
|
||||||
def _dump_log(self):
|
def _dump_log(self):
|
||||||
with open(os.path.join(self.logs_dir, "letsencrypt.log")) as lf:
|
with open(os.path.join(self.logs_dir, "letsencrypt.log")) as lf:
|
||||||
print "Logs:"
|
print("Logs:")
|
||||||
print lf.read()
|
print(lf.read())
|
||||||
|
|
||||||
|
|
||||||
def _make_test_renewal_conf(self, testfile):
|
def _make_test_renewal_conf(self, testfile):
|
||||||
@@ -710,6 +713,12 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods
|
|||||||
self._test_renew_common(renewalparams=renewalparams, error_expected=True,
|
self._test_renew_common(renewalparams=renewalparams, error_expected=True,
|
||||||
assert_oc_called=False)
|
assert_oc_called=False)
|
||||||
|
|
||||||
|
def test_renew_with_nonetype_http01(self):
|
||||||
|
renewalparams = {'authenticator': 'webroot',
|
||||||
|
'http01_port': 'None'}
|
||||||
|
self._test_renew_common(renewalparams=renewalparams, error_expected=False,
|
||||||
|
assert_oc_called=True)
|
||||||
|
|
||||||
def test_renew_with_bad_domain(self):
|
def test_renew_with_bad_domain(self):
|
||||||
renewalparams = {'authenticator': 'webroot'}
|
renewalparams = {'authenticator': 'webroot'}
|
||||||
names = ['*.example.com']
|
names = ['*.example.com']
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
"""Tests for letsencrypt.colored_logging."""
|
"""Tests for letsencrypt.colored_logging."""
|
||||||
import logging
|
import logging
|
||||||
import StringIO
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
import six
|
||||||
|
|
||||||
from letsencrypt import le_util
|
from letsencrypt import le_util
|
||||||
|
|
||||||
|
|
||||||
@@ -12,7 +13,7 @@ class StreamHandlerTest(unittest.TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
from letsencrypt import colored_logging
|
from letsencrypt import colored_logging
|
||||||
|
|
||||||
self.stream = StringIO.StringIO()
|
self.stream = six.StringIO()
|
||||||
self.stream.isatty = lambda: True
|
self.stream.isatty = lambda: True
|
||||||
self.handler = colored_logging.StreamHandler(self.stream)
|
self.handler = colored_logging.StreamHandler(self.stream)
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import errno
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import stat
|
import stat
|
||||||
import StringIO
|
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
import six
|
||||||
|
|
||||||
from letsencrypt import errors
|
from letsencrypt import errors
|
||||||
|
|
||||||
@@ -307,14 +307,14 @@ class AddDeprecatedArgumentTest(unittest.TestCase):
|
|||||||
self.assertTrue("--old-option is deprecated" in stderr)
|
self.assertTrue("--old-option is deprecated" in stderr)
|
||||||
|
|
||||||
def _get_argparse_warnings(self, args):
|
def _get_argparse_warnings(self, args):
|
||||||
stderr = StringIO.StringIO()
|
stderr = six.StringIO()
|
||||||
with mock.patch("letsencrypt.le_util.sys.stderr", new=stderr):
|
with mock.patch("letsencrypt.le_util.sys.stderr", new=stderr):
|
||||||
self.parser.parse_args(args)
|
self.parser.parse_args(args)
|
||||||
return stderr.getvalue()
|
return stderr.getvalue()
|
||||||
|
|
||||||
def test_help(self):
|
def test_help(self):
|
||||||
self._call("--old-option", 2)
|
self._call("--old-option", 2)
|
||||||
stdout = StringIO.StringIO()
|
stdout = six.StringIO()
|
||||||
with mock.patch("letsencrypt.le_util.sys.stdout", new=stdout):
|
with mock.patch("letsencrypt.le_util.sys.stdout", new=stdout):
|
||||||
try:
|
try:
|
||||||
self.parser.parse_args(["-h"])
|
self.parser.parse_args(["-h"])
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
"""Tests for letsencrypt.reporter."""
|
"""Tests for letsencrypt.reporter."""
|
||||||
import StringIO
|
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
import six
|
||||||
|
|
||||||
|
|
||||||
class ReporterTest(unittest.TestCase):
|
class ReporterTest(unittest.TestCase):
|
||||||
"""Tests for letsencrypt.reporter.Reporter."""
|
"""Tests for letsencrypt.reporter.Reporter."""
|
||||||
@@ -12,7 +13,7 @@ class ReporterTest(unittest.TestCase):
|
|||||||
self.reporter = reporter.Reporter()
|
self.reporter = reporter.Reporter()
|
||||||
|
|
||||||
self.old_stdout = sys.stdout
|
self.old_stdout = sys.stdout
|
||||||
sys.stdout = StringIO.StringIO()
|
sys.stdout = six.StringIO()
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
sys.stdout = self.old_stdout
|
sys.stdout = self.old_stdout
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@ cert = MAGICDIR/live/sample-renewal/cert.pem
|
|||||||
privkey = MAGICDIR/live/sample-renewal/privkey.pem
|
privkey = MAGICDIR/live/sample-renewal/privkey.pem
|
||||||
chain = MAGICDIR/live/sample-renewal/chain.pem
|
chain = MAGICDIR/live/sample-renewal/chain.pem
|
||||||
fullchain = MAGICDIR/live/sample-renewal/fullchain.pem
|
fullchain = MAGICDIR/live/sample-renewal/fullchain.pem
|
||||||
renew_before_expiry = 1 year
|
renew_before_expiry = 4 years
|
||||||
|
|
||||||
# Options and defaults used in the renewal process
|
# Options and defaults used in the renewal process
|
||||||
[renewalparams]
|
[renewalparams]
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
"""Let's Encrypt Apache configuration submission script"""
|
"""Let's Encrypt Apache configuration submission script"""
|
||||||
|
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import atexit
|
import atexit
|
||||||
import contextlib
|
import contextlib
|
||||||
@@ -48,20 +51,20 @@ def make_and_verify_selection(server_root, temp_dir):
|
|||||||
"""
|
"""
|
||||||
copied_files, copied_dirs = copy_config(server_root, temp_dir)
|
copied_files, copied_dirs = copy_config(server_root, temp_dir)
|
||||||
|
|
||||||
print textwrap.fill("A secure copy of the files that have been selected "
|
print(textwrap.fill("A secure copy of the files that have been selected "
|
||||||
"for submission has been created under {0}. All "
|
"for submission has been created under {0}. All "
|
||||||
"comments have been removed and the files are only "
|
"comments have been removed and the files are only "
|
||||||
"accessible by the current user. A list of the files "
|
"accessible by the current user. A list of the files "
|
||||||
"that have been included is shown below. Please make "
|
"that have been included is shown below. Please make "
|
||||||
"sure that this selection does not contain private "
|
"sure that this selection does not contain private "
|
||||||
"keys, passwords, or any other sensitive "
|
"keys, passwords, or any other sensitive "
|
||||||
"information.".format(temp_dir))
|
"information.".format(temp_dir)))
|
||||||
print "\nFiles:"
|
print("\nFiles:")
|
||||||
for copied_file in copied_files:
|
for copied_file in copied_files:
|
||||||
print copied_file
|
print(copied_file)
|
||||||
print "Directories (including all contained files):"
|
print("Directories (including all contained files):")
|
||||||
for copied_dir in copied_dirs:
|
for copied_dir in copied_dirs:
|
||||||
print copied_dir
|
print(copied_dir)
|
||||||
|
|
||||||
sys.stdout.write("\nIs it safe to submit these files? ")
|
sys.stdout.write("\nIs it safe to submit these files? ")
|
||||||
while True:
|
while True:
|
||||||
|
|||||||
@@ -45,7 +45,9 @@ install_requires = [
|
|||||||
'pyrfc3339',
|
'pyrfc3339',
|
||||||
'python2-pythondialog>=3.2.2rc1', # Debian squeeze support, cf. #280
|
'python2-pythondialog>=3.2.2rc1', # Debian squeeze support, cf. #280
|
||||||
'pytz',
|
'pytz',
|
||||||
'setuptools', # pkg_resources
|
# For pkg_resources. >=1.0 so pip resolves it to a version cryptography
|
||||||
|
# will tolerate; see #2599:
|
||||||
|
'setuptools>=1.0',
|
||||||
'six',
|
'six',
|
||||||
'zope.component',
|
'zope.component',
|
||||||
'zope.interface',
|
'zope.interface',
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ common renew
|
|||||||
CheckCertCount 2
|
CheckCertCount 2
|
||||||
|
|
||||||
# This will renew because the expiry is less than 10 years from now
|
# This will renew because the expiry is less than 10 years from now
|
||||||
sed -i "4arenew_before_expiry = 10 years" "$root/conf/renewal/le.wtf.conf"
|
sed -i "4arenew_before_expiry = 4 years" "$root/conf/renewal/le.wtf.conf"
|
||||||
common_no_force_renew renew --rsa-key-size 2048
|
common_no_force_renew renew --rsa-key-size 2048
|
||||||
CheckCertCount 3
|
CheckCertCount 3
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
-----BEGIN PUBLIC KEY-----
|
||||||
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6MR8W/galdxnpGqBsYbq
|
||||||
|
OzQb2eyW15YFjDDEMI0ZOzt8f504obNs920lDnpPD2/KqgsfjOgw2K7xWDJIj/18
|
||||||
|
xUvWPk3LDkrnokNiRkA3KOx3W6fHycKL+zID7zy+xZYBuh2fLyQtWV1VGQ45iNRp
|
||||||
|
9+Zo7rH86cdfgkdnWTlNSHyTLW9NbXvyv/E12bppPcEvgCTAQXgnDVJ0/sqmeiij
|
||||||
|
n9tTFh03aM+R2V/21h8aTraAS24qiPCz6gkmYGC8yr6mglcnNoYbsLNYZ69zF1XH
|
||||||
|
cXPduCPdPdfLlzVlKK1/U7hkA28eG3BIAMh6uJYBRJTpiGgaGdPd7YekUB8S6cy+
|
||||||
|
CQIDAQAB
|
||||||
|
-----END PUBLIC KEY-----
|
||||||
@@ -161,6 +161,23 @@ for module in letsencrypt $subpkgs_modules ; do
|
|||||||
done
|
done
|
||||||
deactivate
|
deactivate
|
||||||
|
|
||||||
|
# pin peep hashes of the things we just built
|
||||||
|
for pkg in acme letsencrypt letsencrypt-apache ; do
|
||||||
|
echo
|
||||||
|
letsencrypt-auto-source/pieces/peep.py hash dist."$version/$pkg"/*.{whl,gz}
|
||||||
|
echo $pkg==$version
|
||||||
|
done > /tmp/hashes.$$
|
||||||
|
|
||||||
|
if ! wc -l /tmp/hashes.$$ | grep -qE "^\s*12 " ; then
|
||||||
|
echo Unexpected peep hash output
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# perform hideous surgery on requirements.txt...
|
||||||
|
head -n -12 letsencrypt-auto-source/pieces/letsencrypt-auto-requirements.txt > /tmp/req.$$
|
||||||
|
cat /tmp/hashes.$$ >> /tmp/req.$$
|
||||||
|
cp /tmp/req.$$ letsencrypt-auto-source/pieces/letsencrypt-auto-requirements.txt
|
||||||
|
|
||||||
# ensure we have the latest built version of leauto
|
# ensure we have the latest built version of leauto
|
||||||
letsencrypt-auto-source/build.py
|
letsencrypt-auto-source/build.py
|
||||||
|
|
||||||
@@ -199,6 +216,8 @@ echo twine upload "$root/dist.$version/*/*"
|
|||||||
|
|
||||||
if [ "$RELEASE_BRANCH" = candidate-"$version" ] ; then
|
if [ "$RELEASE_BRANCH" = candidate-"$version" ] ; then
|
||||||
SetVersion "$nextversion".dev0
|
SetVersion "$nextversion".dev0
|
||||||
|
letsencrypt-auto-source/build.py
|
||||||
|
git add letsencrypt-auto-source/letsencrypt-auto
|
||||||
git diff
|
git diff
|
||||||
git commit -m "Bump version to $nextversion"
|
git commit -m "Bump version to $nextversion"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user