Commit graph

107 commits

Author SHA1 Message Date
Brad Warren
9b848b1d65
Add back Python 3.4 support (#7510)
* Revert "Deprecation warnings for Python 3.4 (#7378)"

This reverts commit 6fcdfb0e50.

* Revert "Migrate certbot-auto users on CentOS 6 to Python 3.6 (#7268)"

This reverts commit e19b2e04c7.

* add changelog entry

* keep mona in authors
2019-11-05 16:45:08 -08:00
Adrien Ferrand
e19b2e04c7 Migrate certbot-auto users on CentOS 6 to Python 3.6 (#7268)
Fixes #7007

Python 3.4 is [EOL](https://www.python.org/dev/peps/pep-0429/), and only Python 3.x version available for CentOS 6 through EPEL is this version, and so is used by `certbot-auto`, the only official way to install Certbot on this platform.

This unpleasant situation becomes a little more uncomfortable, considering that the newest `pip` version (19.2) [just dropped Python 3.4 support](https://github.com/pypa/pip/issues/6685) and will refuse to start on this Python version. We can expect a lot of dependencies to follow this path now.

One direct result of this situation is that a fix to support correctly the ARM platforms requires to upgrade `pip` to 19.2 for `certbot-auto`. So this is not possible right now.

Then, let's upgrade Certbot instances on CentOS 6 to a supported version of Python 3.

This PR proposes a new bootstrap approach for CentOS 6 platform, `BootstrapRpmPython3Legacy`, that will install Python 3.6 from [SCL](https://www.softwarecollections.org) (the latest one available for now on CentOS 6). In term of Python 3 specific bootstrap methods, I take the occasion here to completely separate the bootstrap of CentOS 6 as a legacy system, from the RPM-based newest systems (like Fedora 29+) that are simply dropping support for Python 2.x. This is in prevision of future migration for all systems on Python 3.x, that is a different problematic than supporting old systems.

* Add logic

* Rebuilt letsencrypt-auto

* Fix logic

* Focus on specific packages

* Maintain PATH for further invocations of letsencrypt-auto after bootstrap.

* Various corrections

* Fix farm test for RHEL6

* Working centos6 letsencrypt-auto self tests

* Fix test_sdist for CentOS 6

* Corrections

* Work in progress

* Working configuration

* Fix typo

* Remove EPEL. Add a test.

* Update letsencrypt-auto-source/letsencrypt-auto.template

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Improvements after review

* Improvements

* Add a comment

* Add a test

* Update a test

* Corrections

* Update function return

* Work in progress

* Correct behavior on oracle linux 6.

* Corrections

* Rebuild script

* Add letsencrypt-auto tests for oraclelinux6

* Update tox.ini

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Update letsencrypt-auto-source/letsencrypt-auto

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Update letsencrypt-auto-source/tests/oraclelinux6_tests.sh

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Update letsencrypt-auto-source/letsencrypt-auto.template

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Update letsencrypt-auto-source/letsencrypt-auto

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Update letsencrypt-auto-source/letsencrypt-auto

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Update letsencrypt-auto-source/letsencrypt-auto.template

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Update letsencrypt-auto-source/tests/oraclelinux6_tests.sh

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Remove specific code for scientific linux

* Change some variables names

* Update letsencrypt-auto-source/tests/oraclelinux6_tests.sh

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Various corrections

* Fix tests

* Add a comment

* Update message

* Fix test message

* Update letsencrypt-auto-source/letsencrypt-auto.template

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Update letsencrypt-auto-source/letsencrypt-auto

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Update letsencrypt-auto-source/letsencrypt-auto

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Update scripts

* More focused assertion

* Add back a test

* Update script

* Update letsencrypt-auto-source/letsencrypt-auto.template

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Update letsencrypt-auto-source/letsencrypt-auto.template

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>

* Check quiet mode

* Add changelog

* Update letsencrypt-auto-source/tests/oraclelinux6_tests.sh

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
2019-10-30 10:39:45 -07:00
Brad Warren
c2480b29f7
Add CentOS 8 support to certbot-auto. (#7406)
Fixes #7396.
2019-09-30 09:19:05 -07:00
Michael Watters
d6e6d64848 Update certbot-auto script to work with RHEL 8
/usr/bin/python no longer exists in RHEL 8.  This patch updates
the certbot-auto script to use python3 on nodes running RHEL 8.

Also fixed a bug in the RPM_DIST_VERSION logic which would cause
letsencrypt-auto to fail on servers running CentOS/RHEL 6.
2019-08-06 09:16:14 -04:00
Adrien Ferrand
71b1b8c2d9 Fix check permissions logic (#7034)
Fixes #7031 

I use the same approach than in `CreateVenv()` and `CompareVersions()`: a new bash function `CheckPathPermissions()` is declared an execute a python script passed to the interpreter through stdin.

This allows:
* to not require the temp_dir that holds a temporary script to be executed
* to reduce at the bare minimum the change to make on the order of bash command to execute (including when the temp_dir is created)

* Fix check permissions logic in certbot-auto by making a temp dir useless

* Update CHANGELOG.md
2019-05-06 15:49:47 -07:00
Brad Warren
e15e848474
Stop certbot-auto from printing blank lines (#7016)
Fixes #7012.

Apparently, the previous test we had here doesn't catch the case when certbot-auto prints blank lines. (I don't yet understand why so if someone does, please let me know!)

Regardless, I fixed up the test and verified it fails with the version of letsencrypt-auto in master and then fixed letsencrypt-auto so the test passes.

I ran test farm tests on the changes here and they passed on all instances.

* correct test

* fixes #7012
2019-05-02 11:36:47 -07:00
Brad Warren
d1330efe41
Print warning when certbot-auto has insecure permissions. (#6995)
This PR attempts to better inform people about the problem identified at https://community.letsencrypt.org/t/certbot-auto-deployment-best-practices/91979/.

I was hesitant to add the flag --no-permissions-check, however, if there's some obscure distro out there (or custom user setup) that has a strange users and groups, I didn't want us to either:

Have to put out a bug fix release
Refuse to fix the problem and let them deal with warnings on every run

* add check_permissions.py

* Update letsencrypt-auto.template.

* build letsencrypt-auto

* Add test_permissions_warnings to auto_test

* Allow uid/gid < 1000.

* Add --no-permissions-check to Certbot.

* Add --no-permissions-check to certbot-auto.

* Add test farm test that letsencrypt-auto is quiet.

As a bonus, this new test will catch problems like the one that the caused
0.33.1 point release.

* Update CHANGELOG about permissions check.

* Update permissions comment.

* Fix symlink handling.

* Use a better default in auto_test.py.
2019-04-30 10:45:03 -07:00
Adrien Ferrand
c2d9ea1f61 Protect certbot-auto against non numerical version release in some RPM distributions (#6913)
Fixes #6912

Bash evaluate all condition in a predicate statement, eg. `"$SOMEVAR" = "test" -a "$ANOTHERVAR" = "test2"`, even if it is not necessary, for instance if the first condition is false in the example here.

As a consequence, on non-Fedora distributions, an evaluation of the distribution version could be done on non numeric value, eg. `"6.7" -eq "29"`, making certbot-auto failing in this case.

This PR fixes that, by evaluating the version on RPM distributions only if we are on Fedora. Otherwise, version will be "0".
2019-04-04 10:46:46 -07:00
Adrien Ferrand
c1d2efec4e
Construct the sanitized, pinned and hashed requirements file for certbot-auto (#6839)
* Setup an independant create_venv piece for certbot-auto

* Debug

* First implementation

* Some corrections, disable python 3

* Continue work

* Add hashin

* Polish CLI

* Fix logic

* Add executable permissions

* Assynchronous process

* Correction

* Add comments

* More controls

* Correct image name

* Fix image

* Test with 2

* Test timeout

* Remove parallelization for now. To much bugs.

* Add comments

* Correct installation

* Correct keys map view usage

* Improve filtering

* Correction

* Improve filtering, again

* Remove dependency on python 3

* Remove necessity to run from certbot root

* Add constraints. Clean code.

* Pure constraints

* More involved base test

* Update certbot-auto with calculated dependencies

* Update header

* Rebuild UI

* Correction

* Remove debug info

* Ensure docker exit when process finish

* Another try to stop docker

* Clean stdout/stderr

* Fix python-augeas

* Catch stderr

* Update dependencies with new constraints

* Update certbot-auto

* Corrections after review.

* Clean endline

* Silent execution

* Filter editable installation of local certbot packages, strict check on package names
2019-03-25 18:52:59 +01:00
Adrien Ferrand
81d9b5250e Clean stderr in case of /etc/os-release does not exist (#6835) 2019-03-11 15:42:32 -07:00
Adrien Ferrand
34393f9bf4 Correct certbot-auto for Fedora 29+ (#6812)
Fixes #6698

Fedora maintainers engaged a deprecation path for Python 2.x with Fedora 29. As a first step, python2-virtualenv does not install the virtualenv binary anymore, in favor of python3-virtualenv, and so the installation of Python 3 virtual environments by default.

However, certbot-auto installs python2-virtualenv for all recent RPM distributions, and relies of the execution of virtualenv, and this is failing the process.

Since the plan in the future is to remove Python 2.x from Fedora, this PR follows this logic to fix certbot-auto: started to Fedora 29, certbot-auto will install and execute certbot on Python 3. This implies to detect that we are on Fedora 29+, install python3-virtualenv that will install also Python 3 dependencies and virtualenv binary, then instruct the process to use Python 3. This is in fact similar to EOL distributions shipping with Python 2.6, and for which Python 3.4 from EPEL is installed and used.

Older versions of Fedora continue to use Python 2.x, and their process is untouched. Four scenarios are covered here:

fresh Fedora 28: old process is used, nothing changes
fresh Fedora 29: new process is used, Python 3 is installed, certbot runs on it
update Fedora 29 from 28, already installed certbot-auto without rebootstrapping required: existing venv continue to be used, certbot runs on it
update Fedora 29 from 28, already installed certbot-auto with rebootstrapping required: new process is used, installing python3-virtualenv, python3-devel and python3-rpm-macros, Python 3 is installed, certbot runs on it

* Add a step to handle python3 on fedora29

* Update letsencrypt-auto-source/letsencrypt-auto.template

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

* Update letsencrypt-auto-source/letsencrypt-auto.template

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

* Update letsencrypt-auto-source/letsencrypt-auto.template

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

* Update rpm_python3.sh

* Rebuild certbot-auto

* Empty commit to relaunch CI pipeline

* Add changelog

* Update CHANGELOG.md

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

* Update CHANGELOG.md
2019-03-07 10:05:20 -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
78cf8ec4de Protect certbot-auto against automated downgrades (#6448)
With current code, the certbot-auto self-upgrade process can make it actually to downgrade itself, because the comparison done is an equality test between local certbot-auto version and the remote one. This is a flaw for attackers, that could make certbot-auto break itself by falsely advertising it about an old version as the latest one available.

A function is added to make a more advanced comparison between version. Certbot-auto will upgrade itself only if the local version is strictly inferior to the latest one available. For instance, a version 0.28.0 will not upgrade itself if the latest one available on internet is 0.27.1. Similarly, non-official versions like 0.28.0.dev0 will never trigger a self-upgrade, to help development workflows.

This implementation relies only on the Python distribution installed by certbot-auto (supporting 2.7+) and basic shell operations, to be compatible with any UNIX-based system.

* Check version with protection again downgrade

* Create a stable version of letsencrypt-auto to use correctly self-upgrade functionality

* Update letsencrypt-auto-source/letsencrypt-auto.template
2018-11-19 14:28:59 -08:00
Peter Lebbing
e8eeab3eab
Respect --quiet when reporting sudo invocation 2018-09-23 14:22:20 +02:00
Brad Warren
43ba9cbf33
Merge pull request #5605 from certbot/rm-eol-2.6
Drop Python 2.6 and 3.3 support
2018-02-26 13:34:50 -08:00
Brad Warren
f1b7017c0c Finish dropping Python 2.6 and 3.3 support
* Undo letsencrypt-auto changes

* Remove ordereddict import

* Add Python 3.4 tests to replace 3.3

* Add python_requires

* update pipstrap
2018-02-21 19:11:01 -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
sydneyli
9277710f6f Added install-only flag (#5531) 2018-02-13 11:15:08 -08:00
Brad Warren
a1aba5842e Fix --no-bootstrap on CentOS/RHEL 6 (#5476)
* fix --no-bootstrap on RHEL6

* Add regression test
2018-01-24 22:23:20 -08:00
Brad Warren
3acf5d1ef9
Fix rebootstraping with old venvs (#5392)
* Fix rebootstrapping before venv move

* add regression test

* dedupe test

* Cleanup case when two venvs exist.

* Add clarifying comment

* Add double venv test to leauto_upgrades

* Fix logic with the help of coffee

* redirect stderr

* pass VENV_PATH through sudo

* redirect stderr
2018-01-10 12:10:21 -08:00
Brad Warren
00634394f2
Only respect LE_PYTHON inside USE_PYTHON_3 if we know a user must have set it version 2 (#5402)
* stop exporting LE_PYTHON

* unset LE_PYTHON sometimes
2018-01-09 21:16:44 -08:00
ohemorange
6eb459354f Address erikrose's comments on #5329 (#5400) 2018-01-09 16:48:16 -08:00
Brad Warren
887a6bcfce Handle need to rebootstrap before fetch.py (#5389)
* Fix #5387

* Add test for #5387

* remove LE_PYTHON

* Use environment variable to reduce line length
2018-01-09 15:40:26 -08:00
ohemorange
8585cdd861 Deprecate Python2.6 by using Python3 on CentOS/RHEL 6 (#5329)
* If there's no python or there's only python2.6 on red hat systems, install python3

* Always check for python2.6

* address style, documentation, nits

* factor out all initialization code

* fix up python version return value when no python installed

* add no python error and exit

* document DeterminePythonVersion parameters

* build letsencrypt-auto

* close brace

* build leauto

* fix syntax errors

* set USE_PYTHON_3 for all cases

* rip out NOCRASH

* replace NOCRASH, update LE_PYTHON set logic

* use built-in venv for py3

* switch to LE_PYTHON not affecting bootstrap selection and not overwriting LE_PYTHON

* python3ify fetch.py

* get fetch.py working with python2 and 3

* don't verify server certificates in fetch.py HttpsGetter

* Use SSLContext and an environment variable so that our tests continue to never verify server certificates.

* typo

* build

* remove commented out code

* address review comments

* add documentation for YES_FLAG and QUIET_FLAG

* Add tests to centos6 Dockerfile to make sure we install python3 if and only if appropriate to do so.
2018-01-08 13:57:04 -08:00
Brad Warren
18f6deada8 Fix letsencrypt-auto name and long forms of -n (#5375) 2018-01-05 19:27:00 -08:00
Brad Warren
82d0ff1df2 Fix permissions error when upgrading certbot-auto. (#5086)
Now we always check if we have root access if --cb-auto-has-root is not given
on the command line. This allows certbot-auto to properly acquire root when
upgrading from an older version. People upgrading from 0.18.0 to 0.18.1 may
check for root access twice, however, if root's user ID is 0, this check is
essentially a noop. If root's user ID is not 0, we'll request root access a 2nd
time during this upgrade.
2017-09-07 17:23:57 -07:00
Brad Warren
a5fae7eab5 certbot-auto OS dependency update system (#4971)
* Add version number to bootstrap scripts.

* Always determine Bootstrap function and version.

* Write bootstrap version into venv.

* Add PrevBootstrapVersion function.

* Add OS bootstrapping check to phase 2.

* Differentiate -n and renew when rebootstrapping.

* Quote all environment variables.

* Correct test condition

* Add loud warning about hardcoded version list.

* s/VENV_BOOTSTRAP_VERSION/BOOTSTRAP_VERSION_PATH

* Properly handle noop bootstrap functions.
2017-08-23 11:01:20 -07:00
Brad Warren
56db211367 Change certbot-auto's installation path to /opt (#4970)
* Update comment about root usage.

* run all of certbot-auto as root

* remove other $SUDO uses from template

* remove $SUDO usage from bootstrappers

* default venv path = /opt/eff.org/certbot/venv

* Create symlinks from old default venvs

* Delete old venv path when it exists.

Also, quote expansion of paths.

* fix typo

* Separate venv_dir and le_auto_path

* Deduplicate code with test_dirs()

* Ignore cleanup errors.

This is caused by subdirectories being owned by root.

* Split test into test_phase2_upgrade.

* Rename test_dirs to temp_paths for clarity.

* Check both venvs before bootstrapping again.

* Use OLD_VENV_PATH/bin

* Preserve environment with sudo.

* Remove "esp. under sudo" comment.

* Export *VENV_PATH.

* Change check for OLD_VENV installation.

This approach better handles manually set VENV_PATH values.

* Remove SUDO_ENV.

* Print message before requesting root privileges.

* Make a function for selecting root auth method.

* Address @erikrose's feedback.
2017-08-21 12:23:09 -07:00
Noah Swartz
bb6a22b985 Merge pull request #4943 from certbot/issue_4520
add deprecation warning
2017-07-19 15:51:51 -07:00
Noah Swartz
1cf8c5a586 add changes to template 2017-07-18 16:37:03 -07:00
Noah Swartz
fa74a32245 updated letsencrypt-auto.template 2017-07-18 16:27:33 -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
Brad Warren
372d201111 use say now that if QUIET statement was moved (#4530) 2017-04-19 14:11:18 -07:00
Josh Soref
c13b2eae9b Make it easier to honor --quiet (#4292)
* say -- echo which honors quiet

* error -- echo which does not honor quiet

* switch non error echos to say

* switch error echos to error

* run letsencrypt-auto-source/build.py
2017-04-19 09:11:38 -07:00
Brad Warren
36891033dd Set HOME if it's not defined in certbot-auto (#4503)
* set HOME if it's not defined

* use ~root rather than /root
2017-04-17 14:39:08 -07:00
Peter Eckersley
1ed50497eb [certbot-auto]: "renew" implies --non-interactive (#4500) 2017-04-17 11:41:24 -07:00
Peter Eckersley
2bdfffb23a Support "certbot-auto --no-bootstrap" (#3955)
* Support "certbot-auto --no-bootstrap"

* Tell people about --no-bootstrap?

* Document new certbot-auto flag in its cli help

* Rebuild

* Less variables is less variability

* Alphabetize help

* Make it extra clear we only take one branch

* Add --no-bootstrap message to experimentalbootstrap exit
2017-04-04 16:12:31 -07: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
Brad Warren
6a55de45ba Fix letsencrypt auto source (#4093)
* Some shells don't like ==

* run build.py
2017-01-23 17:55:59 -08:00
Nick Fong
02615c2ac6 Silence Package Manager Output when certbot-auto invoked with --quiet (#3776)
* Add quiet flags to package manager invocations

Add the following flags when 'certbot-auto --quiet' is invoked:
- Add '-qq' to calls to 'apt-get' in Debian
- Add '--quiet' to calls to 'yum' or 'dnf' in CentOS or Fedora
- Add '--quiet' to calls to 'urpmi' in Mageia
- Add '--quiet' to calls to 'pkg install' in FreeBSD

* Fix $QUIET flag in bootstrappers

- Set the value of $QUIET properly (i.e. s/$QUIET/QUIET when setting the
  variable) in
  - deb_common.sh
  - mageia_common.sh
  - rpm_common.sh
- Actually use $QUIET when running $tool in rpm_common.sh

* Add handling of $QUIET to Arch and Open Suse

* Add logic to set --non-interactive if --quiet

* Add missing $QUIET_FLAG to rpm_common.sh

* Run build.py

* Limit --help to 80 cols

* Update indentation within bootstrappers

* Add $QUIET_FLAG to second call to `urpmi` (redux)
2017-01-20 09:40:36 -08:00
Guillaume Boudreau
a5101d73a0 certbot-auto re-installs virtualenv when plugin is causing issues (#4035)
When certbot-auto cannot find the currently installed version, output the error to the end-user, instead of not showing anything, and re-installing the virtualenv.

Fixes #4034
2017-01-17 14:54:14 -08:00
Lipis
bba5d7d950 Rename OS X -> macOS (#3965)
* Rename OS X -> macOS

* Revert *-auto
2017-01-10 12:24:15 -08:00
Brad Warren
1125b4924d Remove quotes so tilde is expanded (#3978) 2017-01-05 20:27:39 -05:00
Kenneth Skovhede
184d673378 Busybox support (#3797)
* Added support for shells without default variable support

* Added support for BusyBox installs that do not have `command` but has `which`

* Style fixes as suggested by reviewer

* Renamed `WHERE_IS` to `EXISTS` as suggested by review

* Removed expansion of `$LE_AUTO_SUDO` to `x` as the `-n` can check empty strings.

* Added `EXISTS` to debian bootstrap as suggested in review
2016-12-05 19:40:07 -08:00
Timothy Guan-tin Chien
3dbf5c9fcb certbot-auto: Print link to doc on debugging pip install error [revision requested] (#3473)
* certbot-auto: Print link to doc on debugging pip install error

Also, update the doc to teach the user to workaround problem on a low
memory system.

* Correct formatting

* grep the PIP_OUT and print useful info if the problem is about memory allocation

* Fix logic on string to grep
2016-12-05 18:49:38 -08:00
Brad Warren
0289457a93 Use ${foo+x} not ${foo:+x} (#3833) 2016-11-30 16:09:16 -08:00
Jaap Eldering
ca9b3f18af Allow user to override sudo as root authorization method [minor revision requested] (#1969)
* Move su_sudo() wrapper function outside of root method selection code.

* Improve comment language.

* Allow overriding root authorization mechanism (sudo/su/nothing)
by setting LE_AUTO_SUDO environment variable.

* Update generated letsencrypt-auto-source/letsencrypt-auto
from template.

* Add change requests from Brad Warren and regenerate letsencrypt-auto.

Thanks for pointing out.
2016-11-03 18:13:02 -07:00
tcottier
5ed0f3610c When getopts is called multiple time we need to reset OPTIND. (#3475)
Not resetting OPTIND between each call of getopts skips all short args except the first one.

It fixes this automated command: 
./certbot-auto certonly --webroot -w /tmp -d example.com --agree-tos --email contact@example.com -n

Where "-w" was parsed by getopts and not "-n"

* When getopts is called multiple time we need to reset OPTIND. Issue #3459 

* Adding OPTIND reset in the certbot-auto source file

* Building new letsencrypt-auto from template
2016-10-28 11:18:56 -07:00
shodan
54eafcf8da
Change fatal warning to a fatal message 2016-07-21 14:50:12 +02:00
Brad Warren
62d6cc3b90 Merge pull request #3176 from TheNavigat/pip-verbose
Printing pip output to terminal when -v is used
2016-07-15 17:23:41 -07:00