From d038cc47cdf8877a7062c18e04bb687f38fcd1e7 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sat, 15 Mar 2025 20:57:10 +0100 Subject: [PATCH] package/passt: new package Signed-off-by: Yann E. MORIN Cc: Thomas Petazzoni Signed-off-by: Julien Olivain --- package/Config.in | 1 + package/passt/Config.in | 19 +++++++++++++++++++ package/passt/passt.hash | 4 ++++ package/passt/passt.mk | 41 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 package/passt/Config.in create mode 100644 package/passt/passt.hash create mode 100644 package/passt/passt.mk diff --git a/package/Config.in b/package/Config.in index 4297903fd8..8a5c992626 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2606,6 +2606,7 @@ endif source "package/openvpn/Config.in" source "package/p910nd/Config.in" source "package/parprouted/Config.in" + source "package/passt/Config.in" source "package/phidgetwebservice/Config.in" source "package/phytool/Config.in" source "package/pimd/Config.in" diff --git a/package/passt/Config.in b/package/passt/Config.in new file mode 100644 index 0000000000..a2d2f4f1fe --- /dev/null +++ b/package/passt/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_PASST + bool "passt" + help + passt: Plug A Simple Socket Transport + pasta: Pack A Subtle Tap Abstraction + + passt implements a translation layer between a Layer-2 + network interface and native Layer-4 sockets (TCP, UDP, + ICMP/ICMPv6 echo) on a host. It doesn't require any + capabilities or privileges, and it can be used as a simple + replacement for Slirp. + + pasta (same binary as passt, different command) offers + equivalent functionality, for network namespaces: traffic + is forwarded using a tap interface inside the namespace, + without the need to create further interfaces on the host, + hence not requiring any capabilities or privileges. + + https://passt.top/passt/about/ diff --git a/package/passt/passt.hash b/package/passt/passt.hash new file mode 100644 index 0000000000..011ba84b89 --- /dev/null +++ b/package/passt/passt.hash @@ -0,0 +1,4 @@ +# Locally computed +sha256 f76c12e0535b9f6af59ee747d8ed7a8f691bb1ac7429225484788f0bc6e23dac passt-2025_02_17.a1e48a0-git4.tar.gz +sha256 32dfe03d9985f5feb581da26a2fe6c84530cccb6b53ede0d8dab075cd048ac5b LICENSES/BSD-3-Clause.txt +sha256 aaf135472f81c5b4a0dca9367e5bb5e9750032b5bebe5442b36e4c0a47430df3 LICENSES/GPL-2.0-or-later.txt diff --git a/package/passt/passt.mk b/package/passt/passt.mk new file mode 100644 index 0000000000..5b9fcd831f --- /dev/null +++ b/package/passt/passt.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# passt +# +################################################################################ + +PASST_VERSION = 2025_02_17.a1e48a0 +PASST_SITE = https://passt.top/passt +PASST_SITE_METHOD = git + +PASST_LICENSE = \ + BSD-3-Clause, \ + GPL-2.0-or-later +PASST_LICENSE_FILES = \ + LICENSES/BSD-3-Clause.txt \ + LICENSES/GPL-2.0-or-later.txt + +define PASST_LINUX_CONFIG_FIXUPS + $(call KCONFIG_ENABLE_OPT,CONFIG_NET) + $(call KCONFIG_ENABLE_OPT,CONFIG_NET_CORE) + $(call KCONFIG_ENABLE_OPT,CONFIG_NETDEVICES) + $(call KCONFIG_ENABLE_OPT,CONFIG_NET_CORE) + $(call KCONFIG_ENABLE_OPT,CONFIG_INET) + $(call KCONFIG_ENABLE_OPT,CONFIG_TUN) +endef + +define PASST_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + -C $(@D) \ + prefix=/usr +endef + +define PASST_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + -C $(@D) \ + prefix=/usr \ + DESTDIR=$(TARGET_DIR) \ + install +endef + +$(eval $(generic-package))