diff --git a/debian/changelog b/debian/changelog index c96aa661..ce7abe07 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ fail2ban (0.11.1-2) UNRELEASED; urgency=medium * Do not rotate log if empty. Thanks to Ron Varburg for the patch (Closes: #956681) + * Add Environment="PYTHONNOUSERSITE=yes" to the service file to avoid + fail2ban to read /root/.local/. Thanks to Russell Coker for the + investigation (Closes: #956177) -- Sylvestre Ledru Tue, 14 Apr 2020 11:44:23 +0200 diff --git a/debian/patches/no-python-user.diff b/debian/patches/no-python-user.diff new file mode 100644 index 00000000..69abe794 --- /dev/null +++ b/debian/patches/no-python-user.diff @@ -0,0 +1,12 @@ +Index: fail2ban/files/fail2ban.service.in +=================================================================== +--- fail2ban.orig/files/fail2ban.service.in ++++ fail2ban/files/fail2ban.service.in +@@ -15,6 +15,7 @@ ExecReload=@BINDIR@/fail2ban-client relo + PIDFile=/run/fail2ban/fail2ban.pid + Restart=on-failure + RestartPreventExitStatus=0 255 ++Environment="PYTHONNOUSERSITE=yes" + + [Install] + WantedBy=multi-user.target diff --git a/debian/patches/series b/debian/patches/series index ce3d75f3..a5a028d5 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ deb_manpages_reportbug 0002-ENH-verify-that-use_stock_cfg-was-not-provided-while.patch deb_no_iptables_service python3-test-suite.diff +no-python-user.diff