From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 30 16:15:40 2021 Received: (at 49254) by debbugs.gnu.org; 30 Jun 2021 20:15:40 +0000 Received: from localhost ([127.0.0.1]:58859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lygcW-000483-AJ for submit@debbugs.gnu.org; Wed, 30 Jun 2021 16:15:40 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:51692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lygcU-00047v-ID for 49254@debbugs.gnu.org; Wed, 30 Jun 2021 16:15:39 -0400 Received: from [172.20.10.4] ([5.23.251.255]) by michel.telenet-ops.be with bizsmtp id PYFc250035XNd5906YFcU1; Wed, 30 Jun 2021 22:15:37 +0200 Message-ID: <6648fb8c50107945119d30913a246a9d9a0e52cc.camel@telenet.be> Subject: Re: [bug#49254] [PATCH 1/4] gnu: Add wondershaper. From: Maxime Devos To: Aljosha Papsch , 49254@debbugs.gnu.org Date: Wed, 30 Jun 2021 22:15:26 +0200 In-Reply-To: <20210628152232.31073-2-ep@stern-data.com> References: <20210628152232.31073-1-ep@stern-data.com> <20210628152232.31073-2-ep@stern-data.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-gA7G/PimSVcgqnR0KpNM" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1625084137; bh=m/x3lIpNKtkyxbLa+9cOYj+NbDqg4zcTZTPlvspWQLY=; h=Subject:From:To:Date:In-Reply-To:References; b=aGM/L962xFd6NQ6DTRE0GBYeamhJJrjKDq3GG4eJJBbcuK95HfGJvS9TGLe4RWalL gBGxEp5ULfF9y60EP1Wjm23+roZEJ8u7/vg/flYZGEwO/UGzb48R+RI/u9or6CffIY 5GYiM7JhcYtDloA4/+MvFu3nMjDt5Wis12RFyqfwzu6LVq7z/NR76pD6zhDu/djm4T c4ESOg2pPIfxxgVfvIPQe7pD4vVtpgj4MpgJdDEPaGAtt7Lmlp6BeNVDJd3AdiTYn2 5Z8iW8+HvijzEOlJkLkjCaLyN40L5yhAYb4eVnx/YEtG2qUq6dmnCnAAgy8Aize0W4 hi/JK1UXo1DaA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49254 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-gA7G/PimSVcgqnR0KpNM Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 =E2=80=98We=E2=80=99 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. --=-gA7G/PimSVcgqnR0KpNM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYNzQ3hccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hhxAQDvFswwmtiS5I2C8moFS/y1jpvD Sa0ELUKhllhpdmb5YQD/ZqbLOcbjdWTWM870M+UJRAc+TKAkHiJQ209R3FvmBQM= =c9Em -----END PGP SIGNATURE----- --=-gA7G/PimSVcgqnR0KpNM--