unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Aljosha Papsch <ep@stern-data.com>, 49254@debbugs.gnu.org
Subject: [bug#49254] [PATCH 1/4] gnu: Add wondershaper.
Date: Wed, 30 Jun 2021 22:15:26 +0200	[thread overview]
Message-ID: <6648fb8c50107945119d30913a246a9d9a0e52cc.camel@telenet.be> (raw)
In-Reply-To: <20210628152232.31073-2-ep@stern-data.com>

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

Aljosha Papsch schreef op ma 28-06-2021 om 17:22 [+0200]:
> +        (git-reference
> +         (url "https://github.com/apapsch/wondershaper")
> +         (commit "0987dbb0c360184b8aacf391646e19ea9ee78b10")))

Best add a comment like

  ;; Use a fork that allows overriding the configuration file

‘We’ usually try to use upstream versions.

> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "1hyivkpvr5pv8wg64i7vgpxib4allbp4v1ahp3qhc1d88rkw7gjs"))))
> +    (build-system copy-build-system)
> +    (arguments
> +     `(#:install-plan '(("./wondershaper" "./bin/"))
> +       #: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"))
> +                    (bin          (string-append out "/bin")))
> +               (substitute* (string-append bin "/wondershaper")
> +                 (("^\\s*ip ")
> +                  (string-append (which "ip") " "))

Using (which "blabla") is not correct when cross-compiling, as
"which" looks in $PATH, but "iproute2" (and "kmod") won't be
in $PATH when cross-compiling as they are 'inputs', not 'native-inputs'

You'd need (search-input-file inputs "/bin/ip")
(or maybe "/sbin/ip", I dunno). Actually, search-input-file is
in core-updates, but not yet on 'master', so instead do

  (string-append (assoc-ref inputs "iproute2") "/bin/ip")

or something like that.

Looking at the source code, I see

usage(){
cat  << EOF

so it seems you need to substitute "cat" as well (it is from coreutils).

I'd recommend copying "wondershaper.conf" somewhere
as well, and substituting "/etc/conf.d/wondershaper.conf" and "/etc/systemd/wondershaper.conf"
in 'wondershaper' appropriately, so it will have some defaults.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2021-06-30 20:16 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 [this message]
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   ` [bug#49258] [PATCH 1/4] gnu: Add wondershaper Aljosha Papsch
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=6648fb8c50107945119d30913a246a9d9a0e52cc.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=49254@debbugs.gnu.org \
    --cc=ep@stern-data.com \
    /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).