From: Aljosha Papsch <ep@stern-data.com>
To: 49258@debbugs.gnu.org
Cc: Aljosha Papsch <ep@stern-data.com>
Subject: [bug#49258] [PATCH 1/4] gnu: Add wondershaper.
Date: Fri, 9 Jul 2021 15:54:06 +0200 [thread overview]
Message-ID: <20210709135409.54308-2-ep@stern-data.com> (raw)
In-Reply-To: <20210709135409.54308-1-ep@stern-data.com>
* gnu/packages/networking.scm (wondershaper): New variable.
---
gnu/packages/networking.scm | 51 +++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index fe73c9cdc7..920d01d8e5 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -64,6 +64,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
@@ -4069,3 +4070,53 @@ IPv6 Internet connectivity - it also works over IPv4.")
;; version. This exception does not (and cannot) modify any license terms
;; which apply to the Application, with which you must still comply
license:lgpl3)))
+
+(define-public wondershaper
+ (package
+ (name "wondershaper")
+ (version "1.4.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ ;; Use a fork that allows overriding the configuration file
+ (git-reference
+ (url "https://github.com/apapsch/wondershaper")
+ (commit "0987dbb0c360184b8aacf391646e19ea9ee78b10")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1hyivkpvr5pv8wg64i7vgpxib4allbp4v1ahp3qhc1d88rkw7gjs"))))
+ (build-system copy-build-system)
+ (arguments
+ `(#:install-plan '(("./wondershaper" "./bin/")
+ ("./wondershaper.conf" "./etc/"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'patch-shebangs 'patch-invoked-commands
+ (lambda* (#:key outputs inputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out")))
+ (substitute* (string-append out "/bin/wondershaper")
+ (("^\\s*ip ")
+ (string-append (assoc-ref inputs "iproute2") "/sbin/ip "))
+ (("^\\s*modprobe ")
+ (string-append (assoc-ref inputs "kmod") "/bin/modprobe "))
+ (("^\\s*tc ")
+ (string-append (assoc-ref inputs "iproute2") "/sbin/tc "))
+ (("^\\s*cat ")
+ (string-append (assoc-ref inputs "coreutils") "/bin/cat "))
+ (("/etc/.+/wondershaper.conf")
+ (string-append out "/etc/wondershaper.conf"))))
+ #t)))))
+ (inputs
+ `(("coreutils" ,coreutils)
+ ("iproute2" ,iproute)
+ ("kmod" ,kmod)))
+ (synopsis "Command-line utility for limiting an adapter's bandwidth")
+ (description "Wonder Shaper allows the user to limit the bandwidth of one
+or more network adapters. It does so by using iproute's tc command, but
+greatly simplifies its operation. Wonder Shaper was first released by Bert
+Hubert in 2002. A subsequent release added a command-line interface. Wonder
+Shaper makes use of tc's Hierarchical Token Bucket (HTB) queue, ensuring good
+bandwidth management on high speed (above ten megabits) links.")
+ (home-page "https://github.com/magnific0/wondershaper")
+ (license license:gpl2)))
--
2.32.0
next prev parent reply other threads:[~2021-07-09 14:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-28 15:22 [bug#49258] [PATCH] Add wondershaper package and service Aljosha Papsch
2021-06-28 15:22 ` [bug#49254] [PATCH 1/4] gnu: Add wondershaper Aljosha Papsch
2021-06-30 20:15 ` Maxime Devos
2021-06-28 15:22 ` [bug#49255] [PATCH 2/4] gnu: Add wondershaper service Aljosha Papsch
2021-06-28 15:22 ` [bug#49256] [PATCH 3/4] guix.texi: Document wondershaper-service-type Aljosha Papsch
2021-06-28 15:22 ` [bug#49257] [PATCH 4/4] Add wondershaper related copright lines Aljosha Papsch
2021-07-09 13:54 ` [bug#49258] [PATCH v2] Revise wondershaper package Aljosha Papsch
2021-07-09 13:54 ` Aljosha Papsch [this message]
2021-07-09 13:54 ` [bug#49258] [PATCH 2/4] gnu: Add wondershaper service Aljosha Papsch
2021-07-09 13:54 ` [bug#49258] [PATCH 3/4] guix.texi: Document wondershaper-service-type Aljosha Papsch
2021-07-09 13:54 ` [bug#49258] [PATCH 4/4] Add wondershaper related copright lines Aljosha Papsch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210709135409.54308-2-ep@stern-data.com \
--to=ep@stern-data.com \
--cc=49258@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).