Skip to content

Commit

Permalink
Merge pull request #5682 from certbot/candidate-0.22.0
Browse files Browse the repository at this point in the history
Release 0.22.0
  • Loading branch information
bmw committed Mar 12, 2018
2 parents 64d6477 + 7a495f2 commit 53c6b9a
Show file tree
Hide file tree
Showing 22 changed files with 186 additions and 130 deletions.
2 changes: 1 addition & 1 deletion acme/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages


version = '0.22.0.dev0'
version = '0.23.0.dev0'

# Please update tox.ini when modifying dependency version requirements
install_requires = [
Expand Down
2 changes: 1 addition & 1 deletion certbot-apache/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages


version = '0.22.0.dev0'
version = '0.23.0.dev0'

# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
Expand Down
104 changes: 66 additions & 38 deletions certbot-auto
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ if [ -z "$VENV_PATH" ]; then
fi
VENV_BIN="$VENV_PATH/bin"
BOOTSTRAP_VERSION_PATH="$VENV_PATH/certbot-auto-bootstrap-version.txt"
LE_AUTO_VERSION="0.21.1"
LE_AUTO_VERSION="0.22.0"
BASENAME=$(basename $0)
USAGE="Usage: $BASENAME [OPTIONS]
A self-updating wrapper script for the Certbot ACME client. When run, updates
Expand All @@ -47,6 +47,7 @@ Help for certbot itself cannot be provided until it is installed.
--no-bootstrap do not install OS dependencies
--no-self-upgrade do not download updates
--os-packages-only install OS dependencies and exit
--install-only install certbot, upgrade if needed, and exit
-v, --verbose provide more output
-q, --quiet provide only update/error output;
implies --non-interactive
Expand All @@ -60,6 +61,8 @@ for arg in "$@" ; do
DEBUG=1;;
--os-packages-only)
OS_PACKAGES_ONLY=1;;
--install-only)
INSTALL_ONLY=1;;
--no-self-upgrade)
# Do not upgrade this script (also prevents client upgrades, because each
# copy of the script pins a hash of the python client)
Expand Down Expand Up @@ -246,7 +249,7 @@ DeprecationBootstrap() {
fi
}

