GNU bug report logs -
#49254
[PATCH 1/4] gnu: Add wondershaper.
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 4 years and 82 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.