mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 03:41:53 +02:00
Merge remote-tracking branch 'origin/master' into amazonlinux
This commit is contained in:
+6
-4
@@ -2,11 +2,12 @@ language: python
|
||||
|
||||
services:
|
||||
- rabbitmq
|
||||
- mariadb
|
||||
|
||||
# http://docs.travis-ci.com/user/ci-environment/#CI-environment-OS
|
||||
# gimme has to be kept in sync with Boulder's Go version setting in .travis.yml
|
||||
before_install:
|
||||
- sudo apt-get install -y mariadb-server mariadb-server-10.0
|
||||
- 'dpkg -s libaugeas0'
|
||||
- '[ "xxx$BOULDER_INTEGRATION" = "xxx" ] || eval "$(gimme 1.5.1)"'
|
||||
|
||||
# using separate envs with different TOXENVs creates 4x1 Travis build
|
||||
@@ -31,9 +32,8 @@ branches:
|
||||
- master
|
||||
- /^test-.*$/
|
||||
|
||||
# enable Trusty beta on travis
|
||||
sudo: required
|
||||
dist: trusty
|
||||
# container-based infrastructure
|
||||
sudo: false
|
||||
|
||||
addons:
|
||||
# make sure simplehttp simple verification works (custom /etc/hosts)
|
||||
@@ -41,6 +41,8 @@ addons:
|
||||
- le.wtf
|
||||
mariadb: "10.0"
|
||||
apt:
|
||||
sources:
|
||||
- augeas
|
||||
packages: # keep in sync with bootstrap/ubuntu.sh and Boulder
|
||||
- python
|
||||
- python-dev
|
||||
|
||||
@@ -176,5 +176,5 @@ PS384 = JWASignature.register(_JWAPS('PS384', hashes.SHA384))
|
||||
PS512 = JWASignature.register(_JWAPS('PS512', hashes.SHA512))
|
||||
|
||||
ES256 = JWASignature.register(_JWAES('ES256'))
|
||||
ES256 = JWASignature.register(_JWAES('ES384'))
|
||||
ES256 = JWASignature.register(_JWAES('ES512'))
|
||||
ES384 = JWASignature.register(_JWAES('ES384'))
|
||||
ES512 = JWASignature.register(_JWAES('ES512'))
|
||||
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
# SLE12 dont have python-virtualenv
|
||||
|
||||
zypper -nq in -l git-core \
|
||||
python \
|
||||
python-devel \
|
||||
python-virtualenv \
|
||||
gcc \
|
||||
dialog \
|
||||
augeas-lenses \
|
||||
libopenssl-devel \
|
||||
libffi-devel \
|
||||
ca-certificates \
|
||||
@@ -29,6 +29,9 @@ elif [ -f /etc/gentoo-release ] ; then
|
||||
elif uname | grep -iq FreeBSD ; then
|
||||
echo "Bootstrapping dependencies for FreeBSD..."
|
||||
$SUDO $BOOTSTRAP/freebsd.sh
|
||||
elif `grep -qs openSUSE /etc/os-release` ; then
|
||||
echo "Bootstrapping dependencies for openSUSE.."
|
||||
$SUDO $BOOTSTRAP/suse.sh
|
||||
elif uname | grep -iq Darwin ; then
|
||||
echo "Bootstrapping dependencies for Mac OS X..."
|
||||
echo "WARNING: Mac support is very experimental at present..."
|
||||
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
_suse_common.sh
|
||||
@@ -110,6 +110,9 @@ then
|
||||
elif [ -f /etc/redhat-release ] ; then
|
||||
echo "Bootstrapping dependencies for RedHat-based OSes..."
|
||||
$SUDO $BOOTSTRAP/_rpm_common.sh
|
||||
elif `grep -q openSUSE /etc/os-release` ; then
|
||||
echo "Bootstrapping dependencies for openSUSE-based OSes..."
|
||||
$SUDO $BOOTSTRAP/_suse_common.sh
|
||||
elif [ -f /etc/arch-release ] ; then
|
||||
echo "Bootstrapping dependencies for Archlinux..."
|
||||
$SUDO $BOOTSTRAP/archlinux.sh
|
||||
|
||||
@@ -243,7 +243,8 @@ latex_elements = {
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
(master_doc, 'letsencrypt-compatibility-test.tex', u'letsencrypt-compatibility-test Documentation',
|
||||
(master_doc, 'letsencrypt-compatibility-test.tex',
|
||||
u'letsencrypt-compatibility-test Documentation',
|
||||
u'Let\'s Encrypt Project', 'manual'),
|
||||
]
|
||||
|
||||
@@ -273,7 +274,8 @@ latex_documents = [
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
(master_doc, 'letsencrypt-compatibility-test', u'letsencrypt-compatibility-test Documentation',
|
||||
(master_doc, 'letsencrypt-compatibility-test',
|
||||
u'letsencrypt-compatibility-test Documentation',
|
||||
[author], 1)
|
||||
]
|
||||
|
||||
@@ -287,9 +289,10 @@ man_pages = [
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
(master_doc, 'letsencrypt-compatibility-test', u'letsencrypt-compatibility-test Documentation',
|
||||
author, 'letsencrypt-compatibility-test', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
(master_doc, 'letsencrypt-compatibility-test',
|
||||
u'letsencrypt-compatibility-test Documentation',
|
||||
author, 'letsencrypt-compatibility-test',
|
||||
'One line description of project.', 'Miscellaneous'),
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
@@ -309,6 +312,8 @@ intersphinx_mapping = {
|
||||
'python': ('https://docs.python.org/', None),
|
||||
'acme': ('https://acme-python.readthedocs.org/en/latest/', None),
|
||||
'letsencrypt': ('https://letsencrypt.readthedocs.org/en/latest/', None),
|
||||
'letsencrypt-apache': ('https://letsencrypt-apache.readthedocs.org/en/latest/', None),
|
||||
'letsencrypt-nginx': ('https://letsencrypt-nginx.readthedocs.org/en/latest/', None),
|
||||
'letsencrypt-apache': (
|
||||
'https://letsencrypt-apache.readthedocs.org/en/latest/', None),
|
||||
'letsencrypt-nginx': (
|
||||
'https://letsencrypt-nginx.readthedocs.org/en/latest/', None),
|
||||
}
|
||||
|
||||
@@ -107,6 +107,10 @@ class NginxConfigurator(common.Plugin):
|
||||
# This is called in determine_authenticator and determine_installer
|
||||
def prepare(self):
|
||||
"""Prepare the authenticator/installer."""
|
||||
# Verify Nginx is installed
|
||||
if not le_util.exe_exists(self.conf('ctl')):
|
||||
raise errors.NoInstallationError
|
||||
|
||||
self.parser = parser.NginxParser(
|
||||
self.conf('server-root'), self.mod_ssl_conf)
|
||||
|
||||
|
||||
@@ -99,8 +99,8 @@ class NginxDvsni(common.TLSSNI01):
|
||||
for key, body in main:
|
||||
if key == ['http']:
|
||||
found_bucket = False
|
||||
for key, _ in body:
|
||||
if key == bucket_directive[0]:
|
||||
for k, _ in body:
|
||||
if k == bucket_directive[0]:
|
||||
found_bucket = True
|
||||
if not found_bucket:
|
||||
body.insert(0, bucket_directive)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# pylint: disable=too-many-public-methods
|
||||
"""Test for letsencrypt_nginx.configurator."""
|
||||
import os
|
||||
import shutil
|
||||
@@ -29,6 +30,12 @@ class NginxConfiguratorTest(util.NginxTest):
|
||||
shutil.rmtree(self.config_dir)
|
||||
shutil.rmtree(self.work_dir)
|
||||
|
||||
@mock.patch("letsencrypt_nginx.configurator.le_util.exe_exists")
|
||||
def test_prepare_no_install(self, mock_exe_exists):
|
||||
mock_exe_exists.return_value = False
|
||||
self.assertRaises(
|
||||
errors.NoInstallationError, self.config.prepare)
|
||||
|
||||
def test_prepare(self):
|
||||
self.assertEquals((1, 6, 2), self.config.version)
|
||||
self.assertEquals(5, len(self.config.parser.parsed))
|
||||
|
||||
@@ -49,6 +49,10 @@ def get_nginx_configurator(
|
||||
|
||||
backups = os.path.join(work_dir, "backups")
|
||||
|
||||
with mock.patch("letsencrypt_nginx.configurator.le_util."
|
||||
"exe_exists") as mock_exe_exists:
|
||||
mock_exe_exists.return_value = True
|
||||
|
||||
config = configurator.NginxConfigurator(
|
||||
config=mock.MagicMock(
|
||||
nginx_server_root=config_path,
|
||||
|
||||
@@ -883,7 +883,6 @@ def prepare_and_parse_args(plugins, args):
|
||||
# parser (--help should display plugin-specific options last)
|
||||
_plugins_parsing(helpful, plugins)
|
||||
|
||||
|
||||
return helpful.parse_args()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user