Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
From 7b7fa3c02d4575c09362336bc310835c37859f1a Mon Sep 17 00:00:00 2001
From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Date: Fri, 19 Apr 2024 22:47:20 +0200
Subject: [PATCH] setup.py: fix data relative paths
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
As per distutils documentation:
The directory should be a relative path. It is interpreted relative to the
installation prefix (Python’s sys.prefix for system installations;
site.USER_BASE for user installations). Distutils allows directory to be an
absolute installation path, but this is discouraged since it is incompatible
with the wheel packaging format [1].
When packaging to a bdist_wheel indeed, the files in the "data_files" dictionary
are not picked at all as data files if they have an absolute path,
but they are instead added to the wheel as python files.
This has the effect of installing them as part of python files in the
site-packages folder when the wheel is installed.
This patch cannot be sent upstream because it breaks the legacy way of
installing the package with *python setup.py install* and it is needed only to
comply with the pep517 buildroot compatibility layer.
[1] https://docs.python.org/3.10/distutils/setupscript.html#installing-additional-files
Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Upstream: N/A [breaks traditional setuptools installation]
---
setup.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/setup.py b/setup.py
index 91f71cf2..99ba2e32 100755
--- a/setup.py
+++ b/setup.py
@@ -238,26 +238,26 @@ setup(
for f in w[2]]
} if with_tests else {},
data_files = [
- ('/etc/fail2ban',
+ ('etc/fail2ban',
glob("config/*.conf")
),
- ('/etc/fail2ban/filter.d',
+ ('etc/fail2ban/filter.d',
glob("config/filter.d/*.conf")
),
- ('/etc/fail2ban/filter.d/ignorecommands',
+ ('etc/fail2ban/filter.d/ignorecommands',
[p for p in glob("config/filter.d/ignorecommands/*") if isfile(p)]
),
- ('/etc/fail2ban/action.d',
+ ('etc/fail2ban/action.d',
glob("config/action.d/*.conf") +
glob("config/action.d/*.py")
),
- ('/etc/fail2ban/fail2ban.d',
+ ('etc/fail2ban/fail2ban.d',
''
),
- ('/etc/fail2ban/jail.d',
+ ('etc/fail2ban/jail.d',
''
),
- ('/var/lib/fail2ban',
+ ('var/lib/fail2ban',
''
),
] + data_files_extra,
--
2.34.1

View File

@@ -0,0 +1,24 @@
From 2fed408c05ac5206b490368d94599869bd6a056d Mon Sep 17 00:00:00 2001
From: Fabian Dellwing <fabian.dellwing@mbconnectline.de>
Date: Tue, 2 Jul 2024 07:54:15 +0200
Subject: [PATCH] Adjust sshd filter for OpenSSH 9.8 new daemon name
Upstream: https://github.com/fail2ban/fail2ban/commit/2fed408c05ac5206b490368d94599869bd6a056d
Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
---
config/filter.d/sshd.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/filter.d/sshd.conf b/config/filter.d/sshd.conf
index 1c8a02deb5..a1fd749aed 100644
--- a/config/filter.d/sshd.conf
+++ b/config/filter.d/sshd.conf
@@ -16,7 +16,7 @@ before = common.conf
[DEFAULT]
-_daemon = sshd
+_daemon = (?:sshd(?:-session)?)
# optional prefix (logged from several ssh versions) like "error: ", "error: PAM: " or "fatal: "
__pref = (?:(?:error|fatal): (?:PAM: )?)?

View File

@@ -0,0 +1,24 @@
From 50ff131a0fd8f54fdeb14b48353f842ee8ae8c1a Mon Sep 17 00:00:00 2001
From: "Sergey G. Brester" <serg.brester@sebres.de>
Date: Wed, 3 Jul 2024 19:35:28 +0200
Subject: [PATCH] filter.d/sshd.conf: ungroup (unneeded for _daemon)
Upstream: https://github.com/fail2ban/fail2ban/commit/50ff131a0fd8f54fdeb14b48353f842ee8ae8c1a
Signed-off-by: Fiona Klute (WIWA) <fiona.klute@gmx.de>
---
config/filter.d/sshd.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/filter.d/sshd.conf b/config/filter.d/sshd.conf
index a1fd749aed..3a84b1ba52 100644
--- a/config/filter.d/sshd.conf
+++ b/config/filter.d/sshd.conf
@@ -16,7 +16,7 @@ before = common.conf
[DEFAULT]
-_daemon = (?:sshd(?:-session)?)
+_daemon = sshd(?:-session)?
# optional prefix (logged from several ssh versions) like "error: ", "error: PAM: " or "fatal: "
__pref = (?:(?:error|fatal): (?:PAM: )?)?

View File

@@ -0,0 +1,17 @@
config BR2_PACKAGE_FAIL2BAN
bool "fail2ban"
depends on BR2_PACKAGE_PYTHON3
select BR2_PACKAGE_PYTHON_PYASYNCHAT # runtime
select BR2_PACKAGE_PYTHON_SYSTEMD if BR2_PACKAGE_SYSTEMD
help
Fail2ban scans log files (e.g. /var/log/apache/error_log) and
bans IPs that show the malicious signs -- too many password
failures, seeking for exploits, etc. Out of the box Fail2Ban
comes with filters for various services (apache, courier,
ssh, etc).
Fail2Ban is able to reduce the rate of incorrect
authentications attempts however it cannot eliminate the risk
that weak authentication presents.
https://www.fail2ban.org

View File

@@ -0,0 +1,23 @@
#!/bin/sh
case "$1" in
start)
printf "Starting fail2ban: "
start-stop-daemon -S -q -m -p /var/run/fail2ban.pid \
-b -x fail2ban-server -- -xf start
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
stop)
printf "Stopping fail2ban: "
start-stop-daemon -K -q -p /var/run/fail2ban.pid
[ $? = 0 ] && echo "OK" || echo "FAIL"
;;
restart)
"$0" stop
sleep 1
"$0" start
;;
*)
echo "Usage: $0 {start|stop|restart}"
;;
esac

View File

@@ -0,0 +1,3 @@
# sha256 locally computed
sha256 474fcc25afdaf929c74329d1e4d24420caabeea1ef2e041a267ce19269570bae fail2ban-1.1.0.tar.gz
sha256 a75fec0260742fe6275d63ff6a5d97b924b28766558306b3fa4069763096929b COPYING

View File

@@ -0,0 +1,48 @@
################################################################################
#
# fail2ban
#
################################################################################
FAIL2BAN_VERSION = 1.1.0
FAIL2BAN_SITE = $(call github,fail2ban,fail2ban,$(FAIL2BAN_VERSION))
FAIL2BAN_LICENSE = GPL-2.0+
FAIL2BAN_LICENSE_FILES = COPYING
FAIL2BAN_CPE_ID_VENDOR = fail2ban
FAIL2BAN_SELINUX_MODULES = fail2ban
FAIL2BAN_SETUP_TYPE = setuptools
# fail2ban contains bundled copies of pyasyncore and pyasynchat,
# remove them so only the packaged versions are installed.
define FAIL2BAN_REMOVE_BUNDLED_COMPAT
$(SED) '/fail2ban\.compat/d' $(@D)/setup.py
rm -rf $(@D)/fail2ban/compat
endef
FAIL2BAN_POST_PATCH_HOOKS += FAIL2BAN_REMOVE_BUNDLED_COMPAT
define FAIL2BAN_FIX_DEFAULT_CONFIG
$(SED) '/^socket/c\socket = /run/fail2ban.sock' $(TARGET_DIR)/etc/fail2ban/fail2ban.conf
$(SED) '/^pidfile/c\pidfile = /run/fail2ban.pid' $(TARGET_DIR)/etc/fail2ban/fail2ban.conf
$(SED) '/^dbfile/c\dbfile = None' $(TARGET_DIR)/etc/fail2ban/fail2ban.conf
endef
FAIL2BAN_POST_INSTALL_TARGET_HOOKS += FAIL2BAN_FIX_DEFAULT_CONFIG
# fail2ban-python points to host python
define FAIL2BAN_FIX_FAIL2BAN_PYTHON_SYMLINK
ln -snf python3 $(TARGET_DIR)/usr/bin/fail2ban-python
endef
FAIL2BAN_POST_INSTALL_TARGET_HOOKS += FAIL2BAN_FIX_FAIL2BAN_PYTHON_SYMLINK
define FAIL2BAN_INSTALL_INIT_SYSV
$(INSTALL) -D -m 755 package/fail2ban/S60fail2ban \
$(TARGET_DIR)/etc/init.d/S60fail2ban
endef
define FAIL2BAN_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 $(@D)/files/fail2ban.service.in \
$(TARGET_DIR)/usr/lib/systemd/system/fail2ban.service
$(SED) 's,@BINDIR@,/usr/bin,g' $(TARGET_DIR)/usr/lib/systemd/system/fail2ban.service
$(SED) '/^PIDFile/c\PIDFile=/run/fail2ban.pid' $(TARGET_DIR)/usr/lib/systemd/system/fail2ban.service
endef
$(eval $(python-package))