[PATCH 0/1] add tunctl

  • Done
  • quality assurance status badge
Details
2 participants
  • Nicolas Goaziou
  • Vincent Legoll
Owner
unassigned
Submitted by
Vincent Legoll
Severity
normal

Debbugs page

Vincent Legoll wrote 5 years ago
(address . guix-patches@gnu.org)
CAEwRq=pGZm=h39rzayuPgjqssfxPiZNCW0iFCghsQPaytjFLyg@mail.gmail.com
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
Vincent Legoll wrote 5 years ago
[PATCH 1/1] add tunctl
(address . 39528@debbugs.gnu.org)
CAEwRq=owGn+VHZTFw=L_Ua4uPg3n4q2A+XCZyPw63YvHUUKVCg@mail.gmail.com
here it is

--
Vincent Legoll
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(+)

Toggle diff (57 lines)
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
Vincent Legoll wrote 5 years ago
[PATCH v2] add tunctl
(address . 39528@debbugs.gnu.org)
CAEwRq=qv3q6k9typ-YwHnmXoqZpQisY-fWfeLSyvwG5PhGoMJA@mail.gmail.com
removed the S-O-B

--
Vincent Legoll
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(+)

Toggle diff (57 lines)
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
Vincent Legoll wrote 5 years ago
[PATCH v3] Add tunctl
(address . 39528@debbugs.gnu.org)
CAEwRq=pO-drD7VRWHSGDEBp+HVanc9c6C3Euc7v1TzXJ2pEBBQ@mail.gmail.com
with a better commit msg this time

--
Vincent Legoll
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(+)

Toggle diff (57 lines)
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
Nicolas Goaziou wrote 5 years ago
(name . Vincent Legoll)(address . vincent.legoll@gmail.com)(address . 39528@debbugs.gnu.org)
87d0an1hun.fsf@nicolasgoaziou.fr
Hello,

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

Toggle quote (10 lines)
> 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)

Toggle quote (2 lines)
> + (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
Vincent Legoll wrote 5 years ago
[PATCH v4] Add tunctl
CAEwRq=qPv4OFtU0OBXRkw6Z81wpFuUUGg1+z1aedg6k3kcpQ-Q@mail.gmail.com
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
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(+)

Toggle diff (59 lines)
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
Nicolas Goaziou wrote 5 years ago
(name . Vincent Legoll)(address . vincent.legoll@gmail.com)(address . 39528-done@debbugs.gnu.org)
87a75rz4t8.fsf@nicolasgoaziou.fr
Vincent Legoll <vincent.legoll@gmail.com> writes:

Toggle quote (5 lines)
> 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!
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 39528
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
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help