MIN_PYTHON_VERSION="2.6"
MIN_PYTHON_VERSION="2.7"
MIN_PYVER=$(echo "$MIN_PYTHON_VERSION" | sed 's/\.//')
# Sets LE_PYTHON to Python version string and PYVER to the first two
# digits of the python version
Expand Down Expand Up @@ -1196,24 +1199,24 @@ letsencrypt==0.7.0 \
--hash=sha256:105a5fb107e45bcd0722eb89696986dcf5f08a86a321d6aef25a0c7c63375ade \
--hash=sha256:c36e532c486a7e92155ee09da54b436a3c420813ec1c590b98f635d924720de9
certbot==0.21.1 \
--hash=sha256:08f026078807fbcfd7bfab44c4d827ee287738fefcc86fbe1493ce752d2fdccb \
--hash=sha256:e6c8e9b0b5e38834330831d5a91e1c08accdb9b4923855d14d524e7327e6c4ea
acme==0.21.1 \
--hash=sha256:4b2b5ef80c755dfa30eb5c67ab4b4e66e7f205ad922b43170502c5f8d8ef1242 \
--hash=sha256:296e8abf4f5a69af1a892416faceea90e15f39e2920bf87beeaad1d6ce70a60b
certbot-apache==0.21.1 \
--hash=sha256:faa4af1033564a0e676d16940775593fb849527b494a15f6a816ad0ed4fa273c \
--hash=sha256:0bce4419d4fdabbdda2223cff8db6794c5717632fb9511b00498ec00982a3fa5
certbot-nginx==0.21.1 \
--hash=sha256:3fad3b4722544558ce03132f853e18da5e516013086aaa40f1036aa6667c70a9 \
--hash=sha256:55a32afe0950ff49d3118f93035463a46c85c2f399d261123f5fe973afdd4f64
certbot==0.22.0 \
--hash=sha256:ebfeaf9737dc440a9f263099487523ab4c8d8da9def31a71327439d9186e00fa \
--hash=sha256:ee307dd8f194bd710a3326aa4bacf95d358877498c0b9aa187eff0dc211dcbb3
acme==0.22.0 \
--hash=sha256:37e6d8e4eb7dd18edac96de209f451300e04074f14be7fce713db6931a0e4a20 \
--hash=sha256:4a2cd52db32e914b68d8446c8e788f507c20edebbd1c36d4f3eda7b47c555fe8
certbot-apache==0.22.0 \
--hash=sha256:e91f6ec8203b636fa44f01017646fca68406224ee327fd56017103b78bc65539 \
--hash=sha256:8fbab1a358ec131996d1c00f7d0ed18ee3624f8469cab3962dfd8ba40ca3e7cd
certbot-nginx==0.22.0 \
--hash=sha256:d67210cf73cf44e8aeff04f6f228d8bde74444703ce3ccd929a450685b58c30b \
--hash=sha256:b2b26bf9112062b02518407704cad09f7136322163d529a2dde3b6e1578ecb8c
UNLIKELY_EOF
# -------------------------------------------------------------------------
cat << "UNLIKELY_EOF" > "$TEMP_DIR/pipstrap.py"
#!/usr/bin/env python
"""A small script that can act as a trust root for installing pip 8
"""A small script that can act as a trust root for installing pip >=8
Embed this in your project, and your VCS checkout is all you have to trust. In
a post-peep era, this lets you claw your way to a hash-checking version of pip,
Expand All @@ -1237,6 +1240,7 @@ anything goes wrong, it will exit with a non-zero status code.
from __future__ import print_function
from distutils.version import StrictVersion
from hashlib import sha256
from os import environ
from os.path import join
from pipes import quote
from shutil import rmtree
Expand Down Expand Up @@ -1270,33 +1274,29 @@ except ImportError:
from urllib.parse import urlparse # 3.4
__version__ = 1, 3, 0
__version__ = 1, 5, 1
PIP_VERSION = '9.0.1'
DEFAULT_INDEX_BASE = 'https://pypi.python.org'
# wheel has a conditional dependency on argparse:
maybe_argparse = (
[('https://pypi.python.org/packages/18/dd/'
'e617cfc3f6210ae183374cd9f6a26b20514bbb5a792af97949c5aacddf0f/'
[('18/dd/e617cfc3f6210ae183374cd9f6a26b20514bbb5a792af97949c5aacddf0f/'
'argparse-1.4.0.tar.gz',
'62b089a55be1d8949cd2bc7e0df0bddb9e028faefc8c32038cc84862aefdd6e4')]
if version_info < (2, 7, 0) else [])
PACKAGES = maybe_argparse + [
# Pip has no dependencies, as it vendors everything:
('https://pypi.python.org/packages/11/b6/'
'abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/'
'pip-{0}.tar.gz'
.format(PIP_VERSION),
('11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/'
'pip-{0}.tar.gz'.format(PIP_VERSION),
'09f243e1a7b461f654c26a725fa373211bb7ff17a9300058b205c61658ca940d'),
# This version of setuptools has only optional dependencies:
('https://pypi.python.org/packages/69/65/'
'4c544cde88d4d876cdf5cbc5f3f15d02646477756d89547e9a7ecd6afa76/'
'setuptools-20.2.2.tar.gz',
'24fcfc15364a9fe09a220f37d2dcedc849795e3de3e4b393ee988e66a9cbd85a'),
('https://pypi.python.org/packages/c9/1d/'
'bd19e691fd4cfe908c76c429fe6e4436c9e83583c4414b54f6c85471954a/'
('59/88/2f3990916931a5de6fa9706d6d75eb32ee8b78627bb2abaab7ed9e6d0622/'
'setuptools-29.0.1.tar.gz',
'b539118819a4857378398891fa5366e090690e46b3e41421a1e07d6e9fd8feb0'),
('c9/1d/bd19e691fd4cfe908c76c429fe6e4436c9e83583c4414b54f6c85471954a/'
'wheel-0.29.0.tar.gz',
'1ebb8ad7e26b448e9caa4773d2357849bf80ff9e313964bcaf79cbf0201a1648')
]
Expand All @@ -1317,12 +1317,13 @@ def hashed_download(url, temp, digest):
# >=2.7.9 verifies HTTPS certs itself, and, in any case, the cert
# authenticity has only privacy (not arbitrary code execution)
# implications, since we're checking hashes.
def opener():
def opener(using_https=True):
opener = build_opener(HTTPSHandler())
# Strip out HTTPHandler to prevent MITM spoof:
for handler in opener.handlers:
if isinstance(handler, HTTPHandler):
opener.handlers.remove(handler)
if using_https:
# Strip out HTTPHandler to prevent MITM spoof:
for handler in opener.handlers:
if isinstance(handler, HTTPHandler):
opener.handlers.remove(handler)
return opener
def read_chunks(response, chunk_size):
Expand All @@ -1332,8 +1333,9 @@ def hashed_download(url, temp, digest):
break
yield chunk
response = opener().open(url)
path = join(temp, urlparse(url).path.split('/')[-1])
parsed_url = urlparse(url)
response = opener(using_https=parsed_url.scheme == 'https').open(url)
path = join(temp, parsed_url.path.split('/')[-1])
actual_hash = sha256()
with open(path, 'wb') as file:
for chunk in read_chunks(response, 4096):
Expand All @@ -1346,18 +1348,38 @@ def hashed_download(url, temp, digest):
return path
def get_index_base():
"""Return the URL to the dir containing the "packages" folder.
Try to wring something out of PIP_INDEX_URL, if set. Hack "/simple" off the
end if it's there; that is likely to give us the right dir.
"""
env_var = environ.get('PIP_INDEX_URL', '').rstrip('/')
if env_var:
SIMPLE = '/simple'
if env_var.endswith(SIMPLE):
return env_var[:-len(SIMPLE)]
else:
return env_var
else:
return DEFAULT_INDEX_BASE
def main():
pip_version = StrictVersion(check_output(['pip', '--version'])
.decode('utf-8').split()[1])
min_pip_version = StrictVersion(PIP_VERSION)
if pip_version >= min_pip_version:
return 0
has_pip_cache = pip_version >= StrictVersion('6.0')
index_base = get_index_base()
temp = mkdtemp(prefix='pipstrap-')
try:
downloads = [hashed_download(url, temp, digest)
for url, digest in PACKAGES]
downloads = [hashed_download(index_base + '/packages/' + path,
temp,
digest)
for path, digest in PACKAGES]
check_output('pip install --no-index --no-deps -U ' +
# Disable cache since we're not using it and it otherwise
# sometimes throws permission warnings:
Expand Down Expand Up @@ -1428,6 +1450,12 @@ UNLIKELY_EOF

say "Installation succeeded."
fi

if [ "$INSTALL_ONLY" = 1 ]; then
say "Certbot is installed."
exit 0
fi

"$VENV_BIN/letsencrypt" "$@"

else
Expand Down
2 changes: 1 addition & 1 deletion certbot-compatibility-test/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages


version = '0.22.0.dev0'
version = '0.23.0.dev0'

install_requires = [
'certbot',
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-cloudflare/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages


version = '0.22.0.dev0'
version = '0.23.0.dev0'

# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-cloudxns/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages


version = '0.22.0.dev0'
version = '0.23.0.dev0'

# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-digitalocean/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages


version = '0.22.0.dev0'
version = '0.23.0.dev0'

# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-dnsimple/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages


version = '0.22.0.dev0'
version = '0.23.0.dev0'

# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-dnsmadeeasy/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages


version = '0.22.0.dev0'
version = '0.23.0.dev0'

# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-google/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages


version = '0.22.0.dev0'
version = '0.23.0.dev0'

# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-luadns/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages


version = '0.22.0.dev0'
version = '0.23.0.dev0'

# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-nsone/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages


version = '0.22.0.dev0'
version = '0.23.0.dev0'

# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-rfc2136/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages


version = '0.22.0.dev0'
version = '0.23.0.dev0'

# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
Expand Down
2 changes: 1 addition & 1 deletion certbot-dns-route53/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from distutils.core import setup
from setuptools import find_packages

version = '0.22.0.dev0'
version = '0.23.0.dev0'

# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
Expand Down
2 changes: 1 addition & 1 deletion certbot-nginx/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import find_packages


version = '0.22.0.dev0'
version = '0.23.0.dev0'

# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
Expand Down
2 changes: 1 addition & 1 deletion certbot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Certbot client."""

# version number like 1.2.3a0, must have at least 2 parts, like 1.2
__version__ = '0.22.0.dev0'
__version__ = '0.23.0.dev0'
12 changes: 6 additions & 6 deletions docs/cli-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ optional arguments:
case, and to know when to deprecate support for past
Python versions and flags. If you wish to hide this
information from the Let's Encrypt server, set this to
"". (default: CertbotACMEClient/0.21.1 (certbot;
"". (default: CertbotACMEClient/0.22.0 (certbot;
darwin 10.13.3) Authenticator/XXX Installer/YYY
(SUBCOMMAND; flags: FLAGS) Py/2.7.14). The flags
(SUBCOMMAND; flags: FLAGS) Py/3.6.4). The flags
encoded in the user agent are: --duplicate, --force-
renew, --allow-subset-of-names, -n, and whether any
hooks are set.
Expand Down Expand Up @@ -199,8 +199,8 @@ testing:

--test-cert, --staging
Use the staging server to obtain or revoke test
(invalid) certificates; equivalent to --server https
://acme-staging.api.letsencrypt.org/directory
(invalid) certificates; equivalent to --server
https://acme-staging.api.letsencrypt.org/directory
(default: False)
--debug Show tracebacks in case of errors, and allow certbot-
auto execution on experimental platforms (default:
Expand Down Expand Up @@ -308,8 +308,8 @@ renew:
of renewed certificate domains (for example,
"example.com www.example.com" (default: None)
--disable-hook-validation
Ordinarily the commands specified for --pre-hook
/--post-hook/--deploy-hook will be checked for
Ordinarily the commands specified for --pre-
hook/--post-hook/--deploy-hook will be checked for
validity, to see if the programs being run are in the
$PATH, so that mistakes can be caught early, even when
the hooks aren't being run just yet. The validation is
Expand Down

0 comments on commit 53c6b9a

Please sign in to comment.