Commit Graph
4213 Commits
Author SHA1 Message Date
Erik Rose e6cece580d Document le-auto env vars. 2016-01-05 15:39:34 -05:00
Erik Rose 7e04f52b90 Add built letsencrypt-auto.
We're going to keep the built artifact in the tree as per https://github.com/letsencrypt/letsencrypt/issues/1572#issuecomment-161379131 so that...

1. People's current behavior of cloning from git and running the le-auto script still works.
2. We don't have a deprecation timeline and process to babysit.

We'll enforce its up-to-dateness with a test.
2016-01-05 15:31:54 -05:00
Erik Rose d9cde2b9d3 Get the first end-to-end test of letsencrypt-auto passing.
To run it, cd letsencrypt_auto && ./build.py && docker build -t lea . && docker run --rm -t -i lea

So as not to depend on the state of the host machine, the test runs within an Ubuntu Docker image. This lets us sidestep interaction challenges by setting up passwordless sudo. It also lets us insert our own local CA for the mock HTTPS server. (openssl's SSL_CERT_FILE env var replaces rather than adds to the accepted CAs, meaning later connections to PyPI within the same process chain fail. SSL_CERT_DIR seems not to work at all on OS X.) This also demonstrates a way to test across various Linux distros, even within Travis if we like,

Also...

* Switch to an official release of ConfigArgParse.
* Don't redundantly re-bootstrap on --no-self-upgrade (that is, phase 2).
2016-01-05 15:31:45 -05:00
Erik Rose 0c4a7bb3bc Make le-auto pull the requisite things from env vars so we can run against test servers.
This should let us create a harness that won't force us to mess with GitHub or PyPI just to test.

(I haven't tried this commit yet, but you can if you want to get a head start on testing.)
2015-12-10 14:04:39 -05:00
Erik Rose 8b2c5cbec7 Update LE package pins to 0.1.0, the public beta. 2015-12-04 17:27:37 -05:00
Erik Rose 1da5e472b8 Put quotes around variables that might contain spaces.
Bourne does the dumb thing when substituting vars; this helps that. Bash does the smart thing but is unhurt by this.

We don't do it to $SUDO because Bourne takes "" as a command rather than a no-op, and we don't want the SUDO= case to generate command-not-found errors.
2015-12-04 14:30:14 -05:00
Erik Rose 6db54e21f6 Correct length of dividers. 2015-12-03 19:21:35 -05:00
Erik Rose 4a44c46c60 Add a header for peep errors...
...since the shell's collected output is such a line-break-lacking mess.
2015-12-03 19:21:35 -05:00
Erik Rose 4bcd594234 Put off rm-ing the venv for as long as possible, since it triggers a re-bootstrap.
If DeterminePythonVersion has an error, we shouldn't re-bootstrap.
2015-12-03 19:21:34 -05:00
Erik Rose 55a52d1b96 "none" is clearer than "0.0.0" as a sentinel value. 2015-12-03 19:21:34 -05:00
Erik Rose 5cc69d92e7 In Phase 1, download a new letsencrypt-auto script only if necessary.
* Temp dir creation is now always done in shell.
* Split download_upgrade.py into 2 phases itself so we can have it report back the latest LE version and make a decision based on it before doing and major downloading. Rename it for clarity.
2015-12-03 19:21:34 -05:00
Erik Rose 46779da3b5 In Phase 2, recreate a venv and reinstall Python packages only if necessary.
* Teach the build script how to do special vars. Factor up file reading.
* Use a static string for the PyPI JSON location, as it will soon be overrideable via an env var for testing.
2015-12-03 19:21:34 -05:00
Erik Rose 02255fa024 Upgrade peep to 2.5, for compatibility with pip 7.x. 2015-12-02 22:38:48 -05:00
Erik Rose be6c34de32 Make --no-self-upgrade public.
This replaces --_skip-to-install and is suitable for people who have audited letsencrypt-auto and wish to run it as is, without upgrading to the latest version.

Also...
* rm temp dirs when done. No longer reuse a single temp dir across phases so the user doesn't have to pass a temp dir with --no-self-upgrade as phase 1 itself used to.
* Swap stanzas in the big "if" so we aren't testing negatives all the time.
* Fix a bug in which we ran peep with $LE_PYTHON rather than the python in the venv.
* Bootstrap only if it looks like we never got to the point of making a venv before.
* Move venv creation into Phase 2. Besides the practical benefit of ensuring there's a venv if a user passes --no-self-upgrade, this has the philosophical advantage of making Phase 1 more minimal, giving us more latitude to change behavior in updates.
2015-12-02 17:56:39 -05:00
Erik Rose 5bae8e0ac1 Install not only LE's dependencies but LE itself. 2015-12-02 17:48:59 -05:00
Erik Rose fc52608b40 Rewrap some comments. 2015-12-02 16:37:42 -05:00
Erik Rose 4a69584a84 Standardize semicolon use. 2015-12-02 16:08:28 -05:00
Erik Rose 346ec588b4 Add visual separators between language changes.
On his first time auditing, pde thought this would help.
2015-12-02 15:00:04 -05:00
Erik Rose a1b26262a2 Print the final letsencrypt invocation before doing it.
People like to know what they're sudo-ing.
2015-12-02 14:53:33 -05:00
Erik Rose 3f0bcb5c9a Add real requirements, suitable as of ab9051ff09 on master. 2015-12-02 14:43:26 -05:00
Erik Rose 9d6cbea5ce Fix some errors.
Use the correct Python interpreter. Fix a syntax error. Fix a missing import.
2015-12-02 11:41:49 -05:00
Erik Rose f9d1de6179 Remove test signature, which I shouldn't have committed. 2015-12-02 11:40:30 -05:00
Erik Rose 66436c5255 le-auto now doesn't trigger sh syntax errors when run. 2015-12-02 11:13:23 -05:00
Erik Rose cdd855c745 Add build script for letsencrypt-auto.
Change template language to reference files, saving me some boilerplate over the dict-based .format() thing I originally had in mind.

Put newlines at the ends of bootstrap scripts. It makes the built le-auto script prettier.
2015-12-02 11:13:23 -05:00
Erik Rose ec9a498622 Move OS-package bootstrappers to a private folder.
They're now used only by the le-auto build process. The new public interface for OS-level bootstrapping is le-auto --os-packages-only, which dispatches by OS automatically. That obsoletes install-deps.sh as well, saving some repetition.

Also, switch to mustache-style templating to avoid colliding with shell variable references.

To optimize for the docker cache, we could later add a shim script that sources just deb_common.sh and calls its bootstrap function.
2015-12-02 11:12:57 -05:00
Erik Rose 4abe7ab93d Merge master in to get up to date. 2015-12-02 00:53:09 -05:00
Erik Rose e3ace6f84c Split large independent scripts off from the main body of the proof-of-concept script. Integrate the bits of the old le-auto script that are still useful.
This makes the script more readable and easier to work on. We'll stitch it together with a build process.

Also, stop passing the sudo command as an arg to the experimental bootstrappers. They will be inlined into the main script and can just reference $SUDO. As a result, stop recommending devs run the scripts manually, instead running le-auto --os-packages-only. This has the nice side effect of making dev documentation simpler.

Name the folder "letsencrypt_auto" rather than "letsencrypt-auto" because git yield endless pain when replacing a file with a dir. Perhaps we can change it with impunity in a latter commit.
2015-12-02 00:48:18 -05:00
Peter Eckersley 8168bfe70d Merge pull request #1656 from letsencrypt/update-release-sigs
Update release sigs
2015-12-01 19:38:49 -08:00
Peter Eckersley 2b2d910cd0 Merge pull request #1654 from letsencrypt/webroot
Webroot
2015-12-01 19:29:26 -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 02d93e995a lint 2015-12-01 19:24:14 -08:00
bmw a02898749a Merge pull request #1633 from letsencrypt/error-verbosity
Reduce verbosity of error tracebacks
2015-12-01 19:20:48 -08:00
Peter Eckersley a191daf3ee Merge pull request #1597 from lbeltrame/fix-webroot-permissions
Fix webroot permissions [mergeable, but enhancements also requested]
2015-12-01 19:07:06 -08:00
Peter Eckersley 50e0815fb3 Merge pull request #1653 from letsencrypt/ancient-python
Make the ancient python error more friendly
2015-12-01 18:38:47 -08:00
bmw 8e71046986 Merge pull request #1594 from letsencrypt/webroot
Support multiple webroot paths
2015-12-01 18:32:01 -08:00
Peter Eckersley cf807eaf60 Make the ancient python error more friendly 2015-12-01 18:22:05 -08:00
Peter Eckersley 549dc2c2f5 Merge pull request #1652 from letsencrypt/readme
Readme.rst updates
2015-12-01 18:18:57 -08:00
Peter Eckersley 6a46eff84e Merge pull request #1519 from Aeyoun/patch-1
Test dnf before yum
2015-12-01 18:15:26 -08:00
Peter Eckersley 1a4dd56f71 Address review comments
(sometimes less less is more)
2015-12-01 18:13:38 -08:00
bmw c760d84ccb Merge pull request #1582 from SwartzCr/vhost
prevent files from being left in apache sites-available issue 808
2015-12-01 18:10:19 -08:00
Peter Eckersley e27e891615 nginx detail 2015-12-01 17:50:46 -08:00
Peter Eckersley 49efc489fc fixes 2015-12-01 17:49:49 -08:00
Peter Eckersley f15c4125d3 More-or-less-final README.rst 2015-12-01 17:39:33 -08:00
Peter Eckersley f4dd660403 Oops!
- Finish a partial commit, providing what are perhaps excessively detailed and
  mystical errors in improbable cases.
2015-12-01 16:50:39 -08:00
Peter Eckersley 06e273413b Fix nits and address review comments 2015-12-01 16:33:35 -08:00
Noah Swartz ec28094ae2 added test for new temp elif 2015-12-01 16:28:15 -08:00
Peter Eckersley a7377fc485 Merge pull request #1527 from Aeyoun/patch-3
Add missing RPM requirement
2015-12-01 16:12:31 -08:00
Peter Eckersley 0561376d12 Merge pull request #1639 from letsencrypt/no-init-scripts
Don't use Apache init scripts
2015-12-01 15:35:52 -08:00
Peter Eckersley 0b7552ef8b Begin cleaning up README.md 2015-12-01 15:16:17 -08:00