unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#39528] [PATCH 0/1] add tunctl
@ 2020-02-09 15:44 Vincent Legoll
  2020-02-09 15:49 ` [bug#39528] [PATCH 1/1] " Vincent Legoll
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Vincent Legoll @ 2020-02-09 15:44 UTC (permalink / raw)
  To: 39528

Hello,

the following message is a patch to add the tunctl package.

I took it straight from NixOS and converted to guix.

The NixOS package's license field was set to GPLv2, but
the single C source code file has only "GPL" mentionned,
I kept the NixOS choice, is that right ?

Te description is the same as the synopsis, as I didn't know
what I could add. Looks straightforward enough for me...

I passed the C code through clang-7 scan-build, it reported
nothing worth changing IMHO.

Please advise if any change needs to be done

Thanks

-- 
Vincent Legoll

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#39528] [PATCH 1/1] add tunctl
  2020-02-09 15:44 [bug#39528] [PATCH 0/1] add tunctl Vincent Legoll
@ 2020-02-09 15:49 ` Vincent Legoll
  2020-02-09 22:45 ` [bug#39528] [PATCH v2] " Vincent Legoll
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Vincent Legoll @ 2020-02-09 15:49 UTC (permalink / raw)
  To: 39528

[-- Attachment #1: Type: text/plain, Size: 31 bytes --]

here it is

-- 
Vincent Legoll

[-- Attachment #2: 0001-gnu-Add-tunctl.patch --]
[-- Type: text/x-patch, Size: 2556 bytes --]

From a12fa93cda95daaadcd69646de2d444a77920e0a Mon Sep 17 00:00:00 2001
From: Vincent Legoll <vincent.legoll@gmail.com>
Date: Sun, 9 Feb 2020 16:34:23 +0100
Subject: [PATCH] gnu: Add tunctl

* gnu/packages/networking.scm (tunctl): New variable.

Signed-off-by: Vincent Legoll <vincent.legoll@gmail.com>
---
 gnu/packages/networking.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index ed339524c0..fc6ab6349d 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -36,6 +36,7 @@
 ;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
 ;;; Copyright © 2019 Daniel Schaefer <git@danielschaefer.me>
 ;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2824,6 +2825,42 @@ easy-to-understand binary values.")
     (home-page "http://jodies.de/ipcalc")
     (license license:gpl2+)))
 
+(define-public tunctl
+  (package
+    (name "tunctl")
+    (version "1.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/tunctl/tunctl-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1zsgn7w6l2zh2q0j6qaw8wsx981qcr536qlz1lgb3b5zqr66qama"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'bootstrap)  ; there is no configure.ac file
+         (delete 'configure)  ; there is no configure script
+         (delete 'check)      ; there are no tests
+         (replace 'build
+           (lambda _
+             (setenv "CC" "gcc")
+             (invoke "make" "tunctl")))
+         ;; TODO: Requires docbook2x to generate man page from SGML
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (mkdir-p bin)
+               (copy-file "tunctl"
+                          (string-append bin "/tunctl")))
+             #t)))))
+    (home-page "http://tunctl.sourceforge.net")
+    (synopsis  "Utility to set up and maintain TUN/TAP network interfaces")
+    (description "Utility to set up and maintain TUN/TAP network interfaces")
+    (license license:gpl2)))
+
 (define-public vde2
   (package
     (name "vde2")
-- 
2.25.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#39528] [PATCH v2] add tunctl
  2020-02-09 15:44 [bug#39528] [PATCH 0/1] add tunctl Vincent Legoll
  2020-02-09 15:49 ` [bug#39528] [PATCH 1/1] " Vincent Legoll
@ 2020-02-09 22:45 ` Vincent Legoll
  2020-02-09 22:50 ` [bug#39528] [PATCH v3] Add tunctl Vincent Legoll
  2020-02-09 23:40 ` [bug#39528] [PATCH v4] " Vincent Legoll
  3 siblings, 0 replies; 7+ messages in thread
From: Vincent Legoll @ 2020-02-09 22:45 UTC (permalink / raw)
  To: 39528

[-- Attachment #1: Type: text/plain, Size: 38 bytes --]

removed the S-O-B

-- 
Vincent Legoll

[-- Attachment #2: 0001-gnu-Add-tunctl.patch --]
[-- Type: text/x-patch, Size: 2498 bytes --]

From 5644a3ee64ea0b6e99b936f65d4c18b55de0b268 Mon Sep 17 00:00:00 2001
From: Vincent Legoll <vincent.legoll@gmail.com>
Date: Sun, 9 Feb 2020 16:34:23 +0100
Subject: [PATCH] gnu: Add tunctl

* gnu/packages/networking.scm (tunctl): New variable.
---
 gnu/packages/networking.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index ed339524c0..fc6ab6349d 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -36,6 +36,7 @@
 ;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
 ;;; Copyright © 2019 Daniel Schaefer <git@danielschaefer.me>
 ;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2824,6 +2825,42 @@ easy-to-understand binary values.")
     (home-page "http://jodies.de/ipcalc")
     (license license:gpl2+)))
 
+(define-public tunctl
+  (package
+    (name "tunctl")
+    (version "1.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/tunctl/tunctl-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1zsgn7w6l2zh2q0j6qaw8wsx981qcr536qlz1lgb3b5zqr66qama"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'bootstrap)  ; there is no configure.ac file
+         (delete 'configure)  ; there is no configure script
+         (delete 'check)      ; there are no tests
+         (replace 'build
+           (lambda _
+             (setenv "CC" "gcc")
+             (invoke "make" "tunctl")))
+         ;; TODO: Requires docbook2x to generate man page from SGML
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (mkdir-p bin)
+               (copy-file "tunctl"
+                          (string-append bin "/tunctl")))
+             #t)))))
+    (home-page "http://tunctl.sourceforge.net")
+    (synopsis  "Utility to set up and maintain TUN/TAP network interfaces")
+    (description "Utility to set up and maintain TUN/TAP network interfaces")
+    (license license:gpl2)))
+
 (define-public vde2
   (package
     (name "vde2")
-- 
2.25.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#39528] [PATCH v3] Add tunctl
  2020-02-09 15:44 [bug#39528] [PATCH 0/1] add tunctl Vincent Legoll
  2020-02-09 15:49 ` [bug#39528] [PATCH 1/1] " Vincent Legoll
  2020-02-09 22:45 ` [bug#39528] [PATCH v2] " Vincent Legoll
@ 2020-02-09 22:50 ` Vincent Legoll
  2020-02-09 23:06   ` Nicolas Goaziou
  2020-02-09 23:40 ` [bug#39528] [PATCH v4] " Vincent Legoll
  3 siblings, 1 reply; 7+ messages in thread
From: Vincent Legoll @ 2020-02-09 22:50 UTC (permalink / raw)
  To: 39528

[-- Attachment #1: Type: text/plain, Size: 55 bytes --]

with a better commit msg this time

-- 
Vincent Legoll

[-- Attachment #2: 0001-gnu-networking-Add-tunctl.patch --]
[-- Type: text/x-patch, Size: 2510 bytes --]

From 0f0407f746a6447898b34ba0116801f8fe5db216 Mon Sep 17 00:00:00 2001
From: Vincent Legoll <vincent.legoll@gmail.com>
Date: Sun, 9 Feb 2020 16:34:23 +0100
Subject: [PATCH] gnu: networking: Add tunctl

* gnu/packages/networking.scm (tunctl): New variable.
---
 gnu/packages/networking.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index ed339524c0..fc6ab6349d 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -36,6 +36,7 @@
 ;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
 ;;; Copyright © 2019 Daniel Schaefer <git@danielschaefer.me>
 ;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2824,6 +2825,42 @@ easy-to-understand binary values.")
     (home-page "http://jodies.de/ipcalc")
     (license license:gpl2+)))
 
+(define-public tunctl
+  (package
+    (name "tunctl")
+    (version "1.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/tunctl/tunctl-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1zsgn7w6l2zh2q0j6qaw8wsx981qcr536qlz1lgb3b5zqr66qama"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'bootstrap)  ; there is no configure.ac file
+         (delete 'configure)  ; there is no configure script
+         (delete 'check)      ; there are no tests
+         (replace 'build
+           (lambda _
+             (setenv "CC" "gcc")
+             (invoke "make" "tunctl")))
+         ;; TODO: Requires docbook2x to generate man page from SGML
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (mkdir-p bin)
+               (copy-file "tunctl"
+                          (string-append bin "/tunctl")))
+             #t)))))
+    (home-page "http://tunctl.sourceforge.net")
+    (synopsis  "Utility to set up and maintain TUN/TAP network interfaces")
+    (description "Utility to set up and maintain TUN/TAP network interfaces")
+    (license license:gpl2)))
+
 (define-public vde2
   (package
     (name "vde2")
-- 
2.25.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [bug#39528] [PATCH v3] Add tunctl
  2020-02-09 22:50 ` [bug#39528] [PATCH v3] Add tunctl Vincent Legoll
@ 2020-02-09 23:06   ` Nicolas Goaziou
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Goaziou @ 2020-02-09 23:06 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: 39528

Hello,

Vincent Legoll <vincent.legoll@gmail.com> writes:

> with a better commit msg this time

> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (bin (string-append out "/bin")))
> +               (mkdir-p bin)
> +               (copy-file "tunctl"
> +                          (string-append bin "/tunctl")))

You can replace the two last lines with

  (install-file "tunctl" bin)

> +    (description "Utility to set up and maintain TUN/TAP network interfaces")

This is a bit short. What about:

  tunctl is used to set up and maintain persistent TUN/TAP network
  interfaces, enabling user applications to simulate network traffic.
  Such interfaces is useful for VPN software, virtualization, emulation,
  simulation, and a number of other applications.

Thank you!
  
Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#39528] [PATCH v4] Add tunctl
  2020-02-09 15:44 [bug#39528] [PATCH 0/1] add tunctl Vincent Legoll
                   ` (2 preceding siblings ...)
  2020-02-09 22:50 ` [bug#39528] [PATCH v3] Add tunctl Vincent Legoll
@ 2020-02-09 23:40 ` Vincent Legoll
  2020-02-10  0:03   ` bug#39528: " Nicolas Goaziou
  3 siblings, 1 reply; 7+ messages in thread
From: Vincent Legoll @ 2020-02-09 23:40 UTC (permalink / raw)
  To: 39528, mail

[-- Attachment #1: Type: text/plain, Size: 169 bytes --]

Hello Nicolas,

thanks for your input, this version incorporates your feedback,
with a s/is/are/ and a capitalized first word of description.

WDYT?

-- 
Vincent Legoll

[-- Attachment #2: 0001-gnu-networking-Add-tunctl.patch --]
[-- Type: text/x-patch, Size: 2664 bytes --]

From 6ca58829af9ef6b2e4c5c90203229280bd8f2678 Mon Sep 17 00:00:00 2001
From: Vincent Legoll <vincent.legoll@gmail.com>
Date: Sun, 9 Feb 2020 16:34:23 +0100
Subject: [PATCH] gnu: networking: Add tunctl

* gnu/packages/networking.scm (tunctl): New variable.
---
 gnu/packages/networking.scm | 39 +++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index ed339524c0..654506ffb8 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -36,6 +36,7 @@
 ;;; Copyright © 2019 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
 ;;; Copyright © 2019 Daniel Schaefer <git@danielschaefer.me>
 ;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2824,6 +2825,44 @@ easy-to-understand binary values.")
     (home-page "http://jodies.de/ipcalc")
     (license license:gpl2+)))
 
+(define-public tunctl
+  (package
+    (name "tunctl")
+    (version "1.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/tunctl/tunctl-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1zsgn7w6l2zh2q0j6qaw8wsx981qcr536qlz1lgb3b5zqr66qama"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'bootstrap)  ; there is no configure.ac file
+         (delete 'configure)  ; there is no configure script
+         (delete 'check)      ; there are no tests
+         (replace 'build
+           (lambda _
+             (setenv "CC" "gcc")
+             (invoke "make" "tunctl")))
+         ;; TODO: Requires docbook2x to generate man page from SGML
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (mkdir-p bin)
+               (install-file "tunctl" bin))
+             #t)))))
+    (home-page "http://tunctl.sourceforge.net")
+    (synopsis  "Utility to set up and maintain TUN/TAP network interfaces")
+    (description "Tunctl is used to set up and maintain persistent TUN/TAP network
+  interfaces, enabling user applications to simulate network traffic.
+  Such interfaces are useful for VPN software, virtualization, emulation,
+  simulation, and a number of other applications.")
+    (license license:gpl2)))
+
 (define-public vde2
   (package
     (name "vde2")
-- 
2.25.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#39528: [PATCH v4] Add tunctl
  2020-02-09 23:40 ` [bug#39528] [PATCH v4] " Vincent Legoll
@ 2020-02-10  0:03   ` Nicolas Goaziou
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Goaziou @ 2020-02-10  0:03 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: 39528-done

Vincent Legoll <vincent.legoll@gmail.com> writes:

> thanks for your input, this version incorporates your feedback,
> with a s/is/are/ and a capitalized first word of description.
>
> WDYT?

Almost good! :)

I removed the (mkdir-p bin), not necessary with `install-file', changed
the commit message so it follows Guix conventions, and fixed the URI of
the package.

Applied. Thank you!

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-02-10  0:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-09 15:44 [bug#39528] [PATCH 0/1] add tunctl Vincent Legoll
2020-02-09 15:49 ` [bug#39528] [PATCH 1/1] " Vincent Legoll
2020-02-09 22:45 ` [bug#39528] [PATCH v2] " Vincent Legoll
2020-02-09 22:50 ` [bug#39528] [PATCH v3] Add tunctl Vincent Legoll
2020-02-09 23:06   ` Nicolas Goaziou
2020-02-09 23:40 ` [bug#39528] [PATCH v4] " Vincent Legoll
2020-02-10  0:03   ` bug#39528: " Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).