Commit graph

392 commits

Author SHA1 Message Date
Brad Warren
0c6d83dc39
Merge pull request #6786 from certbot/pin-deps_continued
This continues from the work of @sydneyli in PR #6671
I didn't do much here. Basically added support for reading data from sys.stdin to both tools/merge_requirements.py and tools/strip_hashes.py as well as support for reading files from paths passed as cli parameters to strip_hashes.py.

Reading the filepaths was not strictly required, but I thought would be a good thing to do in order to keep the tooling usage options consistent.

Fixes #6581

* Generate constraints file to pin deps in Docker images

Dockerfiles pin versions using constraints file

Pulling out strip_hashes and add --no-deps flag

* Add stdin option for merge_requirements

Add stdin and file path support to strip_hashes

* Address review comments
2019-03-04 09:02:53 -08:00
Joona Hoikkala
d8a3fa3904
Address review comments 2019-03-04 15:52:38 +02:00
Adrien Ferrand
841f8efd0a [Unix] Create a framework for certbot integration tests: PART 1 (#6578)
* First part

* Several optimizations about the docker env setup

* Documentation

* Various corrections and documentation. Add acme and certbot explicitly as dependencies of certbot-ci.

* Correct a variable misinterpreted as a pytest hook

* Correct strict parsing option on pebble

* Refactor acme setup to be executed from pytest hooks.

* Pass TRAVIS env variable to trigger specific xdist logic

* Retrigger build.

* Work in progress

* Config operational

* Propagate to xdist

* Corrections on acme and misc

* Correct subnet for pebble

* Remove gobetween, as tls-sni challenges are not tested anymore.

* Improve pebble setup. Reduce LOC.

* Update acme.py

* Optimize acme ca setup, with less temporary assets

* Silent setup

* Clean code

* Remove unused workspace

* Use default network driver

* Remove bridge

* Update package documentation

* Remove rerun capability for integration tests, not needed.

* Add documentation

* Variable for all ports and subnets used by the stack

* Update certbot-ci/certbot_integration_tests/conftest.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update certbot-ci/certbot_integration_tests/utils/acme.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update certbot-ci/certbot_integration_tests/utils/misc.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update tox.ini

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update certbot-ci/certbot_integration_tests/utils/misc.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update certbot-ci/certbot_integration_tests/utils/acme.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update certbot-ci/certbot_integration_tests/utils/acme.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Update certbot-ci/certbot_integration_tests/conftest.py

Co-Authored-By: adferrand <adferrand@users.noreply.github.com>

* Rename to acme_server

* Add comment

* Refactor in a unique context fixture

* Remove the need of CERTBOT_ACME_XDIST environment variable

* Remove nonstrict/strict options in pebble

* Clean dependencies

* Clean tox

* Change function name

* Add comment about coveragerc specificities

* Change a comment.

* Update setup.py

* Update conftest.py

* Use the production-ready docker-compose.yml file for Pebble

* New style class

* Tune pebble to have a stable test environment

* Pin a dependency
2019-03-01 13:18:06 -08:00
Adrien Ferrand
5e849e03f6
[Windows] Fix pipstrap (#6775)
* Fix pipstrap on windows

* Pipstrap pin setuptools version, so explicit install it is not needed anymore.

* Rebuild letsencrypt-auto source

* Use sys.executable in pipstrap to allow straightforward execution in a venv by choosing the python interpreter from this venv.

* Update letsencrypt-auto

* Simulate test-everything

* Revert "Simulate test-everything"

This reverts commit b62c4d719a.

* Clean pipstrap code
2019-02-28 20:35:58 +01:00
Adrien Ferrand
eb5c4eca87 [Windows] Working unit tests for certbot-nginx (#6782)
This PR fixes certbot-nginx and relevant tests to make them succeed on Windows.

Next step will be to enable integration tests through certbot-ci in a future PR.

* Fix tests and incompabilities in certbot-nginx for Windows

* Fix lint, fix oldest local dependencies
2019-02-20 16:20:16 -08:00
Joona Hoikkala
8bda10541a
Add stdin option for merge_requirements
Add stdin and file path support to strip_hashes
2019-02-20 21:34:05 +02:00
sydneyli
7c731599a0
Generate constraints file to pin deps in Docker images
Dockerfiles pin versions using constraints file

Pulling out strip_hashes and add --no-deps flag
2019-02-20 16:59:55 +02:00
Brad Warren
0484b1554d
Set --pyargs directly in the files where it is needed. (#6727)
It was pointed out to me that you can no longer run tox.cover.py directly to run coverage tests on a subset of the packages in this repo.

This happened after we did both of:

1. Factored out --pyargs from the different test files and put it in pytest.ini.
2. Moved the options we added to pytest.ini to tox.ini meaning that --pyargs is not set unless you run the file through tox.

I think the fact that we factored out --pyargs from the files that needed it was a mistake. --pytest is needed by tox.cover.py and install_and_test.py in order to work correctly.

I think CLI options like this which are needed for the file to function should be left in the file directly. Doing anything else in my opinion unnecessarily couples these scripts to other files making them more brittle and harder to maintain.

With that said, I also think CLI options which are not needed (such as --numprocesses) can be left to be optionally added through PYTEST_ADDOPTS.

* Add --pyargs to tox.cover.py.

* Add --pyargs to install_and_test.py.

* Remove --pyargs from tox.ini.
2019-01-31 12:57:49 -08:00
ohemorange
658b7b9d47 Add VIRTUALENV_NO_DOWNLOAD=1 to all calls to virtualenv (#6690)
This will immediately address the breakage reported in #6682 and tracked at #6685. Virtualenv downloads the latest pip, which causes issues, so tell virtualenv to not download the latest pip.

I added the flag preemptively to other files as well, they're in separate commits so it will be easy to revert any spots we don't want.

I've confirmed that this fixes the issue on a machine that fails with the version of certbot-auto currently in master: recent version of virtualenv, python 2.7.

* Update changelog

* Use an environment variable instead of a flag for compatibility with old versions

* Run build.py
2019-01-24 10:03:52 -08:00
Adrien Ferrand
0f1d78e897 Do not ignore editable distributions already installed. (#6675)
This PR fix tests when run with unpinned dependencies. Option --ignore-installed is removed from pip command, allowing to use local dev modules (like acme) that are not still released.

Be warned that these tests will mostly work correctly if the relevant virtualenv in .tox does not exist yet. Otherwise, already installed distribution, potentially not up-to-date, will be reused without update from pip if they match the minimal requirements in relevant projects. This is unlikely to be an issue on CI systems, that will start from a fresh system.

We may build a dedicated tox environment for unpinned dependencies tests purpose, and ensure consistency of these tests on all situations.

Fixes #6674
2019-01-18 09:47:43 -08:00
Adrien Ferrand
bb1242c047 Process isolated local oldest requirements for DNS plugins (#6653)
* Include local-oldest-requirements in the constraints when oldest is invoked

* Add oldest constraints for lexicon

* Skip editable requirements during merge

* Pin to lexicon 2.2.1 for oldest requirements. Override locally oldest if needed for specific providers.
2019-01-17 15:21:13 -08:00
Adrien Ferrand
835f4b9271 Allow to execute a tox target without pinned dependencies (#6590)
This PR passes the CERTBOT_NO_PIN environment variable to the unit tests tox envs. By setting CERTBOT_NO_PIN to 1 before executing a given tox env, certbot dependencies will be installed at their latest version instead of the usual pinned version.

I also moved the unpin logic one layer below to allow it to be used potentially more widely, and avoid unnecessary merging constraints operation in this case.

As warnings are errors now, latest versions of Python will break now the tests, because collections launch a warning when some classes are imported from collections instead of collections.abc. Certbot code is patched, and warning is ignored for now, because a lot of third party libraries still depend on this behavior.

* Allow to execute a tox target without pinned dependencies

* Correct lint

* Retrigger build.

* Remove debug code

* Added test against unpinned dependencies from test-everything-unpinned-dependencies branch

* Remove duplicated assertion to pass TRAVIS and APPVEYOR in default tox environment.
2019-01-17 13:02:35 -08:00
Adrien Ferrand
651de2dd2f Update Certbot dependency to Lexicon to 3.x (#6593)
This PR updates Lexicon dependency to the latest version available, 3.0.6, for every lexicon-based DNS plugins. It updates also the provider construction to use the new ConfigResolverobject, and to remove the legacy configuration process.
2019-01-10 11:36:15 -08:00
Adrien Ferrand
b52cbc0fb7 Reduce build log verbosity on Travis (#6597)
PR #6568 removed the --quiet option in pip invocations, because this option deletes a lot of extremely useful logs when something goes wrong. However, when everything goes right, or at least when pip install is correctly executed, theses logs add hundreds of lines that are only noise, making hard to debug errors that can be in only one or two lines.

We can have best of both worlds. Travis allows to fold large blocks of logs, that can be expanded directly from the UI if needed. It only requires to print in the console some specific code, that this PR implements in the pip_install.py script when the build is run in Travis (known by the existence of TRAVIS environment variable).

I also take the occasion to clean up a little tox.ini.

Note that AppVeyor does not have this fold capability, but it can be emulated using a proper capture of stdout/stderr delivered only when an error is detected.

* Fold pip install log on travis

* Global test env

* Export env variable
2019-01-08 20:45:16 -08:00
Adrien Ferrand
5130e9ba1e Correct the oldest requirements environment (#6569)
I observed that the current set of oldest requirements do not correspond to any environment, except the specific Xenial image in Travis CI (and standard Xenial containers will also fail).

It is because the requirements make cryptography and requests fail against standard libraries available in the typical Linux distributions that are targeted by the oldest requirements approach (Centos 6, Centos 7, Xenial, Jessie).

This PR fixes that, by aligning the minimal version requirements of cryptography and requests to the maximal versions that are available on Centos 6. Centos 7, Jessie and Xenial stay unusable with oldest requirements for other reasons, but at least one old and supported Linux distribution is able to run the tests with oldest requirements out of the box.

A test is also corrected to match the expected error message that old versions of urllib3 will raise.
2019-01-08 19:44:25 -08:00
Adrien Ferrand
efaaf48f90 [Windows|Unix] Use double quote compatible both for windows and linux (#6553)
File _venv_common.py uses single quotes to ask pip to install setuptools>=30.3. Using single quotes to enclose a string is not supported on Windows shell (Batch). This PR replaces theses single quotes by double quotes supported both on Windows and Linux.
2019-01-07 12:00:01 -08:00
ohemorange
1cdcc15e64 Pin all dependency installation in the release script (#6584) (#6602)
Fixes #6584.

* Pin all dependency installation in the release script

* also use pip_install.py to install pytest
2019-01-02 10:08:08 -08:00
Brad Warren
353d092585
Remove -q/--quiet from pip invocations. (#6568)
While reducing noise in test output is valuable, this flag has made a couple aspects of Certbot's development difficult:

1. We test with different sets of dependencies and running pip in quiet mode removes all output about the packages being installed which has made reviewing changes to these tests more difficult.
2. When pip fails, it provides significantly less output about the failure in quiet mode than it does normally. The output is reduced so much that in the two times I've hit this issue in the last month, I was only able to see that installing package X failed rather than what the cause of that failure was which could be seen with `--quiet` removed.

Also, since running pip without `--quiet` is the tox default, I expect Python developers to be familiar with what they see here.
2018-12-06 16:02:16 -08:00
sydneyli
f5aad1440f Conditionally depend on imgconverter for newer versions of Sphinx (#6536)
Fixes #6343.

* conditionally depend on imgconverter

* Pin docutils dependency for old Sphinx bug
2018-12-04 10:56:15 -08:00
ohemorange
daa77b5023 During the release, reset local-oldest-requirements.txts that might have been changed during development. (#6547)
* During the release, reset local-oldest-requirements.txts that might have been changed during development.

* only modify the file if it exists

* no need to specifically add certbot-compatibility-test because it doesn't have the file anyway

* Use double quotes instead of single

* escape dots and brackets

* Escape and quote correctly
2018-12-03 16:42:52 -08:00
Brad Warren
37d4b983c8
Don't use pytest.ini during the release. (#6550)
Currently the release script in master fails for a few reasons. First, it's trying to use --numprocesses which comes from a pytest plugin that we're not installing in the release script. Second, many new warnings are raised when we're not using pinned versions of our dependencies.

I'm not sure I agree, but one could argue that we should fix these issues and use the file during the release. I'm particularly hesitant for us to do this when it comes to warnings. We currently do not pin our dependencies in the release script. Do we really want to stop the release because a new package was released and is warning about something? One could argue we do because these warnings may be visible to the user, but they very rarely are and I think this makes the release process much too painful.

I especially do not think we should block the release on this now as we are not up to date on the warnings raised by the latest versions of our packages so there is a lot to work through.

* Don't use pytest.ini during the release.

* State that pytest.ini isn't used in release script.
2018-11-30 17:40:55 -08:00
Erica Portnoy
3e155d443d Merge branch 'master' into warnings-are-errors 2018-11-27 17:18:55 -08:00
ohemorange
f65cb070b3
Automation for changelog changes during release (#6489)
* Automation for changelog changes during release

* Update changelog during release before modifying version numbers

* don't link to the GitHub repo

* no need to sign the commit bumping version numbers

* simplify tail call
2018-11-26 17:48:59 -05:00
Erica Portnoy
fe840d5d46 Merge branch 'master' into warnings-are-errors 2018-11-22 03:03:43 +00:00
ohemorange
ca42945264
Fix test_sdists test farm test (#6524)
* Switch to using _venv_common.py in test_sdists.sh

* Upgrade setuptools in _venv_common.py

* Upgrade setuptools before running pip_install
2018-11-20 18:39:12 -05:00
Adrien Ferrand
1dd7db12e0 Workaround for old pip versions that are not exposed as importable modules. (#6500)
Fallback to pipstrap 1.5.0. Manipulate PATH variable on higher level to activate the virtual environment before calling pipstrap.
2018-11-19 15:38:37 -08:00
Brad Warren
4e1c22779e
Fix up environment variable use in venv creation scripts (#6518)
This PR has the value of VENV_NAME override any value set in the tools/venv* scripts.

I also removed the use of VENV_ARGS. This was used in _venv_common.sh as a means of passing arguments for virtualenv between the scripts, however, there is no other use of the variable in this repository and passing the arguments through a function call is much more natural in Python.

* Respect VENV_NAME in tools/venv*.

* Stop using VENV_ARGS

* Remove VENV_NAME_ENV_VAR and add docstrings.
2018-11-19 11:47:14 -08:00
Erica Portnoy
5700af594b Merge branch 'master' into warnings-are-errors 2018-11-17 02:29:20 +00:00
Adrien Ferrand
5073090a20 Update tools/venv3.py to support py launcher on Windows (#6493)
Following some inconsistencies occurred during by developments, and in the light of #6508, it decided to wrote a PR that will take fully advantage of the conversion from bash to python to the development setup tools.

This PR adresses several issues when trying to use the development setup tools (`tools/venv.py` and `tools/venv3.py`:
* on Windows, `python` executable is not always in PATH (default behavior)
* even if the option is checked, the `python` executable is not associated to the usually symlink `python3` on Windows
* on Windows again, really powerful introspection of the available Python environments can be done with `py`, the Windows Python launcher
* in general for all systems, `tools/venv.py` and `tools/venv3.py` ensures that the respective Python major version will be used to setup the virtual environment if available.
* finally, the best and first candidate to test should be the Python executable used to launch the `tools/venv*.py` script. It was not relevant before because it was shell scripts, but do it is.

The logic is shared in `_venv_common.py`, and will be called appropriately for both scripts. In priority decreasing order, python executable will be search and tested:
* from the current Python executable, as exposed by `sys.executable`
* from any python or pythonX (X as a python version like 2, 3 or 2.7 or 3.4) executable available in PATH
* from the Windows Python launched `py` if available

Individual changes were:

* Update tools/venv3.py to support py launcher on Windows

* Fix typo in help message

* More explicit calls with space protection

* Complete refactoring to take advantage of the python runtime, and control of the compatible version to use.
2018-11-15 15:17:36 -08:00
Adrien Ferrand
b3d2ac5161 Fail-fast in test/cover/lint scripts (#6487)
After #6485 and #6435, it appears that there is no good reason to not fail fast when test, cover or linting scripts are executed.

This PR ensures to fail fast by invoking commands throught subprocess.check_call instead of subprocess.call, and by removing the handling of non-zero exit code at the end of theses scripts.

As now coverage on Windows is executed with thresholds, I added specific thresholds for this platform. Because some portions of code that are done for Unix platform will not be executed on Windows.

Note that coverage reports from Travis and AppVeyor are accumulated on Codecov. So if a file is covered up to 50 % on Linux, and all other parts are covered on Windows, then coverage is 100 % for Codecov.

Note: that PR also fixes the ability of coverage tests to fail if thresholds are exceeded.

* Use check_call to fail fast in all scripts related to tests/lint/coverage/deploy

* Make specific coverage threshold for windows
2018-11-14 13:57:40 -08:00
Adrien Ferrand
ad885afdb8 Correct venv3 detection on windows (#6490)
A little typo in the _venv_common.py block the script to finish correctly once the virtual environment has been setup on Windows.

This PR fixes that.
2018-11-09 16:17:17 -08:00
Adrien Ferrand
7352727a65 [URGENT] Fix the CI system (#6485)
It is about the exit codes that are returned from the various scripts in tools during tox execution.
Indeed, tox relies on the non-zero exit code from a given script to know that something failed during the execution.

Previously, theses scripts were in bash, and a bash script returns an exit code that is the higher code returned from any of the command executed by the script. So if any command return a non-zero (in particular pylint or pytest), then the script return also non-zero.

Now that these scripts are converted into python, pylint and pytest are executed via subprocess, that returns the exit code as variables. But if theses codes are not handled explicitly, the python script itself will return zero if no python exception occured. As a consequence currently, Certbot CI system is unable to detect any test error or lint error, because there is no exception in this case, only exit codes from the binaries executed.

This PR fixes that, by handling correctly the exit code from the most critical scripts, install_and_test.py and tox.cover.py, but also all the scripts that I converted into Python and that could be executed in the context of a shell (via tox or directly for instance).
2018-11-08 08:35:07 -08:00
Adrien Ferrand
3d0e16ece3 [Windows|Unix] Rewrite bash scripts for tests into python (#6435)
Certbot relies heavily on bash scripts to deploy a development environment and to execute tests. This is fine for Linux systems, including Travis, but problematic for Windows machines.

This PR converts all theses scripts into Python, to make them platform independant.

As a consequence, tox-win.ini is not needed anymore, and tox can be run indifferently on Windows or on Linux using a common tox.ini. AppVeyor is updated accordingly to execute tests for acme, certbot and all dns plugins. Other tests are not executed as they are for Docker, unsupported Apache/Nginx/Postfix plugins (for now) or not relevant for Windows (explicit Linux distribution tests or pylint).

Another PR will be done on certbot website to update how a dev environment can be set up.

* Replace several shell scripts by python equivalent.

* Correction on tox coverage

* Extend usage of new python scripts

* Various corrections

* Replace venv construction bash scripts by python equivalents

* Update tox.ini

* Unicode lines to compare files

* Put modifications on letsencrypt-auto-source instead of generated scripts

* Add executable permissions for Linux.

* Merge tox win tests into main tox

* Skip lock_test on Windows

* Correct appveyor config

* Update appveyor.yml

* Explicit coverage py27 or py37

* Avoid to cover non supported certbot plugins on Windows

* Update tox.ini

* Remove specific warnings during CI

* No cover on a debug code for tests only.

* Update documentation and help script on venv/venv3.py

* Customize help message for Windows

* Quote correctly executable path with potential spaces in it.

* Copy pipstrap from upstream
2018-11-07 17:16:16 -08:00
Adrien Ferrand
e6e323e3ff Update Lexicon to correct use of HTTP proxy on OVH provider (#6479)
This PR update requirement of Lexicon to 2.7.14 on OVH plugin, to allow HTTP proxy to be used correctly when underlying OVH provider is invoked.

* Update Lexicon to correct use of HTTP proxy on OVH provider

* Update dev_constraints.txt

* Update CHANGELOG.md
2018-11-07 07:49:13 -08:00
Erica Portnoy
6c8652a0a6 add comment explaining about boto* in oldest_constraints.txt 2018-11-05 17:30:26 -08:00
Erica Portnoy
c98bf18a77 Use older version of boto in oldest tests, because new versions can't handle old versions of requests 2018-11-02 16:00:32 -07:00
Erica Portnoy
0caaf872fb bring requests back down to 2.4.1 in setup and oldest constraints 2018-11-02 15:53:44 -07:00
Erica Portnoy
ac8d6f58bb Update requests version in oldest-constraints.txt 2018-11-02 15:30:42 -07:00
Erica Portnoy
64a61fa6d4 Use a newer version of botocore that doesn't vendor requests, which we need because newer versions of requests don't have the DeprecationWarning 2018-11-02 14:53:55 -07:00
Erica Portnoy
54b4758c27 Merge branch 'master' into warnings-are-errors 2018-10-30 17:18:00 -07:00
Adrien Ferrand
efd2ed1bdb Correct OVH integration tests on machines without internet access (#6380)
* Correct OVH integration tests on machines without internet.

* Update changelog
2018-09-18 17:35:28 -07:00
Brad Warren
251355cade Add better error handling around release signatures (#6353)
* Better error handling around sig after offline-sig

* Add error handling around first sig with git.

* Don't fail if offline-sig fails.
2018-09-11 15:44:26 -07:00
Brad Warren
e178bbfdf5 Release script improvements (#6337)
* Add error checking and automatic logging.

* Ignore release dir and logs

* Don't always require PGP card and fix script cmd.

* keep track of default GPG key

* Add PGP card sanity check after offline signature

* fix typo

* I'm tired of pressing y.

* Automate running tools/offline-sigrequest.sh.

* Update comment and make output more readable.
2018-09-05 14:10:05 -07:00
Brad Warren
d8057f0e17
Fix Sphinx (#6070)
Fixes #4686.

In Sphinx 1.6, they changed how they handle images in latex and PDF files. You can learn more about this by reading the linked issue (or I can answer any questions), but the shortish version is we now need to use the extension sphinx.ext.imgconverter. This is only available in Sphinx 1.6+.

I also updated our pinned versions to use the latest Sphinx and a new dependency it pulled in called sphinxcontrib-websupport. To build the latex and PDF docs, you must first run:

apt-get install imagemagick latexmk texlive texlive-latex-extra

Afterwards, if you create the normal Certbot dev environment using this branch, activate the virtual environment, and from the root of the repo run make -C docs clean latex latexpdf, you'll successfully build the PDF docs.

* fix #4686

* bump minimum Sphinx req
2018-08-06 09:45:56 -07:00
Yoan Blanc
6262921315 bump pytest-xdist to 1.22.5 (#6253)
Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
2018-07-31 10:31:36 -07:00
hal869
704101c75b update venv3.sh to include dns-rfc2136 plugin (#6226) 2018-07-16 10:20:53 -07:00
Brad Warren
7383fc6bf0 move values to pytest.ini 2018-07-11 17:25:48 -07:00
Nicolas Bachschmidt
a2222d5bdf OVH DNS Authenticator (#5423)
Implement an Authenticator which can fulfill a dns-01 challenge using the OVH DNS API. Applicable only for domains using OVH DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-ovh -d`, specifying a credentials file as a command line argument. Verified that a certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-ovh -d`, without specifying a credentials file as a command line argument. Verified that the user was prompted and that a certificate was successfully obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for a credentials file after selecting dnsimple interactively and that a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file with an invalid application key.
    * Path to credentials file with an invalid application secret.
    * Path to credentials file with an invalid consumer key.
    * Path to credentials file with missing properties.
    * Domain name not registered to OVH account.
2018-07-10 20:52:32 -07:00
chibiegg
3f6a908821 Gehirn Infrastracture Service DNS Authenticator (#5702)
Implement an Authenticator which can fulfill a dns-01 challenge using
the Gehirn DNS (Gehirn Infrastructure Service) API.
Applicable only for domains using Gehirn DNS for DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-gehirn -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Domain name not registered to Gehirn DNS account.
2018-07-10 17:36:20 -07:00
chibiegg
9314911135 Sakura Cloud DNS Authenticator (#5701)
Implement an Authenticator which can fulfill a dns-01 challenge using
the Sakura Cloud DNS API.
Applicable only for domains using Sakura Cloud for DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-sakuracloud -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Domain name not registered to Sakura Cloud account.
2018-07-10 14:30:37 -07:00
Trinopoty Biswas
3855cfc08d Linode DNS Authenticator (#5302)
* Added DNS based authenticator plugin for Linode

* Added linode plugin to docs

* Added Dockerfile

* Added .gitignore and readthedocs.org.requirements.txt

* Updated default_propagation_seconds

* Updated according to changes requested

* Bump version to 0.26.0

* Advertise our packages work on Python 3.7.
2018-07-10 13:51:03 -07:00
Brad Warren
cdf93de338
Full Python 3.7 support (#6182)
Now that yaml/pyyaml#126 is resolved, #6170 can be reverted by bumping the pinned version of PyYAML.

You can see this code passing with full macOS and integration tests at https://travis-ci.org/certbot/certbot/builds/400957729.

* Revert "Allow py37 testing (#6170)"

This reverts commit cad95466b0.

* Bump pyyaml pinning to work on Python 3.7.
2018-07-09 09:16:44 -07:00
Brad Warren
dd600db436
Upgrade pinned josepy version (#6184)
We released josepy 1.1.0 a while ago to work around newer versions of cryptography deprecating some of the functionality we were using. We haven't yet upgraded our pinned josepy version though and since #6169 has landed, we're now seeing these deprecation warnings in our tests. This would be shown to certbot-auto users as well.

This PR removes these warnings by upgrading our pinned version of josepy.

* update pinned josepy version

* build leauto

* update pinned dev version of josepy
2018-07-09 09:16:08 -07:00
Brad Warren
cb076539ec
Remove .dev0 from version numbers during releases. (#6116)
This allows us to depend on packages like acme>=0.26.0.dev0 during development
and automatically change it to acme>=0.26.0 during the release. We use `git add
-p` to be safe, but if .dev0 is used at all in our released setup.py files,
we're probably doing something wrong.
2018-07-05 08:26:42 -07:00
Brad Warren
1e1e7d8e97 Improve UA default in docs (#6120)
* Use less informative UA values in docs.

* set CERTBOT_DOCS during release
2018-06-21 15:40:42 -07:00
sydneyli
40c50231ed Merge branch 'master' into squashed-postfix 2018-06-15 16:21:15 -07:00
Brad Warren
5025b4ea96 Add certbot-postfix to tools
pep8ify

Delint

cover++

test more_info()

Refactor get_config_var

Don't duplicate changes to Postfix config

document instance variables

Always clear save_notes on save

Test deploy_cert and save and add MockPostfix.

Move mock and call to InstallerTest

Add getters and setters

Use postfix getters and setters

protect get_config_var

bump cover to 100%

bump required coverage to 100

s/config_dir/config_utility

Decrease minimum version to Postfix 2.6.

This is the minimum version that allows us to set ciphers to be used with
opportunistic TLS and is the oldest version packaged in any major distro.

Use tls_security_level instead of use_tls.

smtpd_tls_security_level should be used instead according to Postfix documentation.

Test smtpd_tls_security_level conditional

make dunder method an under method

refactor postconf usage

add check_all_output

test check_all_output

Add and test verify_exe_exists

Add PostfixUtilBase

Add ReadOnlyMainMap

Use _get_output instead of _call

Fix split strip typo
2018-06-15 15:46:48 -07:00
Brad Warren
3a8de6d172
Upgrade pinned twine version. (#6078)
For the past couple of releases, twine has errored while trying to upload
packages and this is fixed by upgrading to a newer version of twine. This
commit updates our pinned version installed when using tools/venv.sh to the
latest available version. pkginfo had to be upgraded as well to support the
latest version of twine.
2018-06-07 07:50:36 -07:00
Brad Warren
780a1b3a26 Don't require festival during signing. (#6079)
Festival isn't available via Homebrew and is only needed to read the hash
aloud, so let's not make it a strict requirement that it's installed. You can
simply read the hash from the terminal instead.
2018-06-07 11:43:45 +03:00
Dmitry Figol
36dfd06503 Prepare certbot module for mypy check untyped defs (#6005)
* Prepare certbot module for mypy check untyped defs

* Fix #5952

* Bump mypy to version 0.600 and fix associated bugs

* Fix pylint bugs after introducing mypy

* Implement Brad's suggestions

* Reenabling pylint and adding nginx mypy back
2018-05-18 06:28:17 -07:00
Brad Warren
250c0d6691
cd before running tests (#6017)
When importing a module, Python first searches the current directory. See
https://docs.python.org/3/tutorial/modules.html#the-module-search-path. This
means that running something like `import certbot` from the root of the Certbot
repo will use the local Certbot files regardless of the version installed on
the system or virtual environment.

Normally this behavior is fine because the local files are what we want to
test, however, during our "oldest" tests, we test against older versions of our
packages to make sure we're keeping compatibility. To make sure our tests use
the correct versions, this commit has our tests cd to an empty temporary
directory before running tests.

We also had to change the package names given to pytest to be the names used in
Python to import the package rather than the name of the files locally to
accommodate this.
2018-05-18 06:05:26 -07:00
Brad Warren
261d063b10
Revert fix-macos-pytest (#5853)
* Revert "Fix pytest on macOS in Travis (#5360)"

This reverts commit 5388842e5b.

* remove oldest passenv
2018-04-18 10:02:31 -07:00
ohemorange
2d31598484 Get mypy tox env running in the current setup (#5861)
* get mypy tox env running in the current setup

* use any python3 with mypy

* pin mypy dependencies
2018-04-12 15:47:39 -07:00
sydneyli
8231b1a19c Pin Lexicon version to 2.2.1 (#5803) 2018-03-29 17:09:21 -07:00
Delan Azabani
8e9a4447ff make pip_install.sh compatible with POSIX sh(1) again (#5622) 2018-03-22 12:24:53 -07:00
cclauss
e405aaa4c1 Fix print() and xrange() for Python 3 (#5590) 2018-03-14 09:37:29 -07:00
Brad Warren
d310ad18c7
Put API link at the bottom of DNS plugin docs (#5699)
* Put link to API at the bottom for future docs.

* Put API link at the bottom of existing docs.
2018-03-12 17:10:23 -07:00
Brad Warren
cc344bfd1e
Break lockstep between our packages (#5655)
Fixes #5490.

There's a lot of possibilities discussed in #5490, but I'll try and explain what I actually did here as succinctly as I can. Unfortunately, there's a fair bit to explain. My goal was to break lockstep and give us tests to ensure the minimum specified versions are correct without taking the time now to refactor our whole test setup.

To handle specifying each package's minimum acme/certbot version, I added a requirements file to each package. This won't actually be included in the shipped package (because it's not in the MANIFEST).

After creating these files and modifying tools/pip_install.sh to use them, I created a separate tox env for most packages (I kept the DNS plugins together for convenience). The reason this is necessary is because we currently use a single environment for each plugin, but if we used this approach for these tests we'd hit issues due to different installed plugins requiring different versions of acme/certbot. There's a lot more discussion about this in #5490 if you're interested in this piece. I unfortunately wasted a lot of time trying to remove the boilerplate this approach causes in tox.ini, but to do this I think we need negations described at complex factor conditions which hasn't made it into a tox release yet.

The biggest missing piece here is how to make sure the oldest versions that are currently pinned to master get updated. Currently, they'll stay pinned that way without manual intervention and won't be properly testing the oldest version. I think we should solve this during the larger test/repo refactoring after the release because the tests are using the correct values now and I don't see a simple way around the problem.

Once this lands, I'm planning on updating the test-everything tests to do integration tests with the "oldest" versions here.

* break lockstep between packages

* Use per package requirements files

* add local oldest requirements files

* update tox.ini

* work with dev0 versions

* Install requirements in separate step.

* don't error when we don't have requirements

* install latest packages in editable mode

* Update .travis.yml

* Add reminder comments

* move dev to requirements

* request acme[dev]

* Update pip_install documentation
2018-03-05 09:50:19 -08:00
Hugo
42638afc75 Drop support for EOL Python 2.6 and 3.3
* Drop support for EOL Python 2.6

* Use more helpful assertIn/NotIn instead of assertTrue/False

* Drop support for EOL Python 3.3

* Remove redundant Python 3.3 code

* Restore code for RHEL 6 and virtualenv for Py2.7

* Revert pipstrap.py to upstream

* Merge py26_packages and non_py26_packages into all_packages

* Revert changes to *-auto in root

* Update by calling letsencrypt-auto-source/build.py

* Revert permissions for pipstrap.py
2018-02-16 16:14:01 -08:00
Brad Warren
39472f88de
reduce ipdb version (#5408) 2018-01-10 13:26:31 -08:00
Brad Warren
e02adec26b Have letsencrypt-auto do a real upgrade in leauto-upgrades option 2 (#5390)
* Make leauto_upgrades do a real upgrade

* Cleanup vars and output

* Sleep until the server is ready

* add simple_http_server.py

* Use a randomly assigned port

* s/realpath/readlink

* wait for server before getting port

* s/localhost/all interfaces
2018-01-08 17:38:03 -08:00
Brad Warren
5388842e5b Fix pytest on macOS in Travis (#5360)
* Add tools/pytest.sh

* pass TRAVIS through in tox.ini

* Use tools/pytest.sh to run pytest

* Add quiet to pytest.ini

* ignore pytest cache
2018-01-03 17:49:22 -08:00
Brad Warren
a1aea021e7 Pin dependencies in oldest tests (#5316)
* Add tools/merge_requirements.py

* Revert "Fix oldest tests by pinning Google DNS deps (#5000)"

This reverts commit f68fba2be2.

* Add tools/oldest_constraints.txt

* Remove oldest constraints from tox.ini

* Rename dev constraints file

* Update tools/pip_install.sh

* Update install_and_test.sh

* Fix pip_install.sh

* Don't cat when you can cp

* Add ng-httpsclient to dev constraints for oldest tests

* Bump tested setuptools version

* Update dev_constraints comment

* Better document oldest dependencies

* test against oldest versions we say we require

* Update dev constraints

* Properly handle empty lines

* Update constraints gen in pip_install

* Remove duplicated zope.component

* Reduce pyasn1-modules dependency

* Remove blank line

* pin back google-api-python-client

* pin back uritemplate

* pin josepy for oldest tests

* Undo changes to install_and_test.sh

* Update install_and_test.sh description

* use split instead of partition
2017-12-18 12:31:36 -08:00
Jannis Leidel
2abc94661a Use josepy instead of acme.jose. (#5203) 2017-12-11 11:25:09 -08:00
Jacob Hoffman-Andrews
7319cc975a
Quiet pip install output. (#5288)
pip install generates a lot of lines of output that make it harder to see what
tox is running in general. This adds the -q flag to pip install.

At the same time, add `set -x` in install_and_test.sh and pip_install.sh so they
echo the commands they are running. This makes it a little clearer what's going
on in tests.

I didn't put `set -x` at the top or in the shebang, because moving it lower lets
us avoid echoing some of the messy if/then setup statements in these scripts,
which focussed attention on the pip install command.
2017-12-01 23:40:09 -08:00
Brad Warren
394dafd38c Revert requiring dnsmadeeasy extras for lexicon (#5291)
Fixes failures at https://travis-ci.org/certbot/certbot/jobs/310248574#L1558.

Additional context can be found at #5230 and 604584521a (diff-2eeaed663bd0d25b7e608891384b7298).
2017-12-01 17:00:24 -08:00
Brad Warren
48173ed1cb
Switch from nose to pytest (#5282)
* Use pipstrap to install a good version of pip

* Use pytest in cb-auto tests

* Remove nose usage in auto_test.py

* remove nose dev dep

* use pytest in test_tests

* Use pytest in tox

* Update dev dependency pinnings

* remove nose multiprocess lines

* Use pytest for coverage

* Use older py and pytest for old python versions

* Add test for Error.__str__

* pin pytest in oldest test

* Fix tests for DNS-DO plugin on py26

* Work around bug for Python 3.3

* Clarify dockerfile comments
2017-12-01 10:59:55 -08:00
Brad Warren
686fa36b3b Install dnsmadeeasy extras from dns-lexicon (#5230)
* Add tools/pip_constraints.txt to pin all Python dependencies

* Use tools/pip_constraints.txt in tools/pip_install.sh

* Install dnsmadeeasy extras in dnsmadeeasy plugin
2017-11-08 10:58:00 -08:00
Brad Warren
884fc56a3e
Use pipstrap to ensure pip works on older systems (#5216)
* Use pipstrap in tools/_venv_common.sh

* Use _venv_common.sh in test_sdists
2017-11-03 10:59:56 -07:00
Matt Dainty
811d436d5a RFC 2136 DNS Authenticator (#4701)
Introduce a plugin that automates the process of completing a dns-01 challenge by creating, and subsequently removing, TXT records using RFC 2136 Dynamic Updates (a.k.a. nsupdate).

This plugin has been tested with BIND, but may work with other RFC 2136-compatible DNS servers, such as PowerDNS.
2017-06-16 16:53:46 -07:00
Zach Shepherd
3f86e13acc LuaDNS DNS Authenticator (#4605)
Implement an Authenticator which can fulfill a dns-01 challenge using
the LuaDNS API. Applicable only for domains using LuaDNS for DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-luadns -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file without an email.
    * Path to credentials file with an invalid email.
    * Path to credentials file without a token.
    * Path to credentials file with an invalid token.
    * Domain name not registered to LuaDNS account.
2017-06-16 14:43:12 -07:00
Zach Shepherd
87f6e18ac4 Add certbot-dns-dnsmadeeasy to release script (#4844) 2017-06-16 10:35:52 -07:00
Zach Shepherd
0a269f31d0 DNS Made Easy DNS Authenticator (#4603)
Implement an Authenticator which can fulfill a dns-01 challenge using
the DNS Made Easy API. Applicable only for domains using DNS Made Easy.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
   (`http://api.sandbox.dnsmadeeasy.com/V2.0` used as the
    `api_endpoint` for all manual testing)
    * Used `certbot certonly --dns-dnsmadeeasy -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file with an invalid API key.
    * Path to credentials file with a malformed API key.
    * Path to credentials file with an invalid Secret key.
    * Path to credentials file with a malformed Secret key.
    * Domain name not registered to DNS Made Easy account.
2017-06-15 16:41:00 -07:00
Brad Warren
650611bd1f Fix oldest tests (#4782)
* Add pip_install_editable.sh

* add install_and_test.sh

* simplify tox.ini and fix oldest tests

* Put paths & packages on their own line in tox.ini
2017-06-08 12:22:46 -07:00
Zach Shepherd
e749937465 route53: rename to match other DNS plugins (#4747)
This change renames certbot-route53 to certbot-dns-route53 and updates
the package's setup.py file to maintain backwards compatibility.

Testing Done:
 * Run `certbot` with `-a certbot-route53:auth`, verify the plugin runs.
 * Run `certbot` with `--dns-route53`, verify the plugin runs.
2017-06-06 15:41:04 -07:00
Zach Shepherd
4448a86013 Handle releasing of DNS subpackages not yet included in certbot-auto (#4779)
Add the DNS subpackages being considered for future inclusion in
certbot-auto as non-certbot-auto packages for the 0.15.0 release.
2017-06-05 17:59:56 -07:00
Brad Warren
962879c35c Remove dependency on git from pip_install.sh. (#4770)
* Remove dependency on git from pip_install.sh.

Using git allowed this file to continue to work even if it was moved to another
directory. This slight increase in robustness wasn't worth it though as it
broke our development Dockerfile (see #4703), the certbot website's Dockerfile
(see certbot/website#226), and our test farm tests (see
certbot/tests/letstest/scripts/test_apache2.sh for an example that calls
tools/venv.sh without installing git). Rather than continuing to find and patch
these things, let's just allow this script to fail if it's moved rather than
propagating the git dependency all over the place.

* Add readlink.py.

This is the equivalent of `readlink -f` on many Linux systems. This is useful
as there are often differences in readlink on different platforms.

* Use readlink.py in pip_install.sh.

This allows us to work around differences in readlink on macOS.
2017-06-05 17:51:45 -07:00
Zach Shepherd
c9ff9e3c7a route53: add unit tests (#4725)
This change introduces unit tests to cover all lines of the route53
plugin except for the timeout in `_wait_for_change`.
2017-05-31 15:25:24 -07:00
Zach Shepherd
40e8fc4dec Handle releasing subpackages not included in certbot-auto (#4758)
This change refactors the release script to handle subpackages which are
not bundled as a part of cerbot-auto.

The script now allows developers to define subpackages as either being
included in certbot-auto, or not.

The script then uses one of three sets of subpackages for each operation:
 * The version number is updated for all non-certbot subpackages
   (and certbot itself is handled separately)
 * sdists and wheels are created for all non-certbot subpackages
   (and certbot itself is handled separately)
 * Testing is performed for all subpackages
 * Hashes are pinned for certbot-auto subpackages (including certbot)
2017-05-31 15:05:55 -07:00
Zach Shepherd
c827c9ec5f NS1 DNS Authenticator (#4602)
Implement an Authenticator which can fulfill a dns-01 challenge using
the NS1 DNS API. Applicable only for domains using NS1 DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-nsone -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-nsone -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting dnsimple interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file with an invalid token.
    * Path to credentials file without a token.
    * Domain name not registered to NS1 account.
2017-05-26 11:24:38 -07:00
Zach Shepherd
fb02877268 DNSimple DNS Authenticator (#4587)
Implement an Authenticator which can fulfill a dns-01 challenge using
the DNSimple DNS API. Applicable only for domains using DNSimple DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-dnsimple -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-dnsimple -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting dnsimple interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Path to credentials file with an invalid token.
    * Path to credentials file without a token.
    * Domain name not registered to DNSimple account.
2017-05-22 17:06:04 -07:00
Zach Shepherd
49c41da4f1 CloudXNS DNS Authenticator (#4585)
Implement an Authenticator which can fulfill a dns-01 challenge using
the CloudXNS DNS API. Applicable only for domains using CloudXNS DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-cloudxns -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-cloudxns -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting cloudxns interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Domain name not registered to CloudXNS account.
2017-05-19 16:23:53 -07:00
Jacob Hoffman-Andrews
10bac107ee Add an account deactivate utility script. (#4254)
* Add an account deactivate utility script.

This is handy if you created an account with a tool other than Certbot, and want
to deactivate the account.

* Move deactivate.py to tools.

* Add test for ConflictError.

* Fix lint error.

* Document how to set server.
2017-05-17 14:24:59 -07:00
Zach Shepherd
4caff11371 Google Cloud DNS Authenticator (#4581)
Implement an Authenticator which can fulfill a dns-01 challenge using
the Google Cloud DNS API. Applicable only for domains using Google Cloud
DNS for DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-google -d`, specifying a credentials
      file as a command line argument. Verified that a certificate was
      successfully obtained without user interaction.
    * Used `certbot certonly --dns-google -d`, without specifying a
      credentials file as a command line argument. Verified that the
      user was prompted and that a certificate was successfully
      obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting google interactively and that
      a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Domain name not registered to Google Cloud Platform account.
2017-05-17 11:26:26 -07:00
Brad Warren
e4f65074d1 Merge pull request #4642 from certbot/new-pkg-release-prep
Make it easier to add new packages to the release script
2017-05-16 15:42:23 -07:00
Zach Shepherd
9e206f8024 DigitalOcean DNS Authenticator
Implement an Authenticator which can fulfill a dns-01 challenge using the
DigitalOcean API. Applicable only for domains using DigitalOcean for DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-digitalocean -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-digitalocean -d`, without specifying a
      credentials file as a command line argument. Verified that the user
      was prompted and that a certificate was successfully obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting digitalocean interactively and
      that a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Credentials file missing token.
    * Credentials file with blank token.
    * Credentials file with incorrect token.
    * Domain name not registered to DigitalOcean account.
2017-05-11 17:26:02 -07:00
Brad Warren
74c7ffe25e Make it easier to add new packages to the release script 2017-05-11 12:17:01 -07:00
Brad Warren
be7e99a461 Pin dependency versions when using tools/venv.sh (#4629)
* Revert "Pin python-augeas version to avoid error with 1.0.0 (#4422)"

This reverts commit 1c51ae2588.

* make dependency-requirements

* separate certbot and dependency requirements

* fix build.py

* update hashin comment

* simplify release pinning

* separate letsencrypt dependency

* pin hashes in venv

* error out when bad things happen

* use pinned dependencies in tox

* Revert "pin hashes in venv"

This reverts commit 1cd38a9e50.

* use pip_install.sh in venv_common

* quote pip install args

* bump mock version
2017-05-11 10:06:05 -07:00
Zach Shepherd
7955274126 Script to create docs directory for new packages. 2017-05-10 15:26:51 -07:00
Zach Shepherd
db6defe614 Cloudflare DNS Authenticator
Implement an Authenticator which can fulfill a dns-01 challenge using the
Cloudflare API. Applicable only for domains using Cloudflare for DNS.

Testing Done:
 * `tox -e py27`
 * `tox -e lint`
 * Manual testing:
    * Used `certbot certonly --dns-cloudflare -d`, specifying a
      credentials file as a command line argument. Verified that a
      certificate was successfully obtained without user interaction.
    * Used `certbot certonly --dns-cloudflare -d`, without specifying a
      credentials file as a command line argument. Verified that the user
      was prompted and that a certificate was successfully obtained.
    * Used `certbot certonly -d`. Verified that the user was prompted for
      a credentials file after selecting cloudflare interactively and
      that a certificate was successfully obtained.
    * Used `certbot renew --force-renewal`. Verified that certificates
      were renewed without user interaction.
 * Negative testing:
    * Path to non-existent credentials file.
    * Credentials file with unsafe permissions (644).
    * Credentials file missing e-mail address.
    * Credentials file with blank API key.
    * Credentials file with incorrect e-mail address.
    * Credentials file with malformed API key.
    * Credentials file with invalid API key.
    * Domain name not registered to Cloudflare account.
2017-05-10 15:26:51 -07:00
Yen Chi Hsuan
779af8db1e Extend tools/venv3.sh to support full certbot development (#4532) 2017-04-20 09:09:20 -07:00
Brad Warren
bf45cea7cd Ensure a SHA2 hash algorithm is used when signing releases (#4384)
* use gpg2

* explictly use sha256
2017-03-20 18:00:50 -07:00
Brad Warren
7b34e73752 Merge pull request #4295 from certbot/dockerfile++
Rewrite our Dockerfile
2017-03-13 20:25:45 -07:00
Amjad Mashaal
0e735e360c remove unnecessary whitespace from tools/release.sh 2017-03-10 18:09:39 -08:00
Brad Warren
eb1e3c4cb3 add docker-warning script 2017-03-06 19:31:42 -08:00
Brad Warren
caa7e4e3f0 fix tools/venv.sh (#4126) 2017-01-27 14:06:40 -08:00
Josh Soref
6a39a42f45 Spelling (#4101)
* spelling: action

* spelling: artifacts

* spelling: asymmetric

* spelling: attempts

* spelling: bizarre

* spelling: certbot

* spelling: certificate

* spelling: certainly

* spelling: challenge

* spelling: client

* spelling: collated

* spelling: correct

* spelling: considered

* spelling: custom

* spelling: distinguish

* spelling: encoding

* spelling: enhancement

* spelling: equivalent

* spelling: execution

* spelling: existence

* spelling: failed

* spelling: handshake

* spelling: hyphen

* spelling: initialized

* spelling: initialization

* spelling: interpretation

* spelling: letsencrypt

* spelling: multiline

* spelling: multipart

* spelling: necessary

* spelling: otherwise

* spelling: output

* spelling: overridden

* spelling: positives

* spelling: preferable

* spelling: progress

* spelling: recommended

* spelling: referring

* spelling: relativity

* spelling: request

* spelling: requiring

* spelling: separate

* spelling: source

* spelling: specified

* spelling: standard

* spelling: successfully

* spelling: unparseable

* spelling: useful
2017-01-26 16:21:54 -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
Martey Dodoo
a7bfefc6d0 Change all "cerbot" references to "certbot" (#3770) 2016-11-08 11:09:20 -08:00
Brad Warren
f008fd0af9 Don't run nosetests from the root of our repo (#3620) 2016-10-11 19:15:11 -07:00
Brad Warren
0b792e46b7 fix requirements.txt surgery in response to shipping certbot-nginx (#3585) 2016-10-05 18:16:03 -07:00
Brad Warren
a89dfc7226 Add the nginx plugin's hash to certbot-auto during the release process 2016-08-17 16:10:21 -07:00
bmw
6a0c6c85fb Revert "Use --force-reinstall to fix bad virtualenv package" 2016-06-02 16:42:55 -07:00
Brad Warren
2659ec3188 Stop packaging shim packages 2016-06-02 13:27:52 -07:00
Brad Warren
a7edc4b1e5 Previously, the script relied on global pip for hashing packages. This
doesn't work if you don't have `pip` installed (like me) and I think using
`pip` from the venv should be preferred to ensure you are using the latest
`pip` (which was updated in the venv earlier in the script).
2016-05-26 10:33:18 -07:00
Brad Warren
7e039d1504 With us packaging the shim packages, there are more lines in
letsencrypt-auto-requirements.txt that will change with every release. This
change strips the hashes of the previous packages before adding the new ones.
2016-05-26 10:24:57 -07:00
Brad Warren
1322ae12ce Stop packaging letshelp 2016-05-26 10:20:47 -07:00
Peter Eckersley
c55d8e4741 Build the text for the man page at release 2016-05-13 12:22:35 -07:00
Peter Eckersley
5214c56f06 Use certbot-auto.asc 2016-05-11 16:09:30 -07:00
Peter Eckersley
54220a1336 Merge remote-tracking branch 'origin/master' into new-dl 2016-05-11 16:03:01 -07:00
Peter Eckersley
407ebad36e Support openssl and gpg signatures in parallel 2016-05-11 15:56:10 -07:00
Peter Eckersley
a6d5b525b2 Merge pull request #2923 from certbot/release-script-prep
Release script prep
2016-05-09 23:33:39 -07:00
Brad Warren
495371a3b8 Use --force-reinstall to fix bad virtualenv package 2016-05-06 12:33:52 -07:00
Brad Warren
d38cf4a74e Build shim packages in next release 2016-05-04 17:55:12 -07:00
Brad Warren
b844b7d605 Create certbot-auto during release process 2016-05-03 15:44:36 -07:00
Brad Warren
cdff96ddef Choose Python for better integration with boulder 2016-04-15 12:40:37 -07:00
Brad Warren
ae6f1c62f1 Rename misc files 2016-04-14 10:20:23 -07:00
Brad Warren
214343ed6a rename letshelp-letsencrypt 2016-04-13 17:42:19 -07:00
Brad Warren
99382b9f5b Merge branch 'pip8' 2016-03-08 15:49:52 -08:00
bmw
8f19ea4f9d Merge pull request #2582 from letsencrypt/autoupdate-le-auto
Autobuild le-auto with dev version
2016-03-02 16:31:41 -08:00
Brad Warren
06bf983604 Autobuild le-auto with dev version 2016-03-01 13:03:02 -08:00
Brad Warren
465c1bd262 Add pubkey to tree 2016-03-01 11:21:51 -08:00
Brad Warren
3b0a95ff97 compatibility++ 2016-02-29 13:26:48 -08:00
Brad Warren
a8089a43da Use local peep 2016-02-29 12:56:34 -08:00
Brad Warren
35437019a5 Merge branch 'master' into autopeep 2016-02-29 12:33:50 -08:00
Erik Rose
b95a01a15c Turn the root-level letsencrypt-auto symlink into a regular file. Close #2501.
It will always be a copy of the latest release version, 0.4 in this case. (Modify the release script to make that so.) This way, people using the old method of running le-auto from a git checkout will not end up using a bleeding-edge version, letting us work on the tip-of-tree version more freely.
2016-02-19 15:13:58 -05:00
Brad Warren
45ee1eb889 Merge branch 'testing-dev-extras' 2016-02-12 16:19:57 -08:00
Peter Eckersley
27b0cb0c4d Merge pull request #2429 from MinnSoe/fix-old-bootstrap-ref
Fix broken reference in venv script to old bootstrap directory
2016-02-11 01:35:57 -08:00
Peter Eckersley
8d5c945470 release.sh: autopin letsencrypt-auto autopeep autohashes 2016-02-10 20:04:28 -08:00
Peter Eckersley
1f31cf1a30 Quick test farm fix 2016-02-10 19:09:05 -08:00
Peter Eckersley
4b86cabe5b Fix git typo 2016-02-10 18:33:08 -08:00
Minn Soe
24fa435f46 Fix broken reference to script in old bootstrap directory 2016-02-11 00:38:24 +00:00
Peter Eckersley
ea31db75b7 Misc release script fixes 2016-02-10 16:35:14 -08:00
Peter Eckersley
9077ae76bb Offline sigs are actually made with sha256 2016-02-10 12:53:36 -08:00
Erik Rose
505e66b57c Move the venv setup scripts to the tools folder.
They were the last things left in the bootstrap folder, and they were lonely.
2016-02-05 18:31:41 -05:00
Erik Rose
d85883d55a Add 2.6 dependencies that were missing from le-auto. Fix #2334.
ConfigArgParse has a conditional dependency for Pythons < 2.7. On my local machine, I had a cached ConfigArgParse wheel built under 2.7, so it didn't carry those dependencies, and the pip freeze I used to determine the le-auto requirements thus missed it. From now on, we'll do those passes with --no-cache-dir.
2016-02-02 13:05:15 -05:00
Brad Warren
d1d23b118f Did it 2016-01-27 13:16:11 -08:00
Erik Rose
ecbe2a5c69 Merge master in to get the unconditionalization of dependencies. 2016-01-15 13:43:36 -05:00
Peter Eckersley
4762ede4ea Also *set* the letsencrypt-compatibility-test version number 2016-01-13 17:09:45 -08:00
Peter Eckersley
a7b878b825 Ensure that all pip upload version #s are reflect in git 2016-01-13 16:53:40 -08:00
Peter Eckersley
be653e8e6b Use SHA256 openssl signatures 2016-01-11 14:22:51 -08:00
Peter Eckersley
d915f63be4 Add tool for requesting & handling offline signatures 2016-01-10 23:22:04 -08:00
Peter Eckersley
bbd53d6d7d Ensure we have an leauto signature before releasing 2016-01-10 23:15:29 -08:00
Peter Eckersley
7a8507d002 helpful documentation 2016-01-10 23:14:44 -08:00
Peter Eckersley
2eb3e09ca9 Check correct signature presence for release 2016-01-10 22:57:49 -08:00
Peter Eckersley
4233353651 release.sh stage version changes to letsencrypt/ !
Fixes: #1966
2015-12-21 16:41:57 -08:00
Peter Eckersley
b8c2118434 Add explanatory comment 2015-12-16 14:19:22 -08:00
Peter Eckersley
5666cf9e0e Perform "nextversion" incrementing correctly in release.sh 2015-12-16 12:50:21 -08:00
Peter Eckersley
adfed7f4c5 dev-release.sh -> release.sh 2015-12-15 16:17:56 -08:00
Peter Eckersley
49e7e830eb Echo testing instructions 2015-12-15 16:17:11 -08:00
Peter Eckersley
57ea80ca5d Production releases come from the candidate-$version branch
(then get merged into master with a PR afterwards)
2015-12-14 12:13:18 -08:00
Peter Eckersley
1f58e069c5 Fix stray $x bug from the old version of this script 2015-12-14 12:13:00 -08:00
Peter Eckersley
7193296a22 For some reason, nosetests only survives one subpackage at a time? 2015-12-14 12:12:20 -08:00
Peter Eckersley
9a0d819626 Only bump versions if we're making production releases 2015-12-12 00:38:45 -08:00
Peter Eckersley
aea2bcc0f5 Make and sign tarball 2015-12-11 17:57:26 -08:00
Peter Eckersley
01fba752b5 Only autogenerate versions of dev releases 2015-12-11 14:47:42 -08:00
Peter Eckersley
f31f637a8e Be agnostic about whether the tree has a dev/nondev version in it
(though it should always be dev, I think)
2015-12-11 14:45:53 -08:00
Peter Eckersley
57a8eae289 Release script cleanups:
- accept GPG env param
  - Automate version bumping
  - don't work in /tmp/
2015-12-11 14:30:04 -08:00
Peter Eckersley
06175fa2aa We don't use dev-release2.sh 2015-12-11 14:14:55 -08:00
Peter Eckersley
fe4cefb518 Fix various bugs exposed by actually making a release 2015-12-03 01:41:24 -08:00
Peter Eckersley
5a554bdaa7 less confusing variable name 2015-12-02 15:12:00 -08:00
Peter Eckersley
578b9e36e9 Merge remote-tracking branch 'origin/master' into release-engineering 2015-12-02 15:09:29 -08:00
Brad Warren
77dd30614a Use airgapped key 2015-12-01 19:28:42 -08:00
Brad Warren
a65641eb85 Use GPG_TTY 2015-12-01 19:26:55 -08:00
Peter Eckersley
be2be2ef94 Declare partial victory on version numbers 2015-11-19 13:43:04 -08:00
Peter Eckersley
aa10799e15 Add a sub-day digit to the datestamp, just in case... 2015-11-19 13:36:33 -08:00
Peter Eckersley
75a5e57230 Work in progress 2015-11-19 13:31:34 -08:00
Peter Eckersley
e705502ad0 This might be useful. 2015-11-19 13:30:16 -08:00
Peter Eckersley
1f8a275000 Import dev-release2.sh (not currently public) 2015-11-19 12:41:31 -08:00
Peter Eckersley
5829e25804 Always use the specified GPG for signing everything. 2015-11-18 14:26:01 -08:00
Brad Warren
fb844a85a2 Use -p python2 when creating virtualenv 2015-11-18 13:16:49 -08:00
Jakub Warmuz
bd3d373d99
Fix docs for deps.sh 2015-10-31 11:48:33 +00:00
Jakub Warmuz
17a09eac6b
fix comment 2015-10-17 11:13:43 +00:00
Jakub Warmuz
9ebf530dc4
dev-release: more comments about recent changes 2015-10-17 11:12:46 +00:00
Jakub Warmuz
0cf2b5a4bd
dev release: start with fresh virtualenv 2015-10-17 10:57:02 +00:00
Jakub Warmuz
31109b3332
log git commit in dev release 2015-10-17 10:55:41 +00:00
Jakub Warmuz
da63155724
dev release: clean up subpkgs/subpkg_modules confusion 2015-10-17 09:09:57 +00:00
Jakub Warmuz
5621cf325d
dev-release.sh: Update setuptools/pip 2015-10-17 09:02:32 +00:00
Jakub Warmuz
ce41201861
Require tests pass in dev release. 2015-10-11 10:52:08 +00:00
Jakub Warmuz
ae66253ddf
Don't save KGS in dist dir in dev release script (fixes #908). 2015-10-06 19:07:20 +00:00
Jakub Warmuz
3c08b512c3
Simple dev release script 2015-09-27 16:12:50 +00:00
Jakub Warmuz
c6e4c7dea1
setup.py: update/fix deps. 2015-09-01 19:57:41 +00:00