Commit graph

115 commits

Author SHA1 Message Date
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
Amjad Mashaal
4ab6a183f0 Removing 2>&1 2016-07-16 01:33:44 +02:00
Amjad Mashaal
797d0a0660 Printing pip output to terminal when -v is used
Signed-off-by: Amjad Mashaal <me@amjad.io>
2016-06-25 12:37:42 +02:00
Brad Warren
f98fb1c6b6 Merge pull request #3155 from gdoucet/master
Added the argument --quiet and -q so then when used with a regular user there is no output to the screen.
2016-06-21 15:19:05 -07:00
Peter Eckersley
4da0ee6185 Merge pull request #3111 from certbot/exit-if-no-bootstrap
Exit if cannot bootstrap in certbot-auto
2016-06-14 14:29:28 -07:00
Geoffroy Doucet
8c8125c6fd Added the argument --quiet and -q so then when used with a regular
user there is no output to the screen.
2016-06-13 21:29:51 -04:00
Peter Eckersley
28169f17e3 Merge pull request #3133 from certbot/mageia
Mageia Bootstrap
2016-06-13 14:26:05 -07:00
Brad Warren
e51c16d666 Update letsencrypt-auto changes for the new format 2016-06-07 17:24:56 -07:00
Brad Warren
2815361e63 Update the template as well 2016-06-03 11:12:49 -07:00
Brad Warren
76a939ceb3 Exit if cannot bootstrap 2016-06-02 16:00:19 -07:00
Brad Warren
c606273d14 use TEMP_DIR trap consistently 2016-05-24 13:16:21 -07:00
Brad Warren
70bb7ff68f fixes #3060 2016-05-24 13:08:10 -07:00
Brad Warren
507b154276 Don't saying you're requesting root unless you really are 2016-05-17 20:11:02 -07:00
Brad Warren
502eba1cc4 Simplify SUDO certbot prompt 2016-05-17 20:07:45 -07:00
Brad Warren
45b7c407c1 Don't tell people you check for updates on every run 2016-05-17 20:07:06 -07:00
Brad Warren
af41345967 Put arg parsing in one place 2016-05-17 20:06:35 -07:00
Peter Eckersley
248dc0962e Merge pull request #2895 from dietsche/joyent
Joyent SmartOS Zone Bootstrap Support [revised]
2016-05-17 14:54:08 -07:00
Brad Warren
d39dee20ad fix auto arg parsing 2016-05-16 15:06:51 -07:00
Peter Eckersley
c9cdefd780 Merge remote-tracking branch 'origin/master' into deprecation-warning 2016-05-11 09:40:57 -07:00
Gregory L. Dietsche
029a818370 Experimental Joyent SmartOS Support
Testing using image: 088b97b0-e1a1-11e5-b895-9baa2086eb33
                     base-64-lts 15.4.1

Signed-off-by: Gregory L. Dietsche <Gregory.Dietsche@cuw.edu>
2016-05-10 18:03:32 +00:00
Gregory L. Dietsche
62cf9c93a8 /etc/issue does not exist on all systems
Signed-off-by: Gregory L. Dietsche <Gregory.Dietsche@cuw.edu>
2016-05-10 18:03:32 +00:00
Peter Eckersley
ed23f2e27f CERTBOT_AUTO env was broken (especially if containing spaces) 2016-05-10 10:21:15 -07:00
Brad Warren
f38d59d675 Use --non-interactive instead of --yes and use getopt for parsing short opts 2016-05-09 19:08:25 -07:00
Brad Warren
c66f0bd18e Make le-auto helpful 2016-04-21 16:13:17 -04:00
Brad Warren
0fa18b6081 Add help text 2016-04-21 15:55:28 -04:00
Brad Warren
530033a37d Add CLI parsing 2016-04-21 15:16:39 -04:00
Brad Warren
45681909c7 Selectively rename le-auto strings 2016-04-20 14:39:26 -04:00
Peter Eckersley
3c455b7e64 letsencrypt-auto: set CERTBOT_AUTO :) 2016-04-20 10:45:30 +10:00
Peter Eckersley
b597f4a284 [letsencrypt-auto] handle network/pypi failures more gracefully 2016-04-20 09:28:41 +10:00
Brad Warren
21173e2353 Partial le-auto rename 2016-04-14 10:50:31 -07:00
Brad Warren
ee2ef9a345 reuse venv sometimes on Python 2.6 2016-04-05 16:36:11 -07:00
Brad Warren
99382b9f5b Merge branch 'pip8' 2016-03-08 15:49:52 -08:00
Brad Warren
bb0406ee85 quote TEMP_DIR 2016-03-03 12:01:53 -08:00
Brad Warren
34eb86b226 trap magic 2016-03-03 09:44:42 -08:00
Brad Warren
bd04076bad Install setuptools separately... 2016-03-02 19:32:06 -08:00
Brad Warren
0c345cb8d3 Merge branch 'master' into revert-2492-unbreak-le-auto 2016-02-26 08:49:37 -08:00
Erik Rose
d4804fd9e6 Use a new file for the updated le-auto script. Fix #2456.
I prefer to err toward simplicity here. Yes, there's an assumption necessary for this to work--that the shell doesn't do multiple open() calls to the script path throughout the life of the interpreter--but I think it's reasonable. The alternative of exec-ing out to a dedicated update script which then execs back to le-auto has more moving parts (like extra files that we have to clean up) and is longer.
2016-02-25 00:15:28 -05:00
bmw
db4135a3ec Revert "Revert "Let --no-self-upgrade bootstrap OS packages. Fix #2432."" 2016-02-22 11:21:04 -08:00
Brad Warren
dbc81490e5 Revert "Let --no-self-upgrade bootstrap OS packages. Fix #2432."
This reverts commit 6eb2d60166.
2016-02-16 17:10:59 -08:00
Erik Rose
e8f6d4ff39 Merge the true public suitability of --no-self-upgrade. Close #2451. 2016-02-16 15:12:26 -05:00
Erik Rose
3915e0014b Merge removal of venv on le-auto failure. Close #2450. 2016-02-16 15:02:23 -05:00
Peter Eckersley
f3894fb9e9 Merge pull request #2466 from erikrose/shelly-fixes
le-auto shell style improvements
2016-02-13 10:37:58 -08:00
Erik Rose
e08aa36a4e Switch to case statement for arg parsing in le-auto.
Ported from #1751.

