From a6a1cc7ae0a27a8e29445f3cc64bdc3f11885e0d Mon Sep 17 00:00:00 2001 From: barrybingo Date: Fri, 19 Jan 2018 17:00:44 +0000 Subject: [PATCH 1/5] Reduce munin-node log level to warning (#1330) --- CHANGELOG.md | 6 ++++++ setup/munin.sh | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87498c92a..6df79d43f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ CHANGELOG ========= +In Development +-------------- + +* Reduce munin-node.conf log_level to warning(1) as default ubuntu package uses log_level debug(4) which over time creates big log files. + + v0.26 (January 18, 2018) ------------------------ diff --git a/setup/munin.sh b/setup/munin.sh index b1c5c8ba9..c812dab20 100755 --- a/setup/munin.sh +++ b/setup/munin.sh @@ -38,8 +38,10 @@ chown munin. /var/log/munin/munin-cgi-html.log chown munin. /var/log/munin/munin-cgi-graph.log # ensure munin-node knows the name of this machine +# and reduce logging level to warning tools/editconf.py /etc/munin/munin-node.conf -s \ - host_name=$PRIMARY_HOSTNAME + host_name=$PRIMARY_HOSTNAME \ + log_level=1 # Update the activated plugins through munin's autoconfiguration. munin-node-configure --shell --remove-also 2>/dev/null | sh From 8d6d84d87f4b820ebb23d917b2c1127ee662f1f1 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Sat, 20 Jan 2018 10:54:56 -0500 Subject: [PATCH 2/5] run mailconfig.py's email address validator outside of the virtualenv during questions.sh We don't have the virtualenv this early in setup. Broken by 0088fb45533b349e47c7f04e95a618862735ddf1. Fixes #1326. See https://discourse.mailinabox.email/t/that-is-not-a-valid-email-error-during-mailinabox-installation/2793. --- management/mailconfig.py | 9 +++++++++ setup/questions.sh | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/management/mailconfig.py b/management/mailconfig.py index fc75e1ab7..82c922e4a 100755 --- a/management/mailconfig.py +++ b/management/mailconfig.py @@ -1,5 +1,14 @@ #!/usr/local/lib/mailinabox/env/bin/python +# NOTE: +# This script is run both using the system-wide Python 3 +# interpreter (/usr/bin/python3) as well as through the +# virtualenv (/usr/local/lib/mailinabox/env). So only +# import packages at the top level of this script that +# are installed in *both* contexts. We use the system-wide +# Python 3 in setup/questions.sh to validate the email +# address entered by the user. + import subprocess, shutil, os, sqlite3, re import utils from email_validator import validate_email as validate_email_, EmailNotValidError diff --git a/setup/questions.sh b/setup/questions.sh index 57da5c927..3d227d815 100644 --- a/setup/questions.sh +++ b/setup/questions.sh @@ -12,7 +12,9 @@ if [ -z "$NONINTERACTIVE" ]; then apt_get_quiet install dialog python3 python3-pip || exit 1 fi - # email_validator is repeated in setup/management.sh + # Installing email_validator is repeated in setup/management.sh, but in setup/management.sh + # we install it inside a virtualenv. In this script, we don't have the virtualenv yet + # so we install the python package globally. hide_output pip3 install "email_validator>=1.0.0" || exit 1 message_box "Mail-in-a-Box Installation" \ @@ -49,7 +51,7 @@ you really want. # user hit ESC/cancel exit fi - while ! management/mailconfig.py validate-email "$EMAIL_ADDR" + while ! python3 management/mailconfig.py validate-email "$EMAIL_ADDR" do input_box "Your Email Address" \ "That's not a valid email address.\n\nWhat email address are you setting this box up to manage?" \ From e7150e3bc61390b71661d812bbbd7242bf7ee422 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Sat, 20 Jan 2018 11:23:45 -0500 Subject: [PATCH 3/5] pin acme to v0.20, which is the last version compatible with free_tls_certificates free_tls_certificates uses acme.jose, which in acme v0.21 was moved to a new Python package. See #1328 --- setup/management.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/management.sh b/setup/management.sh index 468e06a96..e3b3ec06f 100755 --- a/setup/management.sh +++ b/setup/management.sh @@ -59,7 +59,7 @@ hide_output $venv/bin/pip install --upgrade setuptools hide_output $venv/bin/pip install --upgrade \ rtyaml "email_validator>=1.0.0" "free_tls_certificates>=0.1.3" "exclusiveprocess" \ flask dnspython python-dateutil \ - "idna>=2.0.0" "cryptography>=1.0.2" acme boto psutil + "idna>=2.0.0" "cryptography>=1.0.2" "acme==0.20.0" boto psutil # CONFIGURATION From 8c69b9e26135f21620f728fce0b69a4eafd26bc4 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Thu, 25 Jan 2018 09:23:04 -0500 Subject: [PATCH 4/5] update CHANGELOG --- CHANGELOG.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6df79d43f..8560e1738 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,9 @@ CHANGELOG In Development -------------- -* Reduce munin-node.conf log_level to warning(1) as default ubuntu package uses log_level debug(4) which over time creates big log files. - +* Fix new installations which broke at the step of asking for the user's desired email address, which was broken by v0.26's changes related to the control panel. +* Fix the provisioning of TLS certificates by pinning a Python package we rely on (acme) to an earlier version because our code isn't yet compatible with its current version. +* Reduce munin's log_level from debug to warning to prevent massive log files. v0.26 (January 18, 2018) ------------------------ @@ -30,7 +31,7 @@ Installer: * We now run `apt-get autoremove` at the start of setup to clear out old packages, especially old kernels that take up a lot of space. On the first run, this step may take a long time. * We now fetch Z-Push from its tagged git repository, fixing an installation problem. * Some old PHP5 packages are removed from setup, fixing an installation bug where Apache would get installed. -* Python 3 packages for the control panel are now installed using a virtualenv to prevent installation errors. +* Python 3 packages for the control panel are now installed using a virtualenv to prevent installation errors due to conflicts in the cryptography/openssl packages between OS-installed packages and pip-installed packages. v0.25 (November 15, 2017) ------------------------- From ec3aab0eaa195231de567c34e9bb0bb0929b4c48 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Thu, 25 Jan 2018 09:26:35 -0500 Subject: [PATCH 5/5] v0.26b --- CHANGELOG.md | 4 ++-- README.md | 4 ++-- setup/bootstrap.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8560e1738..9d0e757c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ CHANGELOG ========= -In Development --------------- +v0.26b (January 25, 2018) +------------------------- * Fix new installations which broke at the step of asking for the user's desired email address, which was broken by v0.26's changes related to the control panel. * Fix the provisioning of TLS certificates by pinning a Python package we rely on (acme) to an earlier version because our code isn't yet compatible with its current version. diff --git a/README.md b/README.md index 0385ae02d..d24ecfcee 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ by me: $ curl -s https://keybase.io/joshdata/key.asc | gpg --import gpg: key C10BDD81: public key "Joshua Tauberer " imported - $ git verify-tag v0.26 + $ git verify-tag v0.26b gpg: Signature made ..... using RSA key ID C10BDD81 gpg: Good signature from "Joshua Tauberer " gpg: WARNING: This key is not certified with a trusted signature! @@ -72,7 +72,7 @@ and on my [personal homepage](https://razor.occams.info/). (Of course, if this r Checkout the tag corresponding to the most recent release: - $ git checkout v0.26 + $ git checkout v0.26b Begin the installation. diff --git a/setup/bootstrap.sh b/setup/bootstrap.sh index 12c25f20c..84dae634c 100644 --- a/setup/bootstrap.sh +++ b/setup/bootstrap.sh @@ -7,7 +7,7 @@ ######################################################### if [ -z "$TAG" ]; then - TAG=v0.26 + TAG=v0.26b fi # Are we running as root?