This PR is the second part of #6497 to ease the integration, following the new plan propose by @bmw here: #6497 (comment)
This PR creates the module certbot.compat.os, that delegates everything to os, and that will be the safeguard against problematic methods of the standard module. On top of that, a quality check wrapper is called in the lint tox environment. This wrapper calls pylint and ensures that standard os module is no used directly in the certbot codebase.
Finally local oldest requirements are updated to ensure that tests will take the new logic when running.
* Add executable permissions
* Add the delegate certbot.compat.os module, add check coding style to enforce usage of certbot.compat.os instead of standard os
* Load certbot.compat.os instead of os
* Move existing compat test
* Update local oldest requirements
* Import sys
* Update account_test.py
* Update os.py
* Update os.py
* Update local oldest requirements
* Implement the new linter_plugin
* Fix local oldest for nginx
* Remove check coding style
* Update linter_plugin.py
* Add several comments
* Update the setup.py
* Add documentation
* Update acme dependencies
* Update certbot/compat/os.py
* Update docs/contributing.rst
* Update linter_plugin.py
* Handle os.path. Simplify checker.
* Add a comment to a reference implementation
* Update changelog
* Fix module registering
* Update docs/contributing.rst
* Update config and changelog
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
* Clarify UNIX only
* Have people develop natively.
Some systems like Arch Linux and macOS require --debug in order to install
dependencies.
Our bootstrapping script for macOS works, so let's let people who want to
develop natively.
* briefly mention docker as dev option
* remove bad _common.sh info
* update OS dep section
* Remove sudo from certbot-auto usage
When sudo isn't available, Certbot is able to fall back to su. Removing it from
the instructions here allows the command to work when its run in minimal
systems like Docker where sudo may not be installed.
* copy advice about missing interpreters
* Improve integration tests docs
Explain what a boulder is and tell people they probably should just let the
tests run in Travis.
* Don't tell people to run integration tests.
I don't think any paid Certbot devs run integration tests locally and instead
rely on Travis. Let's not make others do it.
* fix spacing
* you wouldn't download a CA
* address review comments
* 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
- Dev / test cycles are one use case for the "running a local copy of
the client" instructions, but simply running bleeding edge Certbot is
another
- So edit the docs to once again explain how to just run bleeding edge
Certbot, without (say) always getting staging certs.
1. Replace the outdated reference to "vritualenv", "see below" -> "see above".
2. Replace the awkward sentence (partially incorrect) about installing on FreeBSD.
It can be installed via different ways: "pkg" is not exclusive. I am not aware of any reason why it canNOT be installed from ports. Some people prefer build and install everything from ports. (The previous version of the description implies that ports cannot be used.)
Move "Writing your own plugin" under Code components and layout, with the other
plugin docs.
Include instructions on how to install a plugin into a virtualenv and how to check
for its presence.
Document that users can install third-party plugins systemwide, but not with
certbot-auto.
Remove obsolete information from Authenticators section and make the section
more informative.
Remove IDisplay sub-section since it repeats information in the main "Plugin
architecture" section.
* remove instructions about removed Vagrantfile
* rewrite docker instructions
* say where docker-compose can be run
* give better intro for macOS devs
* prompt people for permission to install OS packages
* reword awkward sentence
* Change WORKDIR to /opt/certbot/src
This change is OK because all paths used in Dockerfile-dev are absolute paths.
* remove 'cd src' instructions for Dockerfile-dev
* Improve docker-compose testing instructions
Recommend faster-running commands with clearer output first, building up to
slow, noisy, `tox` last.
Remove outdated Boulder testing advice, and outdated Boulder testing scripts
(Vagrantfile, mac-bootstrap.sh, boulder-start.sh). Update Boulder testing
section.
Fill out "directory structure" section of contributing guide a little better.