Bug 249578 - security/py-fail2ban: Missing paths
Summary: security/py-fail2ban: Missing paths
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-24 15:48 UTC by László Károlyi
Modified: 2020-09-25 15:05 UTC (History)
3 users (show)

See Also:
theis: maintainer-feedback+


Attachments
Patched /usr/local/etc/rc.d/fail2ban script (345 bytes, patch)
2020-09-24 15:48 UTC, László Károlyi
no flags Details | Diff
patch with %%PREFIX%% instead of hard coded paths (310 bytes, text/plain)
2020-09-25 12:23 UTC, theis
theis: maintainer-approval+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description László Károlyi 2020-09-24 15:48:37 UTC
Created attachment 218243 [details]
Patched /usr/local/etc/rc.d/fail2ban script

Hey,

as discussed with the maintainer, the fail2ban port misses the /usr/local prefixes in the PATH and because of this, some actions that don't use absolute paths (e.g. abuseipdb, blocklist_de) will not work.

They use non-absolute command paths (curl) for linux compatibility.

I have patched my local fail2ban to include those, but would like to have it included in the package provided /usr/local/etc/rc.d/fail2ban script.

The generic idea is something along the lines of the attached patch.
Comment 1 mam 2020-09-24 18:15:23 UTC
Great! I was just about to report the same problem. Your solution is very good, tnx.
I helped me out by adding the full paths to the failing binaries, but that is not half as clever as yours :-)
Comment 2 theis 2020-09-25 12:23:59 UTC
Created attachment 218280 [details]
patch with %%PREFIX%% instead of hard coded paths

The suggested patch from the reporter uses hard coded paths /usr/local/bin. I changed it to use %%PREFIX%%/bin instead
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-09-25 15:05:29 UTC
A commit references this bug:

Author: pi
Date: Fri Sep 25 15:05:24 UTC 2020
New revision: 550045
URL: https://svnweb.freebsd.org/changeset/ports/550045

Log:
  security/py-fail2ban: add missing paths to rc script

  PR:		249578
  Submitted by:	L?szl? K?rolyi <laszlo@karolyi.hu>
  Approved by:	theis@gmx.at (maintainer)

Changes:
  head/security/py-fail2ban/files/fail2ban.in
Comment 4 Kurt Jaeger freebsd_committer freebsd_triage 2020-09-25 15:05:46 UTC
committed, thanks!