diff mbox series

[bug#54457,4/9] gnu: Add libnetfilter-queue

Message ID d5f78454-ef21-2a33-b592-95a7a55abdb5@gmail.com
State Accepted
Headers show
Series Add netfilter tools and libraries | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

fesoj000 March 19, 2022, 12:47 a.m. UTC
* gnu/packages/linux.scm (libnetfilter-queue): New variable.
---
  gnu/packages/linux.scm | 23 +++++++++++++++++++++++
  1 file changed, 23 insertions(+)

Comments

M March 19, 2022, 11:22 p.m. UTC | #1
fesoj000 schreef op za 19-03-2022 om 01:47 [+0100]:
> +(define-public libnetfilter-queue
> +  (package
> +   (name "libnetfilter_queue")

Why the underscore?
M March 19, 2022, 11:23 p.m. UTC | #2
fesoj000 schreef op za 19-03-2022 om 01:47 [+0100]:
> +   (description "libnetfilter_queue is a userspace library providing an API to
> +packets that have been queued by the kernel packet filter. It is is part of a
> +system that deprecates the old ip_queue / libipq mechanism.")
> +   (home-page "https://netfilter.org/projects/libnetfilter_queue/index.html")
> +   (license license:gpl1)))

IIRC, glibc is LGPL2+. Would that make libnetfilter-queue license-
incompatible with glibc?
M March 19, 2022, 11:25 p.m. UTC | #3
fesoj000 schreef op za 19-03-2022 om 01:47 [+0100]:
> +   (description "libnetfilter_queue is a userspace library providing an API to
> +packets that have been queued by the kernel packet filter. It is is part of a
> +system that deprecates the old ip_queue / libipq mechanism.")
> +   (home-page "https://netfilter.org/projects/libnetfilter_queue/index.html")
> +   (license license:gpl1)))

This looks rather Linux-specific, so I'd set (supported-systems ...)
appropriately.  Maybe:

 (supported-systems (filter target-linux? %supported-systems))
fesoj000 March 21, 2022, 7:49 p.m. UTC | #4
On 3/20/22 12:23 AM, Maxime Devos wrote:
> fesoj000 schreef op za 19-03-2022 om 01:47 [+0100]:
>> +   (description "libnetfilter_queue is a userspace library providing an API to
>> +packets that have been queued by the kernel packet filter. It is is part of a
>> +system that deprecates the old ip_queue / libipq mechanism.")
>> +   (home-page "https://netfilter.org/projects/libnetfilter_queue/index.html")
>> +   (license license:gpl1)))
> 
> IIRC, glibc is LGPL2+. Would that make libnetfilter-queue license-
> incompatible with glibc?
I have only very limited knowledge of the interoperability of licenses. But to tackle
this specific problem, the library actually is GPLv2 [0]. I will check all the libraries
again to make sure the licenses are up-to-date.

[0] https://git.netfilter.org/libnetfilter_queue/tree/COPYING
fesoj000 March 21, 2022, 7:49 p.m. UTC | #5
On 3/20/22 12:22 AM, Maxime Devos wrote:
> fesoj000 schreef op za 19-03-2022 om 01:47 [+0100]:
>> +(define-public libnetfilter-queue
>> +  (package
>> +   (name "libnetfilter_queue")
> 
> Why the underscore?
The upstream name of the library is 'libnetfilter_queue', i used
'-' for the variable definition because this felt more lispy. But for
the string i thought it makes more sense to use the upstream name. My
thought process could be wrong though.
M March 21, 2022, 8:08 p.m. UTC | #6
fesoj000 schreef op ma 21-03-2022 om 20:49 [+0100]:
> The upstream name of the library is 'libnetfilter_queue', i used
> '-' for the variable definition because this felt more lispy. But for
> the string i thought it makes more sense to use the upstream name. My
> thought process could be wrong though.

Guix turns #\_ characters into #\- characters as a naming convention.
From (guix)Package Naming:

A package actually has two names associated with it.  [...]

   Both are usually the same and correspond to the lowercase conversion
of the project name chosen upstream, with underscores replaced with
hyphens.  For instance, GNUnet is available as ‘gnunet’, and SDL_net as
‘sdl-net’.
diff mbox series

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 8ddd495441..900f76063c 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -7323,6 +7323,29 @@  (define-public libnetfilter-cthelper
                               "libnetfilter_cthelper/index.html"))
     (license license:gpl2)))
  
+(define-public libnetfilter-queue
+  (package
+   (name "libnetfilter_queue")
+   (version "1.0.5")
+   (source
+    (origin
+     (method url-fetch)
+     (uri (string-append "https://netfilter.org/projects/"
+                         "libnetfilter_queue/files/"
+                         "libnetfilter_queue-"
+                         version ".tar.bz2"))
+     (sha256
+      (base32
+       "1xdra6i4p8jkv943ygjw646qx8df27f7p5852kc06vjx608krzzr"))))
+   (build-system gnu-build-system)
+   (native-inputs (list libmnl libnfnetlink pkg-config))
+   (synopsis "Userspace library for kernel netfilter infrastructure and state")
+   (description "libnetfilter_queue is a userspace library providing an API to
+packets that have been queued by the kernel packet filter. It is is part of a
+system that deprecates the old ip_queue / libipq mechanism.")
+   (home-page "https://netfilter.org/projects/libnetfilter_queue/index.html")
+   (license license:gpl1)))
+
  (define-public proot
    (package
      (name "proot")