All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3] package/fail2ban: new package
Date: Sun, 25 Nov 2018 09:35:14 +0100	[thread overview]
Message-ID: <20181125093514.402dbdd3@windsurf> (raw)
In-Reply-To: <20181124232422.16914-1-angelo@amarulasolutions.com>

Hello,

On Sun, 25 Nov 2018 00:24:22 +0100, Angelo Compagnucci wrote:
> Fail2ban scans log files (e.g. /var/log/apache/error_log)
> and bans IPs that show malicious behaviours.
> 
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>

Thanks, I've applied to next. See two comments below.


> +define FAIL2BAN_INSTALL_INIT_SYSTEMD
> +	$(INSTALL) -D -m 0644 $(@D)/files/fail2ban.service.in \
> +		$(TARGET_DIR)/usr/lib/systemd/system/fail2ban.service
> +	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
> +	ln -fs ../../../../usr/lib//systemd/system/fail2ban.service \
> +		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/fail2ban.service
> +	$(SED) 's/@BINDIR@/\/usr\/bin/g' $(TARGET_DIR)/usr/lib/systemd/system/fail2ban.service

I've simplified a bit the sed expression by using a comma as a separator
instead of slash. This allows to avoid having to escape the slashes
in /usr/bin.

Also, I see that in the setup.py of fail2ban, there is some logic to
actually generate the fail2ban.service, doing the replacement of
@BINDIR at . However, it requires calling the install_scripts target,
which our Python infrastructure doesn't do, and doesn't easily allow to
override today. So I've applied as-is, but if we have more package that
have custom targets like this, we may want to extend a bit the
python-package infrastructure.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

      reply	other threads:[~2018-11-25  8:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-24 23:24 [Buildroot] [PATCH v3] package/fail2ban: new package Angelo Compagnucci
2018-11-25  8:35 ` Thomas Petazzoni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181125093514.402dbdd3@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.