Partial le-auto rename

This commit is contained in:
Brad Warren
2016-04-14 10:50:31 -07:00
parent ae6f1c62f1
commit 21173e2353
5 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -17,16 +17,16 @@ RUN apt-get update && \
apt-get clean apt-get clean
RUN pip install nose RUN pip install nose
RUN mkdir -p /home/lea/letsencrypt RUN mkdir -p /home/lea/certbot
# Install fake testing CA: # Install fake testing CA:
COPY ./tests/certs/ca/my-root-ca.crt.pem /usr/local/share/ca-certificates/ COPY ./tests/certs/ca/my-root-ca.crt.pem /usr/local/share/ca-certificates/
RUN update-ca-certificates RUN update-ca-certificates
# Copy code: # Copy code:
COPY . /home/lea/letsencrypt/letsencrypt-auto-source COPY . /home/lea/certbot/letsencrypt-auto-source
USER lea USER lea
WORKDIR /home/lea WORKDIR /home/lea
CMD ["nosetests", "-v", "-s", "letsencrypt/letsencrypt-auto-source/tests"] CMD ["nosetests", "-v", "-s", "certbot/letsencrypt-auto-source/tests"]
+5 -5
View File
@@ -14,11 +14,11 @@ from sys import argv
DIR = dirname(abspath(__file__)) DIR = dirname(abspath(__file__))
def le_version(build_script_dir): def certbot_version(build_script_dir):
"""Return the version number stamped in letsencrypt/__init__.py.""" """Return the version number stamped in certbot/__init__.py."""
return re.search('''^__version__ = ['"](.+)['"].*''', return re.search('''^__version__ = ['"](.+)['"].*''',
file_contents(join(dirname(build_script_dir), file_contents(join(dirname(build_script_dir),
'letsencrypt', 'certbot',
'__init__.py')), '__init__.py')),
re.M).group(1) re.M).group(1)
@@ -32,13 +32,13 @@ def build(version=None, requirements=None):
"""Return the built contents of the letsencrypt-auto script. """Return the built contents of the letsencrypt-auto script.
:arg version: The version to attach to the script. Default: the version of :arg version: The version to attach to the script. Default: the version of
the letsencrypt package the certbot package
:arg requirements: The contents of the requirements file to embed. Default: :arg requirements: The contents of the requirements file to embed. Default:
contents of letsencrypt-auto-requirements.txt contents of letsencrypt-auto-requirements.txt
""" """
special_replacements = { special_replacements = {
'LE_AUTO_VERSION': version or le_version(DIR) 'LE_AUTO_VERSION': version or certbot_version(DIR)
} }
if requirements: if requirements:
special_replacements['letsencrypt-auto-requirements.txt'] = requirements special_replacements['letsencrypt-auto-requirements.txt'] = requirements
@@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# Download and run the latest release version of the Let's Encrypt client. # Download and run the latest release version of the Certbot client.
# #
# NOTE: THIS SCRIPT IS AUTO-GENERATED AND SELF-UPDATING # NOTE: THIS SCRIPT IS AUTO-GENERATED AND SELF-UPDATING
# #
@@ -46,7 +46,7 @@ for arg in "$@" ; do
done done
# letsencrypt-auto needs root access to bootstrap OS dependencies, and # letsencrypt-auto needs root access to bootstrap OS dependencies, and
# letsencrypt itself needs root access for almost all modes of operation # certbot itself needs root access for almost all modes of operation
# The "normal" case is that sudo is used for the steps that need root, but # The "normal" case is that sudo is used for the steps that need root, but
# this script *can* be run as root (not recommended), or fall back to using # this script *can* be run as root (not recommended), or fall back to using
# `su` # `su`
@@ -157,7 +157,7 @@ Bootstrap() {
elif grep -iq "Amazon Linux" /etc/issue ; then elif grep -iq "Amazon Linux" /etc/issue ; then
ExperimentalBootstrap "Amazon Linux" BootstrapRpmCommon ExperimentalBootstrap "Amazon Linux" BootstrapRpmCommon
else else
echo "Sorry, I don't know how to bootstrap Let's Encrypt on your operating system!" echo "Sorry, I don't know how to bootstrap Certbot on your operating system!"
echo echo
echo "You will need to bootstrap, configure virtualenv, and run pip install manually." echo "You will need to bootstrap, configure virtualenv, and run pip install manually."
echo "Please see https://letsencrypt.readthedocs.org/en/latest/contributing.html#prerequisites" echo "Please see https://letsencrypt.readthedocs.org/en/latest/contributing.html#prerequisites"
@@ -219,7 +219,7 @@ UNLIKELY_EOF
fi fi
echo "Installation succeeded." echo "Installation succeeded."
fi fi
echo "Requesting root privileges to run letsencrypt..." echo "Requesting root privileges to run certbot..."
echo " " $SUDO "$VENV_BIN/letsencrypt" "$@" echo " " $SUDO "$VENV_BIN/letsencrypt" "$@"
$SUDO "$VENV_BIN/letsencrypt" "$@" $SUDO "$VENV_BIN/letsencrypt" "$@"
else else
@@ -227,8 +227,8 @@ else
# #
# Each phase checks the version of only the thing it is responsible for # Each phase checks the version of only the thing it is responsible for
# upgrading. Phase 1 checks the version of the latest release of # upgrading. Phase 1 checks the version of the latest release of
# letsencrypt-auto (which is always the same as that of the letsencrypt # letsencrypt-auto (which is always the same as that of the certbot
# package). Phase 2 checks the version of the locally installed letsencrypt. # package). Phase 2 checks the version of the locally installed certbot.
if [ ! -f "$VENV_BIN/letsencrypt" ]; then if [ ! -f "$VENV_BIN/letsencrypt" ]; then
# If it looks like we've never bootstrapped before, bootstrap: # If it looks like we've never bootstrapped before, bootstrap:
@@ -69,7 +69,7 @@ BootstrapDebCommon() {
AddBackportRepo precise-backports "deb http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse" AddBackportRepo precise-backports "deb http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse"
else else
echo "No libaugeas0 version is available that's new enough to run the" echo "No libaugeas0 version is available that's new enough to run the"
echo "Let's Encrypt apache plugin..." echo "Certbot apache plugin..."
fi fi
# XXX add a case for ubuntu PPAs # XXX add a case for ubuntu PPAs
fi fi
@@ -1,5 +1,5 @@
# This is the flattened list of packages letsencrypt-auto installs. To generate # This is the flattened list of packages letsencrypt-auto installs. To generate
# this, do `pip install --no-cache-dir -e acme -e . -e letsencrypt-apache`, and # this, do `pip install --no-cache-dir -e acme -e . -e certbot-apache`, and
# then use `hashin` or a more secure method to gather the hashes. # then use `hashin` or a more secure method to gather the hashes.
argparse==1.4.0 \ argparse==1.4.0 \