1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00
Commit Graph

227 Commits

Author SHA1 Message Date
Brad Warren
5ca8f7c5b9 Add lockfile (#4449)
* add lock_file

* cleanup lock file

* Add LockFile tests

* add lock_dir

* add lock_dir_until_exit

* add set_up_core_dir and move lock_dir_until_exit

* Move lock_and_call to certbot.test.util

* Add lock to Apache

* Add lock to the Nginx plugin

* Improve permissions error message

* sort plugins

* add test_prepare_order

* provide more actionable permissions error

* Document and catch use of OSError

* don't lock a directory twice

* add conditional dependency on ordereddict

* Add lock_test

* expand sorted plugins comment

* Add lock_test to lint

* make make_lineage more conventional and flexible

* enhance lock_test.py

* add lock_test to tox

* Readd success message

* make py26 happy

* add test_acquire_without_deletion
2017-05-01 14:49:12 -07:00
Brad Warren
8fa12bef8e Tell the world we're Python 3 compatible (#4568)
* Mention python 3 support in setup.py

* Build universal (py2 and py3 compatible) wheels

* Mention Python 3.3+ support in docs

* we work on python 3.6 too
2017-04-28 16:06:45 -07:00
Brad Warren
89af460792 Reuse dynamic install_requires. (#4554)
* Revert "Make argparse dependency unconditional. (#2249)"

  This reverts commit 8f10103496.

* Update comment about environment markers
2017-04-28 15:03:50 -07:00
Brad Warren
a542fcd019 Revert "Add a global lock file to Certbot (#4369)" (#4445)
This reverts commit 32122cfa21.
2017-03-30 15:47:31 -07:00
Brad Warren
32122cfa21 Add a global lock file to Certbot (#4369)
* add fasteners as a dependency

* add LOCK_FILE constant

* Add lock file to Certbot

* Move code to _run_subcommand

* move lock file path into CLI_CONSTANTS

* add --lock-path flag

* move locking code to separate function

* Add TestAcquireFileLock

* assert we log

* test lock contention

* add fasteners to certbot-auto

* Use a different lock file for each test in MainTest
2017-03-20 15:48:39 -07:00
Brad Warren
662c323b55 Build wheels correctly for Python 2.6 (#4313)
* stop conditionally pinning mock version in acme

* stop conditionally pinning mock version in certbot

* stop conditionally pinning mock version in apache

* stop conditionally pinning mock version in nginx

* stop conditionally pinning mock version in letshelp

* stop conditionally pinning mock version in compatibility-test
2017-03-10 10:58:03 -08:00
Erik Rose
8f10103496 Make argparse dependency unconditional. (#2249)
The primary motivation is to avoid a branch, giving bugs one fewer place to hide. But, as a bonus, more people get a more bugfixed version of argparse. (To use the example from the argparse docs, people stuck on Python 3.2.3 can get bugfixes that made it into the stdlib only in 3.2.4.)
2017-03-08 17:10:12 -08:00
Joona Hoikkala
e02d641490 Docker changes for easier testing (#4249)
These changes allow developers to run tests directly from the host machine using Docker, and to enable ipdb inside the container.

docker-compose.yml is upgraded to version 2 format. This means that you need docker-engine version >= 1.10.0 instead of previous requirement of version >= 1.9.1. The reason for this is to be able to use custom Dockerfile (Dockerfile-dev in this case) in build context.

ipdb has been added to dev dependencies to be able to be able to debug the code without installing it on every docker run. This is also what we recommend for debugging in the developer documentation, so there really is no reason not to install it with the dev dependencies.

setuptools is being upgraded to a newer version to be able to run coverage tests. This was using the older version of setuptools for some reason, and without the upgrade, coverage tests would fail horribly. Upgrading remedies the situation.

Few examples: 

Run unit tests for certbot-apache
`docker-compose run --rm --service-ports development bash -c 'cd src;nosetests -v certbot-apache'`

Run coverage tests
`docker-compose run --rm --service-ports development bash -c 'cd src;./tox.cover.sh'`

Run linter
`docker-compose run --rm --service-ports development bash -c 'cd src;tox -e lint'`
2017-02-24 11:40:03 -08:00
Brad Warren
20be8b327d Provide a way to opt-in to EFF e-mail (#4082)
* Add eff email flags

* add eff_sign_up

* add requests dep to certbot

* make pylint happy

* Add EFF subscribe uri

* add POST to EFF and write tests

* log EFF e-mail submission

* Add eff module and tests

* cleanup client tests

* offer subscription when changing e-mail

* cleanup client.py and tests

* expand e-mail prompt
2017-01-31 17:08:21 -08:00
Brad Warren
be5bcfe463 Remove optional dependencies (#4088)
* Stop using already_listening in standalone

* remove already_listening

* remove psutil entirely

* fix #595

* Add basic perform test

* make pep8 happy

* Add test_perform_eacces

* add _setup_perform_error

* Add test_perform_unexpected_socket_error

* add test_perform_eaddrinuse_no_retry

* add test_perform_eaddrinuse_retry

* cleanup tests

* stop using dnspython

* don't install dns extras in tox

* remove dns extras from setup.py

* Add simple_verify back to DNS response

* remove dnspython from oldest tests
2017-01-30 16:55:54 -08:00
Brad Warren
bb669528b3 Remove old references to pep8 in our code (#4073) 2017-01-19 11:21:25 -08:00
Brad Warren
39f5551305 Merge the manual and script plugins (#3890)
* Start of combined manual/script plugin

* Return str from hooks.execute, not bytes

* finish manual/script rewrite

* delete old manual and script plugins

* manually specify we want chall.token

* use consistent quotes

* specify chall for uri

* s/script/hook

* fix spacing on instructions

* remove unneeded response argument

* make achall more helpful

* simplify perform

* remove old test files

* add start of manual_tests

* fix ParseTest.test_help

* stop using manual_test_mode in cli tests

* Revert "make achall more helpful"

This reverts commit 54b01cea30.

* use bad response/validation methods on achalls

* simplify perform and cleanup environment

* finish manual tests

* Add HTTP manual hook integration test

* add manual http scripts

* Add manual DNS script integration test

* remove references to the script plugin

* they're hooks, not scripts

* add --manual-public-ip-logging-ok to integration tests

* use --pref-chall for dns integration

* does dns work?

* validate hooks

* test hook validation

* Revert "does dns work?"

This reverts commit 1224cc2961.

* busy wait in manual-http-auth

* remove DNS script test for now

* Fix challenge prefix and add trailing .

* Add comment about universal_newlines

* Fix typo from 0464ba2c4

* fix nits and typos

* Generalize HookCOmmandNotFound error

* Add verify_exe_exists

* Don't duplicate code in hooks.py

* Revert changes to hooks.py

* Use consistent hook error messages
2016-12-22 08:24:08 -08:00
Peter Eckersley
0956e61c7c Remove the sphinxcontrib.programout [docs]dependency (#3830)
- By making a static text file at release time, and including that
   instead.
2016-11-30 10:47:10 -08:00
Joona Hoikkala
d741e684d0 Script plugin (#3521)
* Script plugin initial commit

* Fix auth script path

* Return correct responses

* Added DNS-01 support

* Report the challenge pref correctly

* Use config root from certbot constants rather than hardcoded

* Remove prehook and rename posthook to cleanup for clarity

* Refactoring

* Docs

* Refactoring

* Refactoring continued, working now

* Use global preferred-challenges argument in favor of local

* Added http-01 as fallback challenge if not defined

* Do not continue if auth script not defined

* Skip unnecessary steps when running

* Read config values from correct places

* Tests and minor fixes

* Make Python 2.6 happy again

* Added CERTBOT_AUTH_OUTPUT and better tests

* Lint & Py3 fixes

* Make Python 2.6 happy again

* Doc changes

* Refactor hook execute and reuse in script plugin

* Refactored hook validation

* Added long_description for plugin help text

* Refactored env var writing
2016-11-07 15:22:48 -08:00
Erica Portnoy
d54cb76432 Remove the curses dialog, thereby deprecating the --help and --dialog command line options (#3665)
* Remove the curses dialog, thereby deprecating the --help and --dialog command line options

* Deprecate --dialog and suppress --text
2016-10-21 15:45:57 -07:00
Peter Eckersley
e1d8ba4977 Merge pull request #3269 from yan12125/python3-certonly
Python 3 support for certonly
2016-08-05 14:43:55 -07:00
Yen Chi Hsuan
8a09a7ed67 Python 3 support for certonly 2016-07-30 23:07:02 +08:00
Joona Hoikkala
9bd361b28d Remove psutil dependency 2016-07-25 11:13:16 +03:00
Brad Warren
340e4dc0f2 Remove unused nosexcover dependency 2016-06-17 10:50:02 -07:00
Brad Warren
b324845a9c fixes #1080 2016-05-31 15:24:19 -07:00
Brad Warren
5b2ab14711 Revert "Pin old pkginfo version"
This reverts commit 4919814dd1.
2016-05-25 16:50:18 -07:00
Brad Warren
4919814dd1 Pin old pkginfo version 2016-05-23 15:39:00 -07:00
Brad Warren
a65fca486c Specify minimum parsedatetime version 2016-05-06 11:57:12 -07:00
Brad Warren
b956a968c6 this commit was authored by the Certbot Project 2016-04-14 16:56:02 -07:00
Brad Warren
e3aba30ec4 Change Certbot author and description 2016-04-13 16:37:38 -07:00
Brad Warren
3961b70deb s/letsencrypt/certbot 2016-04-13 16:03:59 -07:00
Peter Eckersley
2656d97260 Update entry point 2016-03-11 11:53:58 -08:00
Erik Rose
55b63fca0d Require setuptools>=1.0 in all packages that use the cryptography lib.
When pip-installing any of these packages, pip hit our permissive, any-version "setuptools" dependency first and then ignored all subsequent, more constrained ones, like cryptography's "setuptools>=1.0". See https://github.com/pypa/pip/issues/988. It thus, on a box with setuptools 0.9.8, stuck with that version. Then, at runtime, letsencrypt crashed because pkg_resources couldn't satisfy cryptography's setuptools>=1.0 requirement.

This change lets us pip-install our packages and have it work. We'll need to make sure our direct requirements (all of them) satisfy the more constrained requirements of our dependencies. Yes, it is disgusting.
2016-03-03 18:02:38 -05:00
Brad Warren
96618a0608 Revert "version < 2.0"
This reverts commit 564d37c0fd.
2016-03-02 14:49:39 -08:00
Brad Warren
564d37c0fd version < 2.0 2016-02-29 15:39:19 -08:00
Brad Warren
45ee1eb889 Merge branch 'testing-dev-extras' 2016-02-12 16:19:57 -08:00
Brad Warren
04be86ce4b Remove entry point 2016-02-03 14:49:48 -08:00
Erik Rose
7189778927 Merge the downgrade of the ConfigArgParse dependency to 0.9.3. 2016-01-25 18:32:36 -05:00
Erik Rose
65fbeede69 Downgrade declared ConfigArgParse requirement. Fix #2243. 2016-01-20 16:24:21 -05:00
Erik Rose
e1bd1645b6 Revert moving mock to test_requires.
We'll take this up later, but I don't want to hold up the new le-auto on this debate.
2016-01-15 18:25:26 -05:00
Erik Rose
ecbe2a5c69 Merge master in to get the unconditionalization of dependencies. 2016-01-15 13:43:36 -05:00
Erik Rose
5d93678303 Make ConfigArgParse dependencies unconditional as well.
None of this is ideal, since we're making the dependencies tighter than they theoretically need to be, but the behavior of the old le-auto makes this necessary to make it succeed in practice (when using LE wheels).

Once we move to the new le-auto (which pins everything and makes setup.py dependencies irrelevant for auto installs), we should redo this using env markers as in https://github.com/letsencrypt/letsencrypt/pull/2177. We're too afraid to do it now.

Similarly, we're too afraid to change how we handle argparse right now, despite that it should be required directly by us under 2.6. In practice, ConfigArgParse pulls it in for us, so we're okay as long as it continues to do that.
2016-01-14 16:40:47 -05:00
Erik Rose
ed562645e0 Master master into letsencrypt-auto-release so Travis will build it. 2016-01-11 21:45:16 -05:00
Erik Rose
6c05197a43 Remove mock as an install requirement.
The motivation is to free us of a reliance on a rather modern version of setuptools, which caused le-auto failures for people on Wheezy and other older distros. (The alternative would have been to forcibly upgrade setuptools as the old le-auto did, but less is more.)

Mock is used only in tests, so we move it to tests_require. It will still be installed automatically when setup.py test is run. Give all packages a test_suite so this works.

The "testing" extra remains for optional packages not required for the nose tests but used in tox. However, the extra is much less useful now and is a candidate for deletion. We could roll the list of packages therein into the tox config so as not to favor any particular package.

Remove tests_require=install_requires, which I don't think does anything useful, since install requirements are implicitly installed when running setup.py test.

Fix tests to pass with mock removed. We had to stop them pulling down LE from PyPI, since the current version there (0.1.1) requires mock and explodes when `letsencrypt` is run.
2016-01-11 21:26:41 -05:00
Jakub Warmuz
86d6d27045 Clean up dev/testing extras messup (fixes #2140). 2016-01-10 18:37:41 +00:00
Peter Eckersley
bf4793039a Merge remote-tracking branch 'origin/master' into pyopenssl 2016-01-10 02:39:54 -08:00
Erik Rose
f2586fbc11 Merge master in so Travis will test this PR. 2016-01-08 17:08:30 -05:00
bmw
96b55c8f34 Revert "Don't use cryptography version 1.2" 2016-01-08 17:02:35 -05:00
Erik Rose
1d719bd89c Teach le-auto about dependencies that are conditional on the Python version. 2016-01-08 15:31:22 -05:00
Brad Warren
36679c2daa Merge branch 'master' into pyopenssl 2016-01-08 14:27:07 -05:00
Brad Warren
b039c884d8 Don't use cryptography version 1.2 2016-01-08 14:09:44 -05:00
Brad Warren
0f239e0029 Add comment about dependency version 2016-01-07 13:04:29 -05:00
Rémy HUBSCHER
6a026597f4 Move validator to compatibility-test — Refs #1997 2015-12-24 00:41:27 +01:00
Peter Eckersley
d348d4c051 Merge pull request #1914 from Natim/remove-InvalidPlatformWarning
Guarantee a true SSLContext object with Python 2
2015-12-22 18:18:30 -08:00
Rémy HUBSCHER
212f04fd92 @kuba review 2015-12-20 16:03:12 +01:00