]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
fort-validator: New package
authorStefan Schantl <stefan.schantl@ipfire.org>
Thu, 12 Jun 2025 16:27:01 +0000 (18:27 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 15 Jun 2025 12:13:28 +0000 (12:13 +0000)
FORT Validator is an open source RPKI validator. It allows operators to validate BGP routing information
against the RPKI repository for use in router configuration and resolution.

This patch includes the LFS and rootfile to build the validator,
an initscript, required definitions for backup and an empty config file
for user customization.

Fixes #13845.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/backup/includes/fort-validator [new file with mode: 0644]
config/fort-validator/config.json [new file with mode: 0644]
config/rootfiles/packages/fort-validator [new file with mode: 0644]
lfs/fort-validator [new file with mode: 0644]
make.sh
src/initscripts/packages/fort-validator [new file with mode: 0644]

diff --git a/config/backup/includes/fort-validator b/config/backup/includes/fort-validator
new file mode 100644 (file)
index 0000000..92d1f64
--- /dev/null
@@ -0,0 +1,2 @@
+/etc/fort/config.json
+/var/lib/fort
diff --git a/config/fort-validator/config.json b/config/fort-validator/config.json
new file mode 100644 (file)
index 0000000..2c63c08
--- /dev/null
@@ -0,0 +1,2 @@
+{
+}
diff --git a/config/rootfiles/packages/fort-validator b/config/rootfiles/packages/fort-validator
new file mode 100644 (file)
index 0000000..629aab3
--- /dev/null
@@ -0,0 +1,8 @@
+etc/fort
+etc/fort/config.json
+etc/fort/config.json.example
+etc/rc.d/init.d/fort-validator
+usr/bin/fort
+#usr/share/man/man8/fort.8
+var/ipfire/backup/addons/includes/fort-validator
+var/lib/fort
diff --git a/lfs/fort-validator b/lfs/fort-validator
new file mode 100644 (file)
index 0000000..cb8ba89
--- /dev/null
@@ -0,0 +1,112 @@
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007-2024  IPFire Team  <info@ipfire.org>                     #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+###############################################################################
+# Definitions
+###############################################################################
+
+include Config
+
+SUMMARY    = Fort RPKI validator
+
+VER        = 1.6.6
+
+THISAPP    = FORT-validator-$(VER)
+DL_FILE    = $(THISAPP).tar.gz
+DL_FROM    = $(URL_IPFIRE)
+DIR_APP    = $(DIR_SRC)/$(THISAPP)
+TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = fort-validator
+PAK_VER    = 1
+
+DEPS       =
+
+SERVICES   = fort-validator
+
+###############################################################################
+# Top-level Rules
+###############################################################################
+
+objects = $(DL_FILE)
+
+$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
+
+$(DL_FILE)_BLAKE2 = c62a0e41e2a2fea60383ae87ff92d9cd68945c459b0ccaa4d0a3fc6d8c0796cb0dc0fde7305023e4ddcf476b4043ac73d8213638a8f319862a3c39e3381f43da
+
+install : $(TARGET)
+
+check : $(patsubst %,$(DIR_CHK)/%,$(objects))
+
+download :$(patsubst %,$(DIR_DL)/%,$(objects))
+
+b2 : $(subst %,%_BLAKE2,$(objects))
+
+dist:
+       @$(PAK)
+
+###############################################################################
+# Downloading, checking, b2sum
+###############################################################################
+
+$(patsubst %,$(DIR_CHK)/%,$(objects)) :
+       @$(CHECK)
+
+$(patsubst %,$(DIR_DL)/%,$(objects)) :
+       @$(LOAD)
+
+$(subst %,%_BLAKE2,$(objects)) :
+       @$(B2SUM)
+
+###############################################################################
+# Installation Details
+###############################################################################
+$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
+       @$(PREBUILD)
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+
+       cd $(DIR_APP) && ./autogen.sh
+       cd $(DIR_APP) && ./configure \
+               --prefix=/usr \
+               --sysconfdir=/etc
+
+       cd $(DIR_APP) && make $(MAKETUNING)
+       cd $(DIR_APP) && make install
+
+       # Create directory layout
+       mkdir -pv /etc/fort
+       mkdir -pv /var/lib/fort
+
+       # Install plain config file.
+       cd $(DIR_APP) && install -m 0644 $(DIR_SRC)/config/fort-validator/config.json \
+               /etc/fort/config.json
+
+       # Install example config file.
+       cd $(DIR_APP) && install -m 0644 $(DIR_APP)/examples/config.json \
+               /etc/fort/config.json.example
+
+       # Install initscripts
+       $(call INSTALL_INITSCRIPTS,$(SERVICES))
+
+       # Install backup definitions
+       install -v -m 644 $(DIR_SRC)/config/backup/includes/fort-validator \
+               /var/ipfire/backup/addons/includes/fort-validator
+
+       @rm -rf $(DIR_APP)
+       @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 25489a2f18dfc50d34eb6d0f2383882101f0d9c5..2c903208f80acbbdaacd2f66aae7411643d38424 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -2085,6 +2085,7 @@ build_system() {
        lfsmake2 btrfs-progs
        lfsmake2 inotify-tools
        lfsmake2 grub-btrfs
+       lfsmake2 fort-validator
 
        lfsmake2 linux
        lfsmake2 rtl8812au
diff --git a/src/initscripts/packages/fort-validator b/src/initscripts/packages/fort-validator
new file mode 100644 (file)
index 0000000..e0c9ba2
--- /dev/null
@@ -0,0 +1,55 @@
+#!/bin/sh
+###############################################################################
+#                                                                             #
+# IPFire.org - A linux based firewall                                         #
+# Copyright (C) 2007-2025  IPFire Team  <info@ipfire.org>                     #
+#                                                                             #
+# This program is free software: you can redistribute it and/or modify        #
+# it under the terms of the GNU General Public License as published by        #
+# the Free Software Foundation, either version 3 of the License, or           #
+# (at your option) any later version.                                         #
+#                                                                             #
+# This program is distributed in the hope that it will be useful,             #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of              #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
+# GNU General Public License for more details.                                #
+#                                                                             #
+# You should have received a copy of the GNU General Public License           #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+       start)
+               boot_mesg "Starting fort RPKI validator..."
+               loadproc /usr/bin/fort --log.output=syslog --validation-log.output=syslog --configuration-file /etc/fort/config.json
+               ;;
+
+       stop)
+               boot_mesg "Stopping fort RPKI validator..."
+               killproc /usr/bin/fort
+               ;;
+
+       reload)
+               boot_mesg "Reloading fort RPKI validator..."
+               reloadproc /usr/bin/fort
+               ;;
+
+       restart)
+               ${0} stop
+               sleep 1
+               ${0} start
+               ;;
+
+       status)
+               statusproc /usr/bin/fort
+               ;;
+
+       *)
+               echo "Usage: ${0} {start|stop|reload|restart|status}"
+               exit 1
+               ;;
+esac