* It's more lines but fewer tokens, less room for quote errors, and more idiomatic (see any init.d script).
* Also, fix a bug in which any option containing "-v", e.g. --eat-vertical-pizza, would be construed as --verbose.
2016-02-12 17:36:48 -05:00
Erik Rose
4c2c80dcda Fix DeterminePythonVersion().
Ported from #1751.

* Make sure any Python passed in as $LE_PYTHON actually exists.
* Dodge a word-splitting bug: `a='a b'; export a=${a:-c}; echo $a` gives `a` instead of `a b` under shells that respect POSIX.1, like dash.
2016-02-12 17:23:29 -05:00
Erik Rose
dc8bdfac56 Quote the remaining variable expansions in le-auto. Refs #1899.
...except for $SUDO, which is always either "sudo", "su_sudo", or "", never having a quote-needing char in it.

It's unlikely that $PYVER would have a space in it, but it doesn't hurt.
2016-02-12 15:08:07 -05:00
Erik Rose
cedcad1373 Use python -V instead of python --version. Fix #2039.
Python 2.4 doesn't support --version, and we want to be able to at least complain that it's too old without crashing.

Also, bring built le-auto up to date.
2016-02-12 11:49:01 -05:00
Erik Rose
eb4e8bf59e Add a "success" message after installation. Fix #1621. Close #2214. 2016-02-11 18:42:27 -05:00
Erik Rose
6eb2d60166 Let --no-self-upgrade bootstrap OS packages. Fix #2432.
--no-self-upgrade metamorphosed from a private flag to a public one, so add a new private flag, --le-auto-phase2 to take its original role of marking the division between phases. This flag must come first and, consequently, can be stripped off the arg list before calling through to letsencrypt, which means the client doesn't need to know about it.

The downside is that anyone still (deprecatedly) running le-auto out of the root of a (recently updated) master checkout will get a "Hey, the current release version le-auto I just self-upgraded to doesn't understand the --le-auto-phase2 flag" error from when we merge this until the next release is made, but that's better than a documented option not working right.

Also, remove a needless folder creation from the Dockerfile.
2016-02-11 18:03:01 -05:00
Erik Rose
d791697b93 If le-auto's installation fails, delete the venv. Fix #2332.
Leaving broken venvs around can, if it got as far as installing the venv/bin/letsencrypt script, wreck future le-auto runs, since the presence of that script means "a working LE is installed" to it. Waiting until a new version of le-auto comes out and running it would recover, but this lets re-running the same version recover as well.
2016-02-11 17:17:09 -05:00
Gian Carlo Pace
d34c6779e8 added a missing space in letsencrypt-auto.template as well 2016-02-09 23:34:38 +01:00
Brad Warren
fa49976baf Remove need to use --debug with py26 2016-02-01 16:05:39 -08:00
Aaron Zirbes
95061b8487 Stop spewing "grep: /etc/os-release: No such file or directory" when running le-auto. Fix #2255.
Also bump embedded version number.
2016-01-29 17:05:01 -05:00
Erik Rose
1706619886 Update known-good-set, and make deps unconditional.
Bring everything to the latest versions.

Make dependencies unconditional: argparse, ndg-httpsclient, and pyasn1 get in all the time, to match the state of master as of 0.2.0.
2016-01-15 18:09:27 -05:00
Peter Eckersley
3abf028f69 Merge branch 'letsencrypt-auto-release' of https://github.com/erikrose/letsencrypt into letsencrypt-auto-release 2016-01-12 14:29:58 -08:00
Erik Rose
6c05197a43 Remove mock as an install requirement.
The motivation is to free us of a reliance on a rather modern version of setuptools, which caused le-auto failures for people on Wheezy and other older distros. (The alternative would have been to forcibly upgrade setuptools as the old le-auto did, but less is more.)

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

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

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

Fix tests to pass with mock removed. We had to stop them pulling down LE from PyPI, since the current version there (0.1.1) requires mock and explodes when `letsencrypt` is run.
2016-01-11 21:26:41 -05:00
Peter Eckersley
1b3c8e87c7 Better processing & documentation of leauto flags
- move them to the top for clarity
 - accept them in any position
 - shadow & document them in the Python client
2016-01-11 14:22:51 -08:00
Peter Eckersley
916f8916d8 Clearer notes about when / how to edit the script 2016-01-11 14:22:51 -08:00
Erik Rose
cd43e9035b Rename letsencrypt_auto dir to match other dirs.
Originally, I had it in mind to move letsencrypt-auto inside this dir. However, now we'd like to copy it or link it to the root level, where people are used to finding it (at least for awhile). Since it would be confusing to have a letsencrypt-auto and a letsencrypt_auto right next to each other, we rename this folder.
2016-01-08 16:26:25 -05:00
Renamed from letsencrypt_auto/letsencrypt-auto.template (Browse further)