New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update letsencrypt-auto with CentOS6 SCL for python 2.7 #1172
Closed
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
|
||
# Tested with: | ||
# - CentOS 6.7 (x64) | ||
|
||
|
||
if [ `lsb_release -rs | cut -f1 -d.` -eq 6 ] | ||
then | ||
# Setup SCL Repo - https://wiki.centos.org/AdditionalResources/Repositories/SCL | ||
yum -y install centos-release-SCL | ||
|
||
# Now install Deps | ||
yum -y install \ | ||
git-core \ | ||
python27 \ | ||
python27-python-devel \ | ||
python27-python-virtualenv \ | ||
gcc \ | ||
dialog \ | ||
augeas-libs \ | ||
openssl-devel \ | ||
libffi-devel \ | ||
ca-certificates | ||
|
||
else | ||
source $BOOTSTRAP/_rpm_common.sh | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
letsencrypt-auto should call the wrapped command rather than asking user to copy paste it and run themselves
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I agree, however I couldn't figure it out.
My original go had
$SUDO $SCL $VENV_BIN/letsencrypt "$@"
(i.e. without the echo) but it fails. I tried escaping the quotes but to no avail.$SCL
sets up the correct python ENV variables but something goes amiss when called in the script with SUDO... works fine if the user copy/paste.Any idea on what I'm missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun times. Try this:
The theory is that the double escapes protect the quotes through the current shell, and the sudo layer, reconstructing them for the scl command. I don't have a Centos system to test on, but I tested in with a shell script that tries to run an analogous command through
sudo bash -c \\"$@\\"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe if people use
"$@"
rather than$@
it should be$SUDO $SCL \\"$VENV_BIN/letsencrypt "$@"\\"
, though I think that just defers expansion of shell arguments until further down the stack?