From 33f1c301924cc6b5c022bf8c9113b04290d2da0a Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 22 Sep 2015 16:49:07 -0700 Subject: [PATCH 1/8] Updated a2enmod.sh --- .../configurators/apache/a2enmod.sh | 34 +++++-------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh b/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh index f822a1f7b..0a8ade4c2 100755 --- a/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh +++ b/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh @@ -3,31 +3,15 @@ # httpd docker image. First argument is the server_root and the second is the # module to be enabled. -APACHE_CONFDIR=$1 +confdir=$1 +module=$2 -enable () { - echo "LoadModule "$1"_module /usr/local/apache2/modules/mod_"$1".so" >> \ - $APACHE_CONFDIR"/test.conf" - available_base="/mods-available/"$1".conf" - available_conf=$APACHE_CONFDIR$available_base - enabled_dir=$APACHE_CONFDIR"/mods-enabled" - enabled_conf=$enabled_dir"/"$1".conf" - if [ -e "$available_conf" -a -d "$enabled_dir" -a ! -e "$enabled_conf" ] - then - ln -s "..$available_base" $enabled_conf - fi -} - -if [ $2 == "ssl" ] +echo "LoadModule ${module}_module " \ + "/usr/local/apache2/modules/mod_${module}.so" >> "${confdir}/test.conf" +available_conf=$APACHE_CONFDIR"/mods-available/${module}.conf" +enabled_dir=$APACHE_CONFDIR"/mods-enabled" +enabled_conf=$enabled_dir"/"$1".conf" +if [ -e "$available_conf" -a -d "$enabled_dir" -a ! -e "$enabled_conf" ] then - # Enables ssl and all its dependencies - enable "setenvif" - enable "mime" - enable "socache_shmcb" - enable "ssl" -elif [ $2 == "rewrite" ] -then - enable "rewrite" -else - exit 1 + ln -s "..$available_base" $enabled_conf fi From d1ee8311379dd1c102ed54ed1ae827b527cd255f Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Fri, 9 Oct 2015 16:55:34 -0700 Subject: [PATCH 2/8] Fixed version string --- letsencrypt-compatibility-test/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/letsencrypt-compatibility-test/setup.py b/letsencrypt-compatibility-test/setup.py index 2e70fd1d7..5a54239dd 100644 --- a/letsencrypt-compatibility-test/setup.py +++ b/letsencrypt-compatibility-test/setup.py @@ -4,7 +4,7 @@ from setuptools import setup from setuptools import find_packages -version = '0.1.0.dev0' +version = '0.0.0.dev20151008' install_requires = [ 'letsencrypt=={0}'.format(version), From ecf82c4bcf3c3e37ab8ba5746cd3902541d6a9e3 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Fri, 9 Oct 2015 16:56:28 -0700 Subject: [PATCH 3/8] Add 'strict_permissions' when creating config --- .../letsencrypt_compatibility_test/util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/letsencrypt-compatibility-test/letsencrypt_compatibility_test/util.py b/letsencrypt-compatibility-test/letsencrypt_compatibility_test/util.py index 6181da16b..816f04398 100644 --- a/letsencrypt-compatibility-test/letsencrypt_compatibility_test/util.py +++ b/letsencrypt-compatibility-test/letsencrypt_compatibility_test/util.py @@ -25,6 +25,7 @@ IP_REGEX = re.compile(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$") def create_le_config(parent_dir): """Sets up LE dirs in parent_dir and returns the config dict""" config = copy.deepcopy(constants.CLI_DEFAULTS) + config["strict_permissions"] = False le_dir = os.path.join(parent_dir, "letsencrypt") config["config_dir"] = os.path.join(le_dir, "config") From 4c73db9aa1c792a831599a69fa6991a636ef501b Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Sun, 11 Oct 2015 10:34:32 -0700 Subject: [PATCH 4/8] Revert "Fixed version string" This reverts commit d1ee8311379dd1c102ed54ed1ae827b527cd255f. --- letsencrypt-compatibility-test/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/letsencrypt-compatibility-test/setup.py b/letsencrypt-compatibility-test/setup.py index 5a54239dd..2e70fd1d7 100644 --- a/letsencrypt-compatibility-test/setup.py +++ b/letsencrypt-compatibility-test/setup.py @@ -4,7 +4,7 @@ from setuptools import setup from setuptools import find_packages -version = '0.0.0.dev20151008' +version = '0.1.0.dev0' install_requires = [ 'letsencrypt=={0}'.format(version), From 90f3b26bcff975f87a26357659543b69dad2492f Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Sun, 11 Oct 2015 17:29:19 -0700 Subject: [PATCH 5/8] Fixed a2enmod --- .../configurators/apache/a2enmod.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh b/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh index 0a8ade4c2..60a62407a 100755 --- a/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh +++ b/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh @@ -1,6 +1,6 @@ #!/bin/bash # An extremely simplified version of `a2enmod` for enabling modules in the -# httpd docker image. First argument is the server_root and the second is the +# httpd docker image. First argument is the ServerRoot and the second is the # module to be enabled. confdir=$1 @@ -8,10 +8,11 @@ module=$2 echo "LoadModule ${module}_module " \ "/usr/local/apache2/modules/mod_${module}.so" >> "${confdir}/test.conf" -available_conf=$APACHE_CONFDIR"/mods-available/${module}.conf" -enabled_dir=$APACHE_CONFDIR"/mods-enabled" -enabled_conf=$enabled_dir"/"$1".conf" -if [ -e "$available_conf" -a -d "$enabled_dir" -a ! -e "$enabled_conf" ] +availbase="/mods-available/${module}.conf" +availconf=$confdir$availbase +enabldir="$confdir/mods-enabled" +enablconf="$enabldir/${module}.conf" +if [ -e $availconf -a -d $enabldir -a ! -e $enablconf ] then - ln -s "..$available_base" $enabled_conf + ln -s "..$availbase" $enablconf fi From 9c59b5089408e9e93d5436def0f747a8202ee913 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Sun, 11 Oct 2015 17:33:00 -0700 Subject: [PATCH 6/8] Reverted incorrect change from 18adec0 --- .../letsencrypt_compatibility_test/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/letsencrypt-compatibility-test/letsencrypt_compatibility_test/util.py b/letsencrypt-compatibility-test/letsencrypt_compatibility_test/util.py index 816f04398..dd4fd3b48 100644 --- a/letsencrypt-compatibility-test/letsencrypt_compatibility_test/util.py +++ b/letsencrypt-compatibility-test/letsencrypt_compatibility_test/util.py @@ -40,7 +40,7 @@ def create_le_config(parent_dir): def extract_configs(configs, parent_dir): """Extracts configs to a new dir under parent_dir and returns it""" - config_dir = os.path.join(parent_dir, "renewal") + config_dir = os.path.join(parent_dir, "configs") if os.path.isdir(configs): shutil.copytree(configs, config_dir, symlinks=True) From 67ee9bf930b95c9975920a6f3079d336bbfc5520 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Mon, 12 Oct 2015 10:00:35 -0700 Subject: [PATCH 7/8] Added 'strict_permissions' to constants.py --- .../letsencrypt_compatibility_test/util.py | 1 - letsencrypt/constants.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/letsencrypt-compatibility-test/letsencrypt_compatibility_test/util.py b/letsencrypt-compatibility-test/letsencrypt_compatibility_test/util.py index dd4fd3b48..43070cf03 100644 --- a/letsencrypt-compatibility-test/letsencrypt_compatibility_test/util.py +++ b/letsencrypt-compatibility-test/letsencrypt_compatibility_test/util.py @@ -25,7 +25,6 @@ IP_REGEX = re.compile(r"^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$") def create_le_config(parent_dir): """Sets up LE dirs in parent_dir and returns the config dict""" config = copy.deepcopy(constants.CLI_DEFAULTS) - config["strict_permissions"] = False le_dir = os.path.join(parent_dir, "letsencrypt") config["config_dir"] = os.path.join(le_dir, "config") diff --git a/letsencrypt/constants.py b/letsencrypt/constants.py index 762409d25..362009ec6 100644 --- a/letsencrypt/constants.py +++ b/letsencrypt/constants.py @@ -27,6 +27,7 @@ CLI_DEFAULTS = dict( auth_cert_path="./cert.pem", auth_chain_path="./chain.pem", + strict_permissions=False, ) """Defaults for CLI flags and `.IConfig` attributes.""" From 7defdb18193500cfb287bde092a089c087887b33 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Mon, 12 Oct 2015 10:08:35 -0700 Subject: [PATCH 8/8] Updated a2enmod comments --- .../configurators/apache/a2enmod.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh b/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh index 60a62407a..4da9288a2 100755 --- a/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh +++ b/letsencrypt-compatibility-test/letsencrypt_compatibility_test/configurators/apache/a2enmod.sh @@ -1,7 +1,7 @@ #!/bin/bash # An extremely simplified version of `a2enmod` for enabling modules in the -# httpd docker image. First argument is the ServerRoot and the second is the -# module to be enabled. +# httpd docker image. First argument is the Apache ServerRoot which should be +# an absolute path. The second is the module to be enabled, such as `ssl`. confdir=$1 module=$2