Bug 244092 - security/py-fail2ban: Create required directoy on start
Summary: security/py-fail2ban: Create required directoy on start
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kevin Bowling
URL:
Keywords: buildisok, feature, needs-qa
Depends on:
Blocks:
 
Reported: 2020-02-13 10:45 UTC by theis
Modified: 2021-06-15 16:07 UTC (History)
3 users (show)

See Also:
theis: maintainer-feedback+
kbowling: merge-quarterly+


Attachments
patch (1.07 KB, patch)
2020-02-13 10:45 UTC, theis
theis: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description theis 2020-02-13 10:45:25 UTC
Created attachment 211607 [details]
patch

Reported at https://github.com/fail2ban/fail2ban/issues/2634
fail2ban should check and, if necessary create, the required directory.

It is still up to the user to ensure that configuration in fail2ban's conf files and FreeBSD's /etc/rc.conf are in sync and that both, pidfile and socket reside in the same directory

Thanks to Florian Koczan
Comment 1 Automation User 2020-02-13 11:05:26 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/117564104
Comment 2 Steve Wills freebsd_committer 2020-02-16 13:59:10 UTC
This looks like a good addition. Have you considered adding -p ${pidfile} to the args, to avoid potential issues with mismatch between rc.conf and the fail2ban config?
Comment 3 theis 2020-02-17 12:41:50 UTC
I thought about that but may main problem is that users have to make sure the directories for pidfile and socket are the same, and here I'm running into conflicts trying to keep 2 configurations in sync. So I just wrote a hint about this.
Comment 4 commit-hook freebsd_committer 2021-06-15 16:05:36 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b48d2a658ef96565393b9186cbed85803b2b87e0

commit b48d2a658ef96565393b9186cbed85803b2b87e0
Author:     Florian Koczan <theis@gmx.at>
AuthorDate: 2021-06-15 16:02:44 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2021-06-15 16:02:44 +0000

    security/py-fail2ban: Create required start dir

    Reported at https://github.com/fail2ban/fail2ban/issues/2634
    fail2ban should check and, if necessary create, the required directory.

    It is still up to the user to ensure that configuration in fail2ban's
    conf files and FreeBSD's /etc/rc.conf are in sync and that both, pidfile
    and socket reside in the same directory.

    PR:             244092
    Approved by:    maintainer
    MFH:            2021Q2

 security/py-fail2ban/Makefile          | 1 +
 security/py-fail2ban/files/fail2ban.in | 9 +++++++++
 2 files changed, 10 insertions(+)
Comment 5 commit-hook freebsd_committer 2021-06-15 16:06:37 UTC
A commit in branch 2021Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=82ad1b7e038ab9a71929742ad86b4bf463d0709d

commit 82ad1b7e038ab9a71929742ad86b4bf463d0709d
Author:     Florian Koczan <theis@gmx.at>
AuthorDate: 2021-06-15 16:02:44 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2021-06-15 16:05:36 +0000

    security/py-fail2ban: Create required start dir

    Reported at https://github.com/fail2ban/fail2ban/issues/2634
    fail2ban should check and, if necessary create, the required directory.

    It is still up to the user to ensure that configuration in fail2ban's
    conf files and FreeBSD's /etc/rc.conf are in sync and that both, pidfile
    and socket reside in the same directory.

    PR:             244092
    Approved by:    maintainer
    MFH:            2021Q2

    (cherry picked from commit b48d2a658ef96565393b9186cbed85803b2b87e0)

 security/py-fail2ban/Makefile          | 1 +
 security/py-fail2ban/files/fail2ban.in | 9 +++++++++
 2 files changed, 10 insertions(+)
Comment 6 Kevin Bowling freebsd_committer 2021-06-15 16:07:40 UTC
Thanks for your contribution!