From 8652435d8a5e05975810991a45f25e42223fe182 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Thu, 8 Mar 2018 18:53:21 +0100 Subject: [PATCH 1/5] [fix] Remove warning from equivs --- data/helpers.d/package | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/helpers.d/package b/data/helpers.d/package index c616105d1..870147f2e 100644 --- a/data/helpers.d/package +++ b/data/helpers.d/package @@ -97,6 +97,10 @@ ynh_package_install_from_equivs () { # Build and install the package local TMPDIR=$(mktemp -d) + + # Force the compatibility level at 10, levels below are deprecated + echo 10 > /usr/share/equivs/template/debian/compat + # Note that the cd executes into a sub shell # Create a fake deb package with equivs-build and the given control file # Install the fake package without its dependencies with dpkg From 0f8cef9cf843d30fdfcda93642a66b4d35fdcbb1 Mon Sep 17 00:00:00 2001 From: Josue-T Date: Thu, 10 May 2018 00:05:46 +0200 Subject: [PATCH 2/5] Helper - improve ynh_add_nginx_config Add 2 new features : - Permit to replace some others variables in the template - Manage automatically the redirection (alias_transversal issue fix) --- data/helpers.d/backend | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/data/helpers.d/backend b/data/helpers.d/backend index 28c5b8e91..a912cd337 100644 --- a/data/helpers.d/backend +++ b/data/helpers.d/backend @@ -117,7 +117,10 @@ ynh_remove_systemd_config () { # Create a dedicated nginx config # -# usage: ynh_add_nginx_config +# usage: ynh_add_nginx_config "list of others variables to replace" +# +# | arg: list of others variables to replace separeted by a space +# | for example : 'path_2 port_2 ...' # # This will use a template in ../conf/nginx.conf # __PATH__ by $path_url @@ -126,8 +129,13 @@ ynh_remove_systemd_config () { # __NAME__ by $app # __FINALPATH__ by $final_path # +# And dynamic variables (from the last example) : +# __PATH_2__ by $path_2 +# __PORT_2__ by $port_2 +# ynh_add_nginx_config () { - finalnginxconf="/etc/nginx/conf.d/$domain.d/$app.conf" + local finalnginxconf="/etc/nginx/conf.d/$domain.d/$app.conf" + local others_var=${1:-} ynh_backup_if_checksum_is_different "$finalnginxconf" sudo cp ../conf/nginx.conf "$finalnginxconf" @@ -151,6 +159,18 @@ ynh_add_nginx_config () { if test -n "${final_path:-}"; then ynh_replace_string "__FINALPATH__" "$final_path" "$finalnginxconf" fi + + # Replace all other variable given as arguments + for v in $others_var + do + ynh_replace_string "__${v^^}__" "${!v}" "$finalnginxconf" + done + + if [ "${path_url:-}" != "/" ] + then + ynh_replace_string "^#sub_path_only" "" "$finalnginxconf" + fi + ynh_store_file_checksum "$finalnginxconf" sudo systemctl reload nginx From 1f6a7b2ee59a6f901ca053fb7b749da6dbb72781 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Fri, 11 May 2018 16:52:28 +0200 Subject: [PATCH 3/5] [fix] Untrusted TLS connection established to --- data/templates/postfix/main.cf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/templates/postfix/main.cf b/data/templates/postfix/main.cf index bdd364250..b96bb4860 100644 --- a/data/templates/postfix/main.cf +++ b/data/templates/postfix/main.cf @@ -45,6 +45,10 @@ smtp_tls_exclude_ciphers = $smtpd_tls_exclude_ciphers smtp_tls_mandatory_ciphers= $smtpd_tls_mandatory_ciphers smtp_tls_loglevel=1 +# Fix "Untrusted TLS connection established to" message in log +smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt +smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt + # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for # information on enabling SSL in the smtp client. From 82b598b5ca33b5230c1f509767ecd87191a3565a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sat, 12 May 2018 21:31:12 +0200 Subject: [PATCH 4/5] Fix from comment PR #462 --- data/helpers.d/backend | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/data/helpers.d/backend b/data/helpers.d/backend index a912cd337..8dce2df06 100644 --- a/data/helpers.d/backend +++ b/data/helpers.d/backend @@ -134,7 +134,7 @@ ynh_remove_systemd_config () { # __PORT_2__ by $port_2 # ynh_add_nginx_config () { - local finalnginxconf="/etc/nginx/conf.d/$domain.d/$app.conf" + finalnginxconf="/etc/nginx/conf.d/$domain.d/$app.conf" local others_var=${1:-} ynh_backup_if_checksum_is_different "$finalnginxconf" sudo cp ../conf/nginx.conf "$finalnginxconf" @@ -161,14 +161,18 @@ ynh_add_nginx_config () { fi # Replace all other variable given as arguments - for v in $others_var + for var_to_replace in $others_var do - ynh_replace_string "__${v^^}__" "${!v}" "$finalnginxconf" + # ${var_to_replace^^} make the content of the variable on upper-cases + # ${!var_to_replace} get the content of the variable named $var_to_replace + ynh_replace_string "__${var_to_replace^^}__" "${!var_to_replace}" "$finalnginxconf" done if [ "${path_url:-}" != "/" ] then ynh_replace_string "^#sub_path_only" "" "$finalnginxconf" + else + ynh_replace_string "^#root_path_only" "" "$finalnginxconf" fi ynh_store_file_checksum "$finalnginxconf" From 6461b3ec111de5d5c3b1f1ee8348dca5af88d79b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 15 May 2018 17:52:49 +0200 Subject: [PATCH 5/5] Update comment about certificates --- data/templates/postfix/main.cf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/templates/postfix/main.cf b/data/templates/postfix/main.cf index b96bb4860..7d7589c66 100644 --- a/data/templates/postfix/main.cf +++ b/data/templates/postfix/main.cf @@ -45,7 +45,8 @@ smtp_tls_exclude_ciphers = $smtpd_tls_exclude_ciphers smtp_tls_mandatory_ciphers= $smtpd_tls_mandatory_ciphers smtp_tls_loglevel=1 -# Fix "Untrusted TLS connection established to" message in log +# Configure Root CA certificates +# (for example, avoids getting "Untrusted TLS connection established to" messages in logs) smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt