[PATCH] gnu: Add jool.

  • Open
  • quality assurance status badge
Details
One participant
  • Ashish SHUKLA
Owner
unassigned
Submitted by
Ashish SHUKLA
Severity
normal
A
A
Ashish SHUKLA wrote on 1 Feb 22:36 +0100
(address . guix-patches@gnu.org)(name . Ashish SHUKLA)(address . ashish.is@lostca.se)
c6ad754614c9876d79158dab9935f739085a4659.1738445803.git.ashish.is@lostca.se
* gnu/packages/networking.scm (jool): Add jool.

Change-Id: Ic517fc8c4afbb964363ec68b3d89ce9fcd00c7d8
---
Hi,

This patch adds Jool software, which implements NAT64 support in Linux kernel, and is helpful in updating IPv6-only networks, e.g. FOSDEM network at FOSDEM.

Thanks!

gnu/packages/networking.scm | 73 +++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)

Toggle diff (102 lines)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 09e0359122..ec7279d38b 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -66,6 +66,7 @@
;;; Copyright © 2024 Alexey Abramov <levenson@mmer.org>
;;; Copyright © 2024 James Smith <jsubuntuxp@disroot.org>
;;; Copyright © 2025 Sughosha <sughosha@disroot.org>
+;;; Copyright © 2025 Ashish SHUKLA <ashish.is@lostca.se>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -92,6 +93,7 @@ (define-module (gnu packages networking)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
+ #:use-module (guix build-system linux-module)
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
@@ -5064,6 +5066,77 @@ (define-public dnstracer
back to the servers which know the data.")
(license license:bsd-2)))
+(define-public jool
+ (package
+ (name "jool")
+ (version "4.1.13")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/NICMx/Jool")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0rz8pqn692y61rv33hvr18ngjjyha0m14m4w4yr82xp3km5kfnsj"))))
+ (build-system linux-module-build-system)
+ (outputs '("out" "module"))
+ (native-inputs (list automake autoconf libtool pkg-config))
+ (inputs (list libnl iptables))
+ (arguments
+ (list
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((modules-dir
+ (string-append
+ (assoc-ref inputs "linux-module-builder") "/lib/modules")))
+ (invoke "make" "-C" "src/mod"
+ (string-append "MODULES_DIR=" modules-dir))
+ (invoke "make"))))
+
+ (add-after 'configure 'really-configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (setenv "CC" #$(cc-for-target))
+ (invoke "./configure"
+ (string-append "--prefix=" (assoc-ref outputs "out")))))
+
+ (add-after 'unpack 'patch-Makefiles
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* "src/mod/Makefile"
+ (("/sbin/depmod")
+ "true"))
+ (substitute* "src/usr/iptables/Makefile"
+ (("^XTABLES_SO_DIR =.*$")
+ (string-append "XTABLES_SO_DIR = " out "/lib/xtables"))))))
+
+ (replace 'install
+ (lambda* (#:key inputs outputs parallel-build? make-flags
+ #:allow-other-keys)
+ (let ((modules-dir
+ (string-append (assoc-ref inputs "linux-module-builder")
+ "/lib/modules"))
+ (out (assoc-ref outputs "out"))
+ (module-dir (string-append
+ (assoc-ref outputs "module")
+ "/lib/modules")))
+ (invoke "make" "install")
+ (invoke "make" "-C" "src/mod" "modules_install"
+ "DEPMOD=true"
+ "INSTALL_MOD_STRIP=1"
+ (string-append "MODULES_DIR=" modules-dir)
+ (string-append "MODULE_DIR=" module-dir)
+ (string-append "INSTALL_PATH=" module-dir)
+ (string-append "INSTALL_MOD_PATH=" module-dir))))))))
+ (home-page "https://nicmx.github.io/Jool/")
+ (synopsis "SIIT and NAT64 implementation for Linux")
+ (description "Jool implements SIIT and NAT64 for Linux.")
+ (license license:gpl2+)))
+
(define-public dropwatch
(package
(name "dropwatch")

base-commit: aba3e48ae1ce70deba8e6ad63e2ac9b102abfd4d
--
2.48.1
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 76001@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 76001
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch