From de477f1f69ee1f2c7e260aac9343be25c5fec197 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 1 Dec 2015 14:05:32 -0800 Subject: [PATCH 1/3] Change default server --- letsencrypt/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/letsencrypt/constants.py b/letsencrypt/constants.py index a402ce923..40155abd7 100644 --- a/letsencrypt/constants.py +++ b/letsencrypt/constants.py @@ -16,7 +16,7 @@ CLI_DEFAULTS = dict( "letsencrypt", "cli.ini"), ], verbose_count=-(logging.WARNING / 10), - server="https://acme-staging.api.letsencrypt.org/directory", + server="https://acme-v01.api.letsencrypt.org/directory", rsa_key_size=2048, rollback_checkpoints=1, config_dir="/etc/letsencrypt", From 87d3cebab2dc65cc6043d904ed21b71b070d6ead Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 1 Dec 2015 16:33:15 -0800 Subject: [PATCH 2/3] Make Helpful more helpful --- letsencrypt/cli.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index 2fae5fe3e..454f4897f 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -771,6 +771,20 @@ class HelpfulArgumentParser(object): kwargs["help"] = argparse.SUPPRESS self.parser.add_argument(*args, **kwargs) + def add_deprecated_argument(self, argument_name, num_args): + """Adds a deprecated argument with the name argument_name. + + Deprecated arguments are not shown in the help. If they are used + on the command line, a warning is shown stating that the + argument is deprecated and no other action is taken. + + :param str argument_name: Name of deprecated argument. + :param int nargs: Number of arguments the option takes. + + """ + le_util.add_deprecated_argument( + self.parser.add_argument, argument_name, num_args) + def add_group(self, topic, **kwargs): """ From 462139fca9d7358df0ca0f24085ae0afddd3cbb9 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 1 Dec 2015 16:51:05 -0800 Subject: [PATCH 3/3] Kill --agree-dev-preview --- DISCLAIMER | 1 - Dockerfile-dev | 2 +- MANIFEST.in | 1 - examples/dev-cli.ini | 1 - letsencrypt/DISCLAIMER | 5 ----- letsencrypt/cli.py | 13 ++----------- letsencrypt/tests/cli_test.py | 9 ++++----- tests/integration/_common.sh | 1 - 8 files changed, 7 insertions(+), 26 deletions(-) delete mode 120000 DISCLAIMER delete mode 100644 letsencrypt/DISCLAIMER diff --git a/DISCLAIMER b/DISCLAIMER deleted file mode 120000 index e580554ff..000000000 --- a/DISCLAIMER +++ /dev/null @@ -1 +0,0 @@ -letsencrypt/DISCLAIMER \ No newline at end of file diff --git a/Dockerfile-dev b/Dockerfile-dev index 838b60e8b..b89411c90 100644 --- a/Dockerfile-dev +++ b/Dockerfile-dev @@ -33,7 +33,7 @@ RUN /opt/letsencrypt/src/ubuntu.sh && \ # Dockerfile we make sure we cache as much as possible # py26reqs.txt not installed! -COPY setup.py README.rst CHANGES.rst MANIFEST.in DISCLAIMER linter_plugin.py tox.cover.sh tox.ini pep8.travis.sh .pep8 .pylintrc /opt/letsencrypt/src/ +COPY setup.py README.rst CHANGES.rst MANIFEST.in linter_plugin.py tox.cover.sh tox.ini pep8.travis.sh .pep8 .pylintrc /opt/letsencrypt/src/ # all above files are necessary for setup.py, however, package source # code directory has to be copied separately to a subdirectory... diff --git a/MANIFEST.in b/MANIFEST.in index 5d5b0bed4..a82c7dd8c 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,7 +4,6 @@ include CHANGES.rst include CONTRIBUTING.md include LICENSE.txt include linter_plugin.py -include letsencrypt/DISCLAIMER recursive-include docs * recursive-include examples * recursive-include letsencrypt/tests/testdata * diff --git a/examples/dev-cli.ini b/examples/dev-cli.ini index 2ea5d247d..be703814a 100644 --- a/examples/dev-cli.ini +++ b/examples/dev-cli.ini @@ -8,7 +8,6 @@ email = foo@example.com domains = example.com text = True -agree-dev-preview = True agree-tos = True debug = True # Unfortunately, it's not possible to specify "verbose" multiple times diff --git a/letsencrypt/DISCLAIMER b/letsencrypt/DISCLAIMER deleted file mode 100644 index dd7759361..000000000 --- a/letsencrypt/DISCLAIMER +++ /dev/null @@ -1,5 +0,0 @@ -This is a PREVIEW RELEASE of a client application for the Let's Encrypt certificate authority and other services using the ACME protocol. The Let's Encrypt certificate authority is NOT YET ISSUING CERTIFICATES TO THE PUBLIC. - -Until publicly-trusted certificates can be issued by Let's Encrypt, this software CANNOT OBTAIN A PUBLICLY-TRUSTED CERTIFICATE FOR YOUR WEB SERVER. You should only use this program if you are a developer interested in experimenting with the ACME protocol or in helping to improve this software. If you want to configure your web site with HTTPS in the meantime, please obtain a certificate from a different authority. - -For updates on the status of Let's Encrypt, please visit the Let's Encrypt home page at https://letsencrypt.org/. diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index 454f4897f..fd53316b1 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -6,7 +6,6 @@ import functools import logging import logging.handlers import os -import pkg_resources import sys import time import traceback @@ -894,9 +893,6 @@ def prepare_and_parse_args(plugins, args): "automation", "--renew-by-default", action="store_true", help="Select renewal by default when domains are a superset of a " "a previously attained cert") - helpful.add( - "automation", "--agree-dev-preview", action="store_true", - help="Agree to the Let's Encrypt Developer Preview Disclaimer") helpful.add( "automation", "--agree-tos", dest="tos", action="store_true", help="Agree to the Let's Encrypt Subscriber Agreement") @@ -961,6 +957,8 @@ def prepare_and_parse_args(plugins, args): help="Require that all configuration files are owned by the current " "user; only needed if your config is somewhere unsafe like /tmp/") + helpful.add_deprecated_argument("--agree-dev-preview", 0) + _create_subparsers(helpful) _paths_parser(helpful) # _plugins_parsing should be the last thing to act upon the main @@ -1218,13 +1216,6 @@ def main(cli_args=sys.argv[1:]): zope.component.provideUtility(report) atexit.register(report.atexit_print_messages) - # TODO: remove developer preview prompt for the launch - if not config.agree_dev_preview: - disclaimer = pkg_resources.resource_string("letsencrypt", "DISCLAIMER") - if not zope.component.getUtility(interfaces.IDisplay).yesno( - disclaimer, "Agree", "Cancel"): - raise errors.Error("Must agree to TOS") - if not os.geteuid() == 0: logger.warning( "Root (sudo) is required to run most of letsencrypt functionality.") diff --git a/letsencrypt/tests/cli_test.py b/letsencrypt/tests/cli_test.py index e512668c5..36f8c4fc7 100644 --- a/letsencrypt/tests/cli_test.py +++ b/letsencrypt/tests/cli_test.py @@ -39,9 +39,9 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods self.config_dir = os.path.join(self.tmp_dir, 'config') self.work_dir = os.path.join(self.tmp_dir, 'work') self.logs_dir = os.path.join(self.tmp_dir, 'logs') - self.standard_args = ['--text', '--config-dir', self.config_dir, - '--work-dir', self.work_dir, '--logs-dir', - self.logs_dir, '--agree-dev-preview'] + self.standard_args = ['--config-dir', self.config_dir, + '--work-dir', self.work_dir, + '--logs-dir', self.logs_dir, '--text'] def tearDown(self): shutil.rmtree(self.tmp_dir) @@ -180,8 +180,7 @@ class CLITest(unittest.TestCase): # pylint: disable=too-many-public-methods def test_configurator_selection(self, mock_exe_exists): mock_exe_exists.return_value = True real_plugins = disco.PluginsRegistry.find_all() - args = ['--agree-dev-preview', '--apache', - '--authenticator', 'standalone'] + args = ['--apache', '--authenticator', 'standalone'] # This needed two calls to find_all(), which we're avoiding for now # because of possible side effects: diff --git a/tests/integration/_common.sh b/tests/integration/_common.sh index 71d745d93..4572b0fb3 100755 --- a/tests/integration/_common.sh +++ b/tests/integration/_common.sh @@ -21,7 +21,6 @@ letsencrypt_test () { $store_flags \ --text \ --no-redirect \ - --agree-dev-preview \ --agree-tos \ --register-unsafely-without-email \ --renew-by-